Slash Command
Trigger a flow when someone sends a slash command to a Slack bot.
Slash commands are submitted in the message box in Slack, though they are technically not messages. They cause a payload of data to be sent from Slack to an app. For additional information, view the Slack API documentation.
This event should be paired with Respond to Command actions.
Output
Field | Definition | Type |
---|---|---|
Command | ||
Slash Command | command that was sent to the Slack bot | String |
Text | user-entered content after the command | String |
Response URL | URL for command response | String |
Team ID | team ID of the user who sent the command | String |
Team Domain | user's team domain name | String |
Channel ID | ID of the channel where the command was sent | String |
Channel Name | name of the channel where the command was sent | String |
User ID | user's unique Slack user ID | String |
User Name | user's Slack username | String |
Add Slash apps to your Slack workspace
To use the Slash 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 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.