docs(slack): warn that groupPolicy allowlist requires channel IDs not names (#53112)

This commit is contained in:
Michael Marr
2026-04-29 17:36:38 -04:00
committed by GitHub
parent f0f1635f9f
commit aaf4cc6862

View File

@@ -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`
<Warning>
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 },
},
},
},
}
```
</Warning>
</Tab>
<Tab title="Mentions and channel users">
@@ -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