Custom Slack events
  • 10 Feb 2023
  • 1 Minute to read
  • Dark
    Light

Custom Slack events

  • Dark
    Light

Article Summary

Create a Custom Slack Events integration in Torq to trigger Torq workflows by getting notifications of Slack events you subscribed to. The integration generates a unique endpoint that can be used by Slack to send data.

1. Create a Custom Slack Events integration in Torq

Perform these steps in Torq.

  1. Go to Integrations > Triggers, search for the Custom Slack Events card, and click Add.
  2. Enter a meaningful name for the integration, such as custom-slack-events, and click Add.
  3. In the table, locate the integration you just created and copy the endpoint URL. You will enter this as the Request URL when you subscribe to events in Slack.

Screenshot of copying the webhook URL for the custom events integration.

2. Subscribe to a list of events in Slack

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

  1. Select an existing app or click Create an App and select 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. After you create the app, go to Event Subscriptions and set Enable Events to On.
  4. Enter the Custom Slack Events integration endpoint you created in Torq as the Request URL.
    Screenshot of configuring the webhook and event subscriptions.
  5. Subscribe to events.
    1. Bot eventsScreenshot showing how to subscribe to bot events.
    2. User eventsScreenshot showing how to subscribe to user events.
    3. Domain links postedScreenshot showing how to subscribe to domain link events.
  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 workspace.

3. Create a workflow

Create a Torq workflow that's triggered by a Slack custom event.

  1. Go to Workflows and click Create Workflow.
  2. Specify a name for your workflow and pick the Integration trigger.
  3. Select the trigger integration type as Custom Slack Events and then select the integration you created.
  4. Add functionality to the workflow you created.

4. Execute an event in Slack to trigger the workflow

Trigger the workflow from Slack and view the event in Torq.

  1. In Slack, execute an event you subscribed to. The workflow should start running automatically.
  2. Go to your Torq workflow and make sure the trigger got an event and your workflow was executed.

Screenshot of viewing the event log in Torq.


Available templates


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.