Workflow blocks
Slack Slash Command
Trigger workflow when someone runs a Slack slash command
trigger/slack-slash-command — Trigger workflow when someone runs a Slack slash command.
Where it appears
The Slack Slash Command block is a trigger — it starts a workflow. Add it from the Triggers group in the Workflow Builder.
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
webhookUrl | text | No | — | Paste this into the Request URL of your slash command (Slack app settings → Slash Commands). The Slack connection above must hold that app's Signing Secret. |
ackMessage | text | No | Working on it… | Shown right away, only to the person who ran the command, while the workflow runs. Leave blank to acknowledge silently. Use a Reply to Slack Command step to send the result. |
testInput | code | No | — | Sample slash-command fields to use when running this workflow in test mode instead of waiting for a real command. |
Inputs and outputs
Inputs are the configurable fields above. The block produces these outputs:
Outputs
Reference an output downstream with <Slack Slash Command.field>.
| Name | Type | Description |
|---|---|---|
triggered | boolean | Whether trigger fired |
timestamp | number | Trigger timestamp |
command | string | The command that was run, e.g. /blocked-items |
text | string | Everything the user typed after the command |
user_id | string | Slack ID of the user who ran it |
channel_id | string | Slack ID of the channel it was run in |
team_id | string | Slack workspace ID |
enterprise_id | string | Enterprise Grid org ID, when the workspace belongs to one |
api_app_id | string | ID of the Slack app the command belongs to |
response_url | string | Where replies go. Valid for 5 replies within 30 minutes of the command |
trigger_id | string | Slack's ID for this invocation, used to open modals |
Example
A minimal configuration for this block:
{
"type": "trigger/slack-slash-command",
"config": {
"ackMessage": "Working on it…"
}
}Limits and failure modes
- Requires a connected Slack integration. Calls fail if that integration is disconnected or its authorization has expired.