Skip to main content
Slack Interaction Payloads

Integrate Slack with Torq to trigger workflows from Slack interactions, using a custom endpoint for event notifications.

Updated over 7 months ago

Create a Slack Interaction Payloads integration in Torq to trigger Torq workflows by getting notifications of user interactions with shortcuts, modals, or interactive components (such as buttons, select menus, etc) in Slack. The integration generates a unique endpoint that can be used by Slack to send data.

Create a Slack Interaction Payloads Integration in Torq

Perform these steps in Torq.

  1. Go to Build > Integrations > Triggers > Slack Interaction Payloads, and click Add.

  2. Enter a meaningful name for the integration, such as slack-interaction-payloads, and click Add.

  3. In the table, locate the integration you created and copy the endpoint URL. You will enter this as the Request URL when subscribing to Slack interactive events.

Screenshot showing how to copy the webhook URL of the interaction payloads integration.

Subscribe to Interactive Events and Create Shortcuts in Slack

Perform these steps in Slack: https://api.slack.com/apps/.

  1. Select an existing app or click Create an App and select the option to configure it From scratch.

  2. Specify a name for your app and select the Slack workspace you want to develop the app in.

  3. Once you've created the app, go to Interactivity & Shortcuts and set Interactivity to On.

  4. Enter the Slack Interaction payloads integration endpoint you created in Torq as the Request URL.

  5. You can create shortcuts by clicking Create New Shortcut and following Slack instructions. Create global shortcuts available from anywhere in Slack or message shortcuts shown only in message context menus. The shortcuts give you the option to initiate actions from Slack.

    Screenshot showing how to configure interaction payloads in Slack.
  6. Click Save Changes and install/reinstall the app you created by going to Basic Information and clicking Install to Workspace or Reinstall to Workspace.

    Screenshot showing how to reinstall the app to your the workspace.

Interact with Slack to Trigger the Workflow

You'll create a custom block in Slack and set up a Torq workflow.

  1. Use the Slack Block Kit Builder to create a custom collection of blocks with interactive components.

  2. Copy the block payload to the Custom Slack Post Message step to send a message containing the interactive components to a channel. Make sure you invite the Slack app to the channel.

  3. To get the channel ID, right-click the channel name in Slack and select View channel details.

  4. Go to the OAuth & Permissions tab of your Slack app and copy the Bot User OAuth Token to provide it as the TOKEN parameter.

    Screenshot showing how to access and copy the Bot user OAuth token.
  5. When a user interacts with your message, the workflow is triggered, and the Slack Interaction Payloads trigger receives the event. Go to the trigger Event Log tab to view it.

Screenshot showing how and where to use the Bot user OAuth token in a Torq step.

Screenshot showing the event log for the workflow in Torq.

Did this answer your question?