Slash Command
Trigger a flow when someone enters a pre-defined Slash Command in a Slack channel.
This event should be paired with the Respond to Command - Real Time or Respond to Command - Delayed action cards.
Once you've configured Slash Commands in your Slack app, when you enter a Slash Command in a Slack channel, a payload of data will be sent from your Slack app to the target URL. This should be the invoke URL of the flow that contains the Slash Command card. Click the Webhook settings icon at the bottom of the card to get the URL string. For additional information, view the Slack API documentation.
Add Slash apps to your Slack workspace
To use the Slash Command event card, you must perform these steps:
-
Create your own Slack app. See Basic app setup.
-
Set up the Slash Command for your app:
-
In the Basic Information page for your Slack app, expand the Add features and functionality section and select Slash Commands.
-
Click the Create New Command button.
-
In the Command field, add a Slash Command for the new app. Any user in your Slack workspace will be able to invoke the app using this Slash Command.
-
In the Request URL field, add the URL for the flow that you want to trigger with the Slash Command card. To find the API access URL for invoke your flow, see Invoke a flow with an API endpoint.
-
Add helpful information in the Short Description and Usage Hint for users of the app in your Slack workspace, then click Save.
-
-
Go to the Slack Install App page and install the app for your Slack workspace.
-
To verify that you've properly installed the app, type / symbol in your Slack client's message bar. Your installed apps are listed.
Options
Field | Definition | Type | Required |
---|---|---|---|
Use Signing Key? | Whether to verify requests from Slack. If Yes is selected, Slack signs its requests using a secret that is unique to the customers app. The connector uses the signature to verify that the request is from Slack to the target URL. |
True/False |
TRUE |
Signing Key | Secret value that is unique to your app. Obtain this value from the Slack app management console.
If Use Signing Key? is set to Yes, this key is used to verify requests from Slack, otherwise No. |
Text |
TRUE |
Output
Field | Definition | Type |
---|---|---|
Command |
||
Slash Command | Slash Command that was sent to the Slack bot. |
Text |
Text | User-entered content after the Slash Command. |
Text |
Response URL | URL for Slash Command response. |
Text |
Team ID | Team ID of the user who sent the Slash Command. |
Text |
Team Domain | User's team domain name. |
Text |
Channel ID | ID of the channel where the Slash Command was sent. |
Text |
Channel Name | Name of the channel where the Slash Command was sent. |
Text |
User ID |
Unique identifier of the user. |
Text |
User Name | User's Slack username. |
Text |