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 - Real Time 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:

  1. Create your own Slack app. See Basic app setup.

  2. Set up the Slash Command for your app:

    1. In the Basic Information page for your Slack app, expand the Add features and functionality section and select Slash Commands.

    2. Click the Create New Command button.

    3. 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.

    4. 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.

    5. Add helpful information in the Short Description and Usage Hint for users of the app in your Slack workspace, then click Save.

  3. Go to the Slack Install App page and install the app for your Slack workspace.

  4. To verify that you've properly installed the app, type / symbol in your Slack client's message bar. Your installed apps are listed.

Output

Field Definition Type
Command
Slash Command Slash Command that was sent to the Slack bot String
Text User-entered content after the Slash Command String
Response URL URL for Slash Command response String
Team ID Team ID of the user who sent the Slash Command String
Team Domain User's team domain name String
Channel ID ID of the channel where the Slash Command was sent String
Channel Name Name of the channel where the Slash Command was sent String
User ID User's unique Slack user ID String
User Name User's Slack username String

Related topics

Slack connector

About the elements of Okta Workflows

Slack API