StyloDocs
Workflow blocks

Slack Slash Command

Trigger workflow when someone runs a Slack slash command

View as Markdown

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

FieldTypeRequiredDefaultDescription
webhookUrltextNo—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.
ackMessagetextNoWorking 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.
testInputcodeNo—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>.

NameTypeDescription
triggeredbooleanWhether trigger fired
timestampnumberTrigger timestamp
commandstringThe command that was run, e.g. /blocked-items
textstringEverything the user typed after the command
user_idstringSlack ID of the user who ran it
channel_idstringSlack ID of the channel it was run in
team_idstringSlack workspace ID
enterprise_idstringEnterprise Grid org ID, when the workspace belongs to one
api_app_idstringID of the Slack app the command belongs to
response_urlstringWhere replies go. Valid for 5 replies within 30 minutes of the command
trigger_idstringSlack'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.

On this page