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 3 weeks ago

Set up a Slack Interaction Payloads integration in Torq to trigger workflows based on user interactions with Slack shortcuts, modals, or interactive components like buttons and select menus. Torq generates a unique endpoint, which Slack uses to send data and trigger workflows.

Trigger Torq Workflows from Slack Interaction Payloads

Step One: Create a Slack Interaction Payloads Integration in Torq

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

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

  2. Copy URL: In the table, locate the integration you created and copy the endpoint URL. Use this as the Request URL when subscribing to Slack interactive events.

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

Step Two: Subscribe to Interactive Events and Create Shortcuts in Slack

  1. Access Slack Apps: Visit the Slack App Dashboard.

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

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

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

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

  5. Create Shortcuts: Under Shortcuts, click Create New Shortcut and follow Slack's instructions to configure global (available from anywhere in Slack) or message-specific shortcuts (shown only in message context menus).

    Screenshot showing how to configure interaction payloads in Slack.
  6. Finalize: 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.

Step Three: Interact with Slack to Trigger the Torq Workflow

  1. Build a Block: Use Slack's Block Kit Builder to create a custom collection of blocks with interactive components.

  2. Build the Step: Copy the block payload to the Custom Slack Post Message step to send a message containing the interactive components to a channel.

    1. Make sure you invite the Slack app to the channel.

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

  3. Get Token: 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.
    1. For convenience, save the token as a Custom Secret.

  4. Trigger Workflow: When a user interacts with your message, the workflow triggers. To view the trigger event log, go to the trigger Event Log tab.


FAQs


Templates

Now that you've added your integration check out these templates specially crafted by Torq's security experts. Visit Torq's template library for more.

Did this answer your question?