Slack Integration
Dispatch integrates with Slack as both a source (receive Slack events) and a destination (post messages to Slack channels).
Slack as a Source
Connecting
- Navigate to your project's Sources page
- Click Add Source and choose Slack from the integrations list
- Authorize the Dispatch Slack app for your workspace
- Select a channel to receive events from
Dispatch will:
- Create a webhook endpoint with
provider = "slack" - Subscribe to events from the selected channel
Slack URL Verification
When Slack sends a URL verification challenge, Dispatch handles it automatically:
// Slack sends:
{
"type": "url_verification",
"challenge": "abc123"
}
// Dispatch responds:
{
"challenge": "abc123"
}
No event is created for verification requests.
Signature Verification
Slack webhooks use the X-Slack-Signature header with the format:
v0=HMAC-SHA256(signing_secret, "v0:{timestamp}:{body}")
The X-Slack-Request-Timestamp header must be within 5 minutes of the current time. Dispatch verifies this automatically.
Supported Slack Events
Dispatch auto-formats the following Slack event types:
| Event | Description |
|---|---|
message | Message posted in a channel |
reaction_added / reaction_removed | Emoji reaction changes |
channel_created / channel_archive / channel_unarchive | Channel lifecycle |
member_joined_channel / member_left_channel | Channel membership changes |
pin_added / pin_removed | Pinned message changes |
file_shared / file_created | File uploads |
emoji_changed | Custom emoji additions/removals |
team_join | New member joined workspace |
app_mention | Bot mentioned in a channel |
Slack as a Destination
Connecting
- Navigate to your project's Destinations page (or the Destination step of Connect)
- Click Add Destination and choose Slack
- Authorize the Dispatch Slack app
- Select a channel to post messages to
Dispatch will:
- Create a destination with
type = "slack" - Store the bot token (encrypted at rest)
- Use the Slack API to post messages to the selected channel
Message Format
When delivering to Slack, Dispatch formats messages as Slack attachments:
{
"text": "New event received",
"username": "Dispatch",
"attachments": [
{
"color": "#08788A",
"title": "push",
"text": "3 commits pushed to main",
"fields": [
{
"title": "Repository",
"value": "owner/repo",
"short": true
}
],
"footer": "Dispatch",
"ts": 1710432000
}
]
}
Disconnecting
- A Slack source: on the Sources page, click the unplug icon on the source, then click Disconnect to confirm. Dispatch deletes the source (a source that still has stored events is archived instead, keeping them).
- A Slack destination: on the Destinations page, click the trash icon on the destination, then click Delete or archive. A destination with delivery history is archived instead of deleted.
- The Slack connection: on the Sources page, click Add Source, choose Slack, click Disconnect next to your workspace, and confirm. This removes the project's shared Slack connection; your Slack sources aren't deleted. To remove the Dispatch app from your workspace entirely, uninstall it from your Slack workspace's Manage apps page.