Unified.to
Blog

How to set up Slack webhooks using event subscriptions


November 14, 2024

This guide explains how to configure your Slack app's event subscriptions to work with Unified.to webhooks. This is a required step before you can create webhooks that listen for Slack events. Once configured, your webhooks will receive real-time notifications when specific events occur in your Slack workspace, such as when users send messages.

Before you begin

Ensure you have:

Enable event subscriptions in Slack

  1. Go to the Slack API dashboard at https://api.slack.com/apps
  2. Select your app from the list of available apps
  3. In the left sidebar, under Features, click Event Subscriptions
  4. Toggle the Enable Events switch to On
  5. In the Request URL field, enter (depending on your data center):
    1. (US data center) https://api.unified.to/webhook/workspace/slack
    2. (EU data center) https://api-eu.unified.to/webhook/workspace/slack
  6. Wait for Slack to verify the URL. You should see a green checkmark indicating successful verification.
  7. Click Save Changes at the bottom of the page

Subscribe to events from Slack

After you've enabled events and verified the request URL works, you need to subscribe to the events that you are interested in.

  1. The minimum event you should subscribe to ismessage.groups (under user)
  2. The other events you can subscribe to are the ones that fall under the following scopes under Subscribe to events on behalf of users:
    1. channels:history
    2. groups:history
    3. im:history
    4. mpim:history

      Example of Slack events that you can subscribe to for webhook events
  3. Click Save Changes at the bottom of the page

Once completed, you can create webhooks in Unified.to that will receive these Slack events in real-time.

Happy building!

See also

Blog