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 this week

Set up a Slack Interaction Payloads integration in Torq to trigger workflows based on user interactions with Slack shortcuts, modals, and interactive components such as 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: Build > Integrations > Triggers > Slack Interaction Payloads, then click Add.

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

  2. Copy the endpoint URL.

    In the table, locate the integration you created. Hover over the endpoint URL and click the copy icon that appears.
    Use this URL as the Request URL when subscribing to Slack interactive events.

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

  1. Open the Slack API dashboard: Slack App Dashboard.

  2. Create or select an app:

    1. Select an existing app, or

    2. Click Create an App and choose From scratch.

    3. Enter an app name and select the workspace.

  3. Enable Interactivity:

    1. In the left navigation, click Interactivity & Shortcuts.

    2. Turn Interactivity to On.

  4. Enter the Request URL.

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

  5. Create a shortcut:

    1. Under Shortcuts, click Create New Shortcut.

    2. Choose either a global shortcut or a message shortcut.

    3. Complete the required Slack configuration fields.

  6. Click Save Changes.

  7. Install or reinstall the app:

    1. In the left sidebar, under Settings, click Install App.

    1. Click Install to Workspace or Reinstall to 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 specially crafted templates by Torq's security experts. Visit Torq's template library for more.

Did this answer your question?