Skip to content

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
commandNametextOptionalFilters on the first token after the registered slash command. For `/workhub24 approve 123`, the commandName is `approve`.
argsarray of textOptionalFilters on the parsed command arguments after commandName. Must match the incoming args in order.
teamIdtextOptionalFilters on the Slack workspace team ID.
channelIdtextOptionalFilters on the Slack channel ID where the slash command was invoked.
userIdtextOptionalFilters on the Slack user ID that invoked the slash command.
texttextOptionalFilters on the full raw text passed after the registered slash command.

Outputs

Name Type Description
slashCommandtextThe registered Slack slash command that invoked this trigger, such as `/workhub24`.
commandNametextThe first parsed token after the slash command.
argsarray of textThe remaining parsed command arguments after commandName.
teamIdtextSlack workspace team ID.
channelIdtextSlack channel ID.
channelNametextSlack channel name when provided by Slack.
userIdtextSlack user ID.
userNametextSlack username when provided by Slack.
texttextRaw text passed after the registered slash command.
triggerIdtextSlack trigger ID from the slash command payload.