Send messages to a Slack channel with a single URL. No bot account, no OAuth flow, no permission scopes to configure. Incoming Webhooks are the simplest Slack integration -- you get a URL, you POST JSON to it, the message appears in the channel.
This is different from a Slack Bot Token, which authenticates as a bot user via the Slack API. Use a webhook when you just need one-way notifications. Use a bot token when you need to read messages, respond to commands, or post to multiple channels dynamically.
Quick Setup
- Go to api.slack.com/apps and click Create New App
- Select From scratch, give it a name (e.g. "Backup Alerts"), and pick your workspace
- In the left sidebar, click Incoming Webhooks
- Toggle Activate Incoming Webhooks to On
- Click Add New Webhook to Workspace at the bottom
- Select the channel you want notifications posted to and click Allow
- Copy the webhook URL -- it looks like:
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
That URL is all you need. No further configuration required.
Using with Shoutrrr
Shoutrrr (used in the backup stack and other Docker notification tools) expects the webhook URL in its own format. Convert by stripping the base URL and prefixing with slack://:
# Slack gives you:
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
# Shoutrrr wants:
slack://T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
The three path segments after /services/ map directly to token-a/token-b/token-c.
In your .env file:
NOTIFICATION_URLS=slack://T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
Testing
Send a test message with curl:
curl -X POST -H 'Content-type: application/json' \
--data '{"text":"Test notification from backup stack"}' \
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
You should see the message appear in your selected channel immediately. If you get invalid_payload, check that the JSON is valid and the text field is present.
Configuration Notes
- Each webhook is locked to a single channel. To post to multiple channels, create multiple webhooks.
- Webhooks support Slack's Block Kit for rich formatting -- send a
blocksarray in the JSON payload instead of plaintext. - The webhook URL is a secret. Anyone with it can post to your channel. Treat it like a password.
- Webhooks don't expire, but they stop working if the Slack app is uninstalled or the channel is deleted.
- If you need to revoke access, go to your app's Incoming Webhooks page and remove the webhook URL. No need to delete the entire app.