Slash Command
Slack
Slack
Slash Command
Triggered when Slack sends a slash command request and the command text includes a subcommand.
Trigger
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
commandName | text | Optional | Filters on the first token after the registered slash command. For `/workhub24 approve 123`, the commandName is `approve`. |
args | array of text | Optional | Filters on the parsed command arguments after commandName. Must match the incoming args in order. |
teamId | text | Optional | Filters on the Slack workspace team ID. |
channelId | text | Optional | Filters on the Slack channel ID where the slash command was invoked. |
userId | text | Optional | Filters on the Slack user ID that invoked the slash command. |
text | text | Optional | Filters on the full raw text passed after the registered slash command. |
Outputs
| Name | Type | Description |
|---|---|---|
slashCommand | text | The registered Slack slash command that invoked this trigger, such as `/workhub24`. |
commandName | text | The first parsed token after the slash command. |
args | array of text | The remaining parsed command arguments after commandName. |
teamId | text | Slack workspace team ID. |
channelId | text | Slack channel ID. |
channelName | text | Slack channel name when provided by Slack. |
userId | text | Slack user ID. |
userName | text | Slack username when provided by Slack. |
text | text | Raw text passed after the registered slash command. |
triggerId | text | Slack trigger ID from the slash command payload. |