This guide shows you how to receive real-time Slack events in Nango using the Slack Events API. You configure Nango’s webhook URL directly in your Slack app settings, and Nango routes incoming events to the correct connection.Documentation Index
Fetch the complete documentation index at: https://nango.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
How it works
The Slack Events API delivers events via HTTP POST to a URL you register in your app. The flow is:- You register the Nango webhook URL as the Request URL in your Slack app’s Event Subscriptions settings.
- Slack sends a one-time URL verification challenge; Nango responds automatically.
- When a subscribed event occurs (e.g. a message is posted), Slack sends the event payload to Nango.
- Nango extracts the
team_idfrom the payload and matches the event to the correct connection, then forwards it to your app.
Setup
1. Get your webhook URL
Copy the webhook URL from your Slack integration page in the Nango dashboard, under the Webhook URL section.2. Register the URL in your Slack app
- Go to your app at api.slack.com/apps and select your app.
- In the left sidebar, click Event Subscriptions.
- Toggle Enable Events to On.
- Paste your Nango webhook URL into the Request URL field.
- Slack will immediately send a
url_verificationchallenge — Nango handles this automatically and Slack will show a green checkmark.
3. Subscribe to events
Still on the Event Subscriptions page, expand Subscribe to bot events (or Subscribe to events on behalf of users for user-scoped events) and add the events you want to receive, for example:| Event | Description |
|---|---|
message.channels | A message was posted to a public channel |
message.im | A message was posted in a DM |
channel_created | A channel was created |
team_join | A new member joined the workspace |
4. Handle forwarded webhooks
When a Slack event arrives, Nango matches it to the correct connection using theteam_id in the payload and forwards it to your system. Example structure:
If you prefer Nango to automatically run a sync when the webhook arrives (instead of forwarding it to your app), you can enable webhook processing in a sync script using
webhookSubscriptions and onWebhook.See: Real-time syncsConnection matching
Nango matches incoming Slack webhooks to a connection using theteam_id field in the event payload (falling back to team.id for some event shapes). This is set automatically when a user authorizes the Slack integration, no extra metadata is required.