| title | Slack Channel |
|---|---|
| description | Slack incoming webhook and Bot API notification setup. |
Slack is an outgoing notification channel.
IncidentRelay supports two Slack delivery modes:
- Incoming webhook mode for one-way notifications.
- Bot API mode with interactive
AcknowledgeandResolvebuttons and message updates.
Bot API interactive actions can be received in two ways:
- HTTP Request URL with a signing secret;
- Socket Mode through an outbound WebSocket connection with an app-level token.
Bot API mode is recommended when responders should manage alerts directly from Slack.
Use this mode when you only need to send notifications.
Create an incoming webhook in Slack and configure the channel with:
{
"mode": "webhook",
"webhook_url": "https://hooks.slack.com/services/..."
}Incoming webhook messages cannot be updated by IncidentRelay after an alert is acknowledged or resolved.
Bot API mode supports:
- sending alert notifications with Block Kit;
AcknowledgeandResolvebuttons;- updating the original Slack message after ACK or resolve;
- removing actions after the alert is resolved;
- optional attribution to an IncidentRelay user.
HTTP actions configuration:
{
"mode": "bot_api",
"connection_mode": "http",
"bot_token": "xoxb-...",
"channel_id": "C0123456789",
"signing_secret": "..."
}Socket Mode configuration:
{
"mode": "bot_api",
"connection_mode": "socket_mode",
"bot_token": "xoxb-...",
"app_token": "xapp-...",
"channel_id": "C0123456789"
}-
Open the Slack app management page.
-
Create a new app for the target workspace.
-
Open OAuth & Permissions.
-
Add the bot token scope:
chat:write -
Install or reinstall the app in the workspace.
-
Copy the Bot User OAuth Token. It normally starts with
xoxb-. -
Invite the bot to the Slack channel that will receive IncidentRelay alerts.
IncidentRelay uses chat.postMessage to send messages and chat.update to update existing messages.
Use HTTP mode when Slack can reach IncidentRelay over public HTTPS.
Open Interactivity & Shortcuts in the Slack app settings and enable interactivity.
Set the Request URL to:
https://incidentrelay.example.com/api/integrations/slack/actions
Replace https://incidentrelay.example.com with the configured IncidentRelay public URL.
IncidentRelay validates every interaction using:
X-Slack-Signature;X-Slack-Request-Timestamp;- the Slack app signing secret.
Requests older than five minutes are rejected.
Open Basic Information in the Slack app settings and find App Credentials.
Copy the Signing Secret into the IncidentRelay Slack channel configuration.
Do not use the old Slack verification token. IncidentRelay validates signed requests using the signing secret.
Socket Mode is recommended for private networks, NAT and firewall-restricted installations. IncidentRelay opens an outbound WebSocket connection to Slack, so no public Request URL or public_base_url is required for the action buttons.
In the Slack app settings:
- Open Settings → Socket Mode and enable Socket Mode.
- Open Basic Information → App-Level Tokens.
- Generate a token with the
connections:writescope. - Copy the token beginning with
xapp-. - Keep Interactivity & Shortcuts enabled; no Request URL is needed in Socket Mode.
In IncidentRelay select Bot API → Socket Mode and enter the bot token, app-level token and Slack channel ID.
The Slack worker must be running. Docker Compose includes incidentrelay-slack. For systemd:
sudo cp etc/systemd/incidentrelay-slack-worker.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now incidentrelay-slack-workerCheck status:
systemctl status incidentrelay-slack-worker
journalctl -u incidentrelay-slack-worker -fOne Socket Mode connection is opened for each distinct app-level token. Multiple IncidentRelay Slack channels may share the same Slack app and app-level token.
Open the target Slack channel and copy its channel ID.
Use the ID, such as:
C0123456789
Do not enter the channel display name.
The bot must be able to post to the configured channel.
In IncidentRelay:
- Open Channels.
- Create or edit a Slack channel.
- Select Bot API.
- Enter the Bot token and Channel ID.
- Select the interactive action connection:
- HTTP Request URL and enter the Signing Secret; or
- Socket Mode and enter the App-Level Token.
- Save the channel.
- Attach the channel to the required route.
- Send a test notification or a real test alert.
For HTTP interactive actions, ensure Slack can reach POST /api/integrations/slack/actions over public HTTPS. public_base_url is recommended for the Open alert in IncidentRelay link, but it is not used to validate or process Slack button actions. Socket Mode does not require the action endpoint to be publicly reachable.
An IncidentRelay user can have a Slack user ID in their profile.
When a responder clicks Acknowledge or Resolve, IncidentRelay reads the Slack user ID from the interaction payload and tries to match it to an active IncidentRelay user.
If no matching user exists, the action can still be processed, but it will not be attributed to a local user.
For a firing alert, the Slack message contains:
- alert title and description;
- status, severity and priority;
- team, service and assignee;
- service links and runbooks when configured;
- a link to the alert in IncidentRelay;
AcknowledgeandResolvebuttons.
After acknowledgment:
- the original message is updated;
- the status changes to acknowledged;
- the
Acknowledgebutton is removed; - the
Resolvebutton remains.
After resolution:
- the original message is updated;
- the status changes to resolved;
- all action buttons are removed.
Incoming webhook mode only sends messages and does not support these updates.
The channel test verifies that IncidentRelay can send a message using the configured Slack credentials.
It does not prove that:
- the channel is attached to the correct route;
- route matchers accept a real alert;
- severity filters allow the alert;
- Slack can reach the interactive actions endpoint.
Use a real test alert to verify the complete workflow.
Check that:
- the token starts with
xoxb-; - the app is installed in the correct workspace;
- the token has not been revoked;
- the app was reinstalled after changing scopes.
Invite the bot to the configured Slack channel.
For both transports, check that Bot API mode is selected and Interactivity & Shortcuts is enabled in the Slack app.
For HTTP actions, also check that:
- the Request URL points to
/api/integrations/slack/actions; - the IncidentRelay endpoint is publicly reachable over HTTPS;
- the signing secret matches the Slack app;
- reverse proxies preserve the raw request body and Slack signature headers.
For Socket Mode, also check that:
- Socket Mode is enabled;
- the app-level token starts with
xapp-and hasconnections:write; - the Slack worker is running and has outbound HTTPS/WebSocket access.
Slack interaction requests older than five minutes are rejected.
Check system time synchronization on the IncidentRelay server and reverse proxy.
The Slack channel ID in the interaction must match the Channel ID configured in IncidentRelay.
Check that the notification was sent to the expected Slack channel and that the IncidentRelay channel configuration has not been changed.
Message updates require Bot API mode.
Check that the original delivery stored both:
- the Slack channel ID;
- the Slack message timestamp.
Incoming webhook deliveries cannot be updated.
- Keep the bot token, app-level token and signing secret private.
- Do not include these values in logs, screenshots or support requests.
- Rotate any exposed bot token, app-level token or signing secret.
- Expose only the required IncidentRelay HTTPS endpoints.
- Keep server time synchronized so timestamp validation works correctly.
Check that:
- the Slack channel is enabled;
connection_modeissocket_mode;- the app token starts with
xapp-; - the app token has
connections:write; - Socket Mode is enabled in the Slack app;
- the Slack worker service or container is running;
- outbound HTTPS and WebSocket connections to Slack are allowed.
The Socket Mode worker uses the slack logging role and writes JSON logs to a separate file. Configure the path in incidentrelay.conf:
[logging]
slack_worker_file = /var/log/incidentrelay/incidentrelay-slack-worker.logThe file contains oncall.slack, oncall.slack.socket, and worker-level oncall.error events. The packaged logrotate rule already covers this file through /var/log/incidentrelay/*.log.
For systemd installations:
tail -f /var/log/incidentrelay/incidentrelay-slack-worker.log
journalctl -u incidentrelay-slack-worker -fFor Docker Compose:
docker compose exec incidentrelay-slack \
tail -f /var/log/incidentrelay/incidentrelay-slack-worker.log