diff --git a/docs/channels/slack.md b/docs/channels/slack.md index e30ba835324..7ef96b71f1f 100644 --- a/docs/channels/slack.md +++ b/docs/channels/slack.md @@ -514,7 +514,7 @@ Current Slack message actions include `send`, `upload-file`, `download-file`, `r - `allowlist` - `disabled` - Channel allowlist lives under `channels.slack.channels` and should use stable channel IDs. + Channel allowlist lives under `channels.slack.channels` and **must use stable Slack channel IDs** (for example `C12345678`) as config keys. Runtime note: if `channels.slack` is completely missing (env-only setup), runtime falls back to `groupPolicy="allowlist"` and logs a warning (even if `channels.defaults.groupPolicy` is set). @@ -524,6 +524,42 @@ Current Slack message actions include `send`, `upload-file`, `download-file`, `r - unresolved channel-name entries are kept as configured but ignored for routing by default - inbound authorization and channel routing are ID-first by default; direct username/slug matching requires `channels.slack.dangerouslyAllowNameMatching: true` + + Name-based keys (`#channel-name` or `channel-name`) do **not** match under `groupPolicy: "allowlist"`. The channel lookup is ID-first by default, so a name-based key will never route successfully and all messages in that channel will be silently blocked. This differs from `groupPolicy: "open"`, where the channel key is not required for routing and a name-based key appears to work. + + Always use the Slack channel ID as the key. To find it: right-click the channel in Slack → **Copy link** — the ID (`C...`) appears at the end of the URL. + + Correct: + + ```json5 + { + channels: { + slack: { + groupPolicy: "allowlist", + channels: { + C12345678: { allow: true, requireMention: true }, + }, + }, + }, + } + ``` + + Incorrect (silently blocked under `groupPolicy: "allowlist"`): + + ```json5 + { + channels: { + slack: { + groupPolicy: "allowlist", + channels: { + "#eng-my-channel": { allow: true, requireMention: true }, + }, + }, + }, + } + ``` + + @@ -852,7 +888,7 @@ Primary reference: [Configuration reference - Slack](/gateway/config-channels#sl Check, in order: - `groupPolicy` - - channel allowlist (`channels.slack.channels`) + - channel allowlist (`channels.slack.channels`) — **keys must be channel IDs** (`C12345678`), not names (`#channel-name`). Name-based keys silently fail under `groupPolicy: "allowlist"` because channel routing is ID-first by default. To find an ID: right-click the channel in Slack → **Copy link** — the `C...` value at the end of the URL is the channel ID. - `requireMention` - per-channel `users` allowlist