Skip to main content

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​

  1. Navigate to your project's Sources page
  2. Click Add Source and choose Slack from the integrations list
  3. Authorize the Dispatch Slack app for your workspace
  4. 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:

EventDescription
messageMessage posted in a channel
reaction_added / reaction_removedEmoji reaction changes
channel_created / channel_archive / channel_unarchiveChannel lifecycle
member_joined_channel / member_left_channelChannel membership changes
pin_added / pin_removedPinned message changes
file_shared / file_createdFile uploads
emoji_changedCustom emoji additions/removals
team_joinNew member joined workspace
app_mentionBot mentioned in a channel

Slack as a Destination​

Connecting​

  1. Navigate to your project's Destinations page (or the Destination step of Connect)
  2. Click Add Destination and choose Slack
  3. Authorize the Dispatch Slack app
  4. 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.