2026-01-05 22:13:21 +01:00
---
2026-02-11 12:49:10 -05:00
summary: "Slack setup and runtime behavior (Socket Mode + HTTP Events API)"
read_when:
- Setting up Slack or debugging Slack socket/HTTP mode
2026-01-31 16:04:03 -05:00
title: "Slack"
2026-01-05 22:13:21 +01:00
---
2026-01-18 15:01:04 +00:00
# Slack
2026-01-03 23:12:11 -06:00
2026-02-11 12:49:10 -05:00
Status: production-ready for DMs + channels via Slack app integrations. Default mode is Socket Mode; HTTP Events API mode is also supported.
2026-01-18 15:01:04 +00:00
2026-02-11 12:49:10 -05:00
< CardGroup cols = {3} >
< Card title = "Pairing" icon = "link" href = "/channels/pairing" >
Slack DMs default to pairing mode.
< / Card >
< Card title = "Slash commands" icon = "terminal" href = "/tools/slash-commands" >
Native command behavior and command catalog.
< / Card >
< Card title = "Channel troubleshooting" icon = "wrench" href = "/channels/troubleshooting" >
Cross-channel diagnostics and repair playbooks.
< / Card >
< / CardGroup >
2026-01-31 21:13:13 +09:00
2026-02-21 11:18:29 -05:00
## Quick setup
2026-01-11 02:40:28 +01:00
2026-02-11 12:49:10 -05:00
< Tabs >
< Tab title = "Socket Mode (default)" >
< Steps >
< Step title = "Create Slack app and tokens" >
In Slack app settings:
- enable **Socket Mode**
- create **App Token** (`xapp-...` ) with `connections:write`
- install app and copy **Bot Token** (`xoxb-...` )
< / Step >
< Step title = "Configure OpenClaw" >
2026-01-31 21:13:13 +09:00
2026-01-11 02:40:28 +01:00
```json5
{
2026-01-13 06:16:43 +00:00
channels: {
slack: {
enabled: true,
2026-02-11 12:49:10 -05:00
mode: "socket",
2026-01-13 06:16:43 +00:00
appToken: "xapp-...",
2026-01-31 21:13:13 +09:00
botToken: "xoxb-...",
},
},
2026-01-11 02:40:28 +01:00
}
```
2026-02-11 12:49:10 -05:00
Env fallback (default account only):
2026-01-03 23:12:11 -06:00
2026-02-11 12:49:10 -05:00
```bash
SLACK_APP_TOKEN=xapp-...
SLACK_BOT_TOKEN=xoxb-...
```
2026-01-03 23:12:11 -06:00
2026-02-11 12:49:10 -05:00
< / Step >
2026-01-08 01:18:37 +01:00
2026-02-11 12:49:10 -05:00
< Step title = "Subscribe app events" >
Subscribe bot events for:
2026-01-11 02:40:28 +01:00
2026-02-11 12:49:10 -05:00
- `app_mention`
- `message.channels` , `message.groups` , `message.im` , `message.mpim`
- `reaction_added` , `reaction_removed`
- `member_joined_channel` , `member_left_channel`
- `channel_rename`
- `pin_added` , `pin_removed`
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
Also enable App Home **Messages Tab** for DMs.
< / Step >
2026-01-11 02:40:28 +01:00
2026-02-11 12:49:10 -05:00
< Step title = "Start gateway" >
2026-01-11 02:40:28 +01:00
2026-02-11 12:49:10 -05:00
```bash
openclaw gateway
2026-01-11 02:40:28 +01:00
```
2026-02-11 12:49:10 -05:00
< / Step >
< / Steps >
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
< / Tab >
2026-01-10 18:53:38 +01:00
2026-02-11 12:49:10 -05:00
< Tab title = "HTTP Events API mode" >
< Steps >
< Step title = "Configure Slack app for HTTP" >
2026-01-15 01:41:11 +00:00
2026-02-11 12:49:10 -05:00
- set mode to HTTP (`channels.slack.mode="http"` )
- copy Slack **Signing Secret**
- set Event Subscriptions + Interactivity + Slash command Request URL to the same webhook path (default `/slack/events` )
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
< / Step >
2026-01-15 01:41:11 +00:00
2026-02-11 12:49:10 -05:00
< Step title = "Configure OpenClaw HTTP mode" >
2026-01-31 21:13:13 +09:00
2026-01-15 01:41:11 +00:00
```json5
{
feat(slack): add userToken for read-only access to DMs and private channels (#981)
- Add userToken and userTokenReadOnly (default: true) config fields
- Implement token routing: reads prefer user token, writes use bot token
- Add tests for token routing logic
- Update documentation with required OAuth scopes
User tokens enable reading DMs and private channels without requiring
bot membership. The userTokenReadOnly flag (true by default) ensures
the user token can only be used for reads, preventing accidental
sends as the user.
Required user token scopes:
- channels:history, channels:read
- groups:history, groups:read
- im:history, im:read
- mpim:history, mpim:read
- users:read, reactions:read, pins:read, emoji:read, search:read
2026-01-15 16:11:33 -08:00
channels: {
slack: {
enabled: true,
2026-02-11 12:49:10 -05:00
mode: "http",
feat(slack): add userToken for read-only access to DMs and private channels (#981)
- Add userToken and userTokenReadOnly (default: true) config fields
- Implement token routing: reads prefer user token, writes use bot token
- Add tests for token routing logic
- Update documentation with required OAuth scopes
User tokens enable reading DMs and private channels without requiring
bot membership. The userTokenReadOnly flag (true by default) ensures
the user token can only be used for reads, preventing accidental
sends as the user.
Required user token scopes:
- channels:history, channels:read
- groups:history, groups:read
- im:history, im:read
- mpim:history, mpim:read
- users:read, reactions:read, pins:read, emoji:read, search:read
2026-01-15 16:11:33 -08:00
botToken: "xoxb-...",
2026-02-11 12:49:10 -05:00
signingSecret: "your-signing-secret",
webhookPath: "/slack/events",
2026-01-31 21:13:13 +09:00
},
},
2026-01-15 01:41:11 +00:00
}
```
2026-02-11 12:49:10 -05:00
< / Step >
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
< Step title = "Use unique webhook paths for multi-account HTTP" >
Per-account HTTP mode is supported.
feat(slack): add userToken for read-only access to DMs and private channels (#981)
- Add userToken and userTokenReadOnly (default: true) config fields
- Implement token routing: reads prefer user token, writes use bot token
- Add tests for token routing logic
- Update documentation with required OAuth scopes
User tokens enable reading DMs and private channels without requiring
bot membership. The userTokenReadOnly flag (true by default) ensures
the user token can only be used for reads, preventing accidental
sends as the user.
Required user token scopes:
- channels:history, channels:read
- groups:history, groups:read
- im:history, im:read
- mpim:history, mpim:read
- users:read, reactions:read, pins:read, emoji:read, search:read
2026-01-15 16:11:33 -08:00
2026-02-11 12:49:10 -05:00
Give each account a distinct `webhookPath` so registrations do not collide.
< / Step >
< / Steps >
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
< / Tab >
< / Tabs >
feat(slack): add userToken for read-only access to DMs and private channels (#981)
- Add userToken and userTokenReadOnly (default: true) config fields
- Implement token routing: reads prefer user token, writes use bot token
- Add tests for token routing logic
- Update documentation with required OAuth scopes
User tokens enable reading DMs and private channels without requiring
bot membership. The userTokenReadOnly flag (true by default) ensures
the user token can only be used for reads, preventing accidental
sends as the user.
Required user token scopes:
- channels:history, channels:read
- groups:history, groups:read
- im:history, im:read
- mpim:history, mpim:read
- users:read, reactions:read, pins:read, emoji:read, search:read
2026-01-15 16:11:33 -08:00
2026-02-11 12:49:10 -05:00
## Token model
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
- `botToken` + `appToken` are required for Socket Mode.
- HTTP mode requires `botToken` + `signingSecret` .
- Config tokens override env fallback.
- `SLACK_BOT_TOKEN` / `SLACK_APP_TOKEN` env fallback applies only to the default account.
- `userToken` (`xoxp-...` ) is config-only (no env fallback) and defaults to read-only behavior (`userTokenReadOnly: true` ).
2026-02-14 16:08:51 +01:00
- Optional: add `chat:write.customize` if you want outgoing messages to use the active agent identity (custom `username` and icon). `icon_emoji` uses `:emoji_name:` syntax.
2026-01-18 15:01:04 +00:00
2026-02-11 12:49:10 -05:00
< Tip >
For actions/directory reads, user token can be preferred when configured. For writes, bot token remains preferred; user-token writes are only allowed when `userTokenReadOnly: false` and bot token is unavailable.
< / Tip >
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
## Access control and routing
2026-01-18 15:01:04 +00:00
2026-02-11 12:49:10 -05:00
< Tabs >
< Tab title = "DM policy" >
2026-02-14 20:32:22 +01:00
`channels.slack.dmPolicy` controls DM access (legacy: `channels.slack.dm.policy` ):
2026-01-18 15:01:04 +00:00
2026-02-11 12:49:10 -05:00
- `pairing` (default)
- `allowlist`
2026-02-14 20:32:22 +01:00
- `open` (requires `channels.slack.allowFrom` to include `"*"` ; legacy: `channels.slack.dm.allowFrom` )
2026-02-11 12:49:10 -05:00
- `disabled`
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
DM flags:
- `dm.enabled` (default true)
2026-02-14 20:32:22 +01:00
- `channels.slack.allowFrom` (preferred)
- `dm.allowFrom` (legacy)
2026-02-11 12:49:10 -05:00
- `dm.groupEnabled` (group DMs default false)
- `dm.groupChannels` (optional MPIM allowlist)
2026-01-18 15:01:04 +00:00
2026-02-11 12:49:10 -05:00
Pairing in DMs uses `openclaw pairing approve slack <code>` .
2026-01-18 15:01:04 +00:00
2026-02-11 12:49:10 -05:00
< / Tab >
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
< Tab title = "Channel policy" >
`channels.slack.groupPolicy` controls channel handling:
- `open`
- `allowlist`
- `disabled`
Channel allowlist lives under `channels.slack.channels` .
2026-02-22 12:17:44 +01:00
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).
2026-02-11 12:49:10 -05:00
Name/ID resolution:
- channel allowlist entries and DM allowlist entries are resolved at startup when token access allows
- unresolved entries are kept as configured
2026-02-24 01:01:51 +00:00
- inbound authorization matching is ID-first by default; direct username/slug matching requires `channels.slack.dangerouslyAllowNameMatching: true`
2026-02-11 12:49:10 -05:00
< / Tab >
< Tab title = "Mentions and channel users" >
Channel messages are mention-gated by default.
Mention sources:
- explicit app mention (`<@botId>` )
- mention regex patterns (`agents.list[].groupChat.mentionPatterns` , fallback `messages.groupChat.mentionPatterns` )
- implicit reply-to-bot thread behavior
Per-channel controls (`channels.slack.channels.<id|name>` ):
- `requireMention`
- `users` (allowlist)
- `allowBots`
- `skills`
- `systemPrompt`
- `tools` , `toolsBySender`
2026-02-22 21:03:09 +01:00
- `toolsBySender` key format: `id:` , `e164:` , `username:` , `name:` , or `"*"` wildcard
(legacy unprefixed keys still map to `id:` only)
2026-02-11 12:49:10 -05:00
< / Tab >
< / Tabs >
## Commands and slash behavior
- Native command auto-mode is **off** for Slack (`commands.native: "auto"` does not enable Slack native commands).
- Enable native Slack command handlers with `channels.slack.commands.native: true` (or global `commands.native: true` ).
- When native commands are enabled, register matching slash commands in Slack (`/<command>` names).
- If native commands are not enabled, you can run a single configured slash command via `channels.slack.slashCommand` .
2026-02-17 02:50:51 +01:00
- Native arg menus now adapt their rendering strategy:
- up to 5 options: button blocks
- 6-100 options: static select menu
- more than 100 options: external select with async option filtering when interactivity options handlers are available
- if encoded option values exceed Slack limits, the flow falls back to buttons
- For long option payloads, Slash command argument menus use a confirm dialog before dispatching a selected value.
2026-02-11 12:49:10 -05:00
Default slash command settings:
- `enabled: false`
- `name: "openclaw"`
- `sessionPrefix: "slack:slash"`
- `ephemeral: true`
Slash sessions use isolated keys:
- `agent:<agentId>:slack:slash:<userId>`
and still route command execution against the target conversation session (`CommandTargetSessionKey` ).
## Threading, sessions, and reply tags
- DMs route as `direct` ; channels as `channel` ; MPIMs as `group` .
- With default `session.dmScope=main` , Slack DMs collapse to agent main session.
- Channel sessions: `agent:<agentId>:slack:channel:<channelId>` .
- Thread replies can create thread session suffixes (`:thread:<threadTs>` ) when applicable.
- `channels.slack.thread.historyScope` default is `thread` ; `thread.inheritParent` default is `false` .
2026-02-13 13:51:04 +09:00
- `channels.slack.thread.initialHistoryLimit` controls how many existing thread messages are fetched when a new thread session starts (default `20` ; set `0` to disable).
2026-02-11 12:49:10 -05:00
Reply threading controls:
- `channels.slack.replyToMode` : `off|first|all` (default `off` )
- `channels.slack.replyToModeByChatType` : per `direct|group|channel`
- legacy fallback for direct chats: `channels.slack.dm.replyToMode`
Manual reply tags are supported:
- `[[reply_to_current]]`
- `[[reply_to:<id>]]`
fix(slack): finalize replyToMode off threading behavior (#23799)
* fix: make replyToMode 'off' actually prevent threading in Slack
Three independent bugs caused Slack replies to always create threads
even when replyToMode was set to 'off':
1. Typing indicator created threads via statusThreadTs fallback (#16868)
- resolveSlackThreadTargets fell back to messageTs for statusThreadTs
- 'is typing...' was posted as thread reply, creating a thread
- Fix: remove messageTs fallback, let statusThreadTs be undefined
2. [[reply_to_current]] tags bypassed replyToMode entirely (#16080)
- Slack dock had allowExplicitReplyTagsWhenOff: true
- Reply tags from system prompt always threaded regardless of config
- Fix: set allowExplicitReplyTagsWhenOff to false for Slack
3. Contradictory replyToMode defaults in codebase (#20827)
- monitor/provider.ts defaulted to 'all'
- accounts.ts defaulted to 'off' (matching docs)
- Fix: align provider.ts default to 'off' per documentation
Fixes: openclaw/openclaw#16868, openclaw/openclaw#16080, openclaw/openclaw#20827
* fix(slack): respect replyToMode in DMs even with typing indicator thread
When replyToMode is 'off' in DMs, replies should stay in the main
conversation even when the typing indicator creates a thread context.
Previously, when incomingThreadTs was set (from the typing indicator's
thread), replyToMode was forced to 'all', causing all replies to go
into the thread.
Now, for direct messages, the user's configured replyToMode is always
respected. For channels/groups, the existing behavior is preserved
(stay in thread if already in one).
This fix:
- Keeps the typing indicator working (statusThreadTs fallback preserved)
- Prevents DM replies from being forced into threads
- Maintains channel thread continuity
Fixes #16868
* refactor(slack): eliminate redundant resolveSlackThreadContext call
- Add isThreadReply to resolveSlackThreadTargets return value
- Remove duplicate call in dispatch.ts
- Addresses greptile review feedback with cleaner DRY approach
* docs(slack): add JSDoc to resolveSlackThreadTargets
Document return values including isThreadReply distinction between
genuine user thread replies vs bot status message thread context.
* docs(changelog): record Slack replyToMode off threading fixes
---------
Co-authored-by: James <jamesrp13@gmail.com>
Co-authored-by: theoseo <suhong.seo@gmail.com>
2026-02-22 13:27:50 -05:00
Note: `replyToMode="off"` disables **all** reply threading in Slack, including explicit `[[reply_to_*]]` tags. This differs from Telegram, where explicit tags are still honored in `"off"` mode. The difference reflects the platform threading models: Slack threads hide messages from the channel, while Telegram replies remain visible in the main chat flow.
2026-02-14 06:29:42 -06:00
2026-02-11 12:49:10 -05:00
## Media, chunking, and delivery
< AccordionGroup >
< Accordion title = "Inbound attachments" >
Slack file attachments are downloaded from Slack-hosted private URLs (token-authenticated request flow) and written to the media store when fetch succeeds and size limits permit.
Runtime inbound size cap defaults to `20MB` unless overridden by `channels.slack.mediaMaxMb` .
< / Accordion >
< Accordion title = "Outbound text and files" >
- text chunks use `channels.slack.textChunkLimit` (default 4000)
- `channels.slack.chunkMode="newline"` enables paragraph-first splitting
- file sends use Slack upload APIs and can include thread replies (`thread_ts` )
- outbound media cap follows `channels.slack.mediaMaxMb` when configured; otherwise channel sends use MIME-kind defaults from media pipeline
< / Accordion >
< Accordion title = "Delivery targets" >
Preferred explicit targets:
- `user:<id>` for DMs
- `channel:<id>` for channels
Slack DMs are opened via Slack conversation APIs when sending to user targets.
< / Accordion >
< / AccordionGroup >
## Actions and gates
Slack actions are controlled by `channels.slack.actions.*` .
Available action groups in current Slack tooling:
| Group | Default |
| ---------- | ------- |
| messages | enabled |
| reactions | enabled |
| pins | enabled |
| memberInfo | enabled |
| emojiList | enabled |
## Events and operational behavior
- Message edits/deletes/thread broadcasts are mapped into system events.
- Reaction add/remove events are mapped into system events.
- Member join/leave, channel created/renamed, and pin add/remove events are mapped into system events.
2026-02-17 19:10:51 +01:00
- Assistant thread status updates (for "is typing..." indicators in threads) use `assistant.threads.setStatus` and require bot scope `assistant:write` .
2026-02-11 12:49:10 -05:00
- `channel_id_changed` can migrate channel config keys when `configWrites` is enabled.
- Channel topic/purpose metadata is treated as untrusted context and can be injected into routing context.
2026-02-17 02:50:51 +01:00
- Block actions and modal interactions emit structured `Slack interaction: ...` system events with rich payload fields:
- block actions: selected values, labels, picker values, and `workflow_*` metadata
- modal `view_submission` and `view_closed` events with routed channel metadata and form inputs
2026-02-11 12:49:10 -05:00
2026-02-15 11:29:51 -06:00
## Ack reactions
`ackReaction` sends an acknowledgement emoji while OpenClaw is processing an inbound message.
Resolution order:
- `channels.slack.accounts.<accountId>.ackReaction`
- `channels.slack.ackReaction`
- `messages.ackReaction`
- agent identity emoji fallback (`agents.list[].identity.emoji` , else "👀")
Notes:
- Slack expects shortcodes (for example `"eyes"` ).
- Use `""` to disable the reaction for a channel or account.
2026-02-11 12:49:10 -05:00
## Manifest and scope checklist
< AccordionGroup >
< Accordion title = "Slack app manifest example" >
2026-01-03 23:12:11 -06:00
2026-01-06 23:32:12 +00:00
```json
{
"display_information": {
2026-01-30 03:15:10 +01:00
"name": "OpenClaw",
"description": "Slack connector for OpenClaw"
2026-01-06 23:32:12 +00:00
},
"features": {
"bot_user": {
2026-01-30 03:15:10 +01:00
"display_name": "OpenClaw",
2026-01-06 23:32:12 +00:00
"always_online": false
},
"app_home": {
"messages_tab_enabled": true,
"messages_tab_read_only_enabled": false
},
"slash_commands": [
{
2026-01-30 03:15:10 +01:00
"command": "/openclaw",
"description": "Send a message to OpenClaw",
2026-01-06 23:32:12 +00:00
"should_escape": false
}
]
},
"oauth_config": {
"scopes": {
"bot": [
"chat:write",
"channels:history",
"channels:read",
"groups:history",
"im:history",
"mpim:history",
"users:read",
"app_mentions:read",
2026-02-17 19:10:51 +01:00
"assistant:write",
2026-01-06 23:32:12 +00:00
"reactions:read",
"reactions:write",
"pins:read",
"pins:write",
"emoji:read",
"commands",
"files:read",
"files:write"
]
}
},
"settings": {
"socket_mode_enabled": true,
"event_subscriptions": {
"bot_events": [
"app_mention",
"message.channels",
"message.groups",
"message.im",
"message.mpim",
"reaction_added",
"reaction_removed",
"member_joined_channel",
"member_left_channel",
"channel_rename",
"pin_added",
"pin_removed"
]
}
}
}
```
2026-02-11 12:49:10 -05:00
< / Accordion >
2026-01-08 04:02:04 +01:00
2026-02-11 12:49:10 -05:00
< Accordion title = "Optional user-token scopes (read operations)" >
If you configure `channels.slack.userToken` , typical read scopes are:
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
- `channels:history` , `groups:history` , `im:history` , `mpim:history`
- `channels:read` , `groups:read` , `im:read` , `mpim:read`
- `users:read`
- `reactions:read`
- `pins:read`
- `emoji:read`
- `search:read` (if you depend on Slack search reads)
2026-01-08 16:04:52 -08:00
2026-02-11 12:49:10 -05:00
< / Accordion >
< / AccordionGroup >
2026-01-08 00:50:29 +00:00
2026-02-11 12:49:10 -05:00
## Troubleshooting
2026-01-23 05:27:50 +00:00
2026-02-11 12:49:10 -05:00
< AccordionGroup >
< Accordion title = "No replies in channels" >
Check, in order:
2026-01-23 05:27:50 +00:00
2026-02-11 12:49:10 -05:00
- `groupPolicy`
- channel allowlist (`channels.slack.channels` )
- `requireMention`
- per-channel `users` allowlist
2026-01-23 05:27:50 +00:00
2026-02-11 12:49:10 -05:00
Useful commands:
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
```bash
openclaw channels status --probe
openclaw logs --follow
openclaw doctor
2026-01-23 05:27:50 +00:00
```
2026-02-11 12:49:10 -05:00
< / Accordion >
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
< Accordion title = "DM messages ignored" >
Check:
2026-01-23 05:27:50 +00:00
2026-02-11 12:49:10 -05:00
- `channels.slack.dm.enabled`
2026-02-14 20:32:22 +01:00
- `channels.slack.dmPolicy` (or legacy `channels.slack.dm.policy` )
2026-02-11 12:49:10 -05:00
- pairing approvals / allowlist entries
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
```bash
openclaw pairing list slack
2026-01-23 05:27:50 +00:00
```
2026-01-23 07:13:23 +02:00
2026-02-11 12:49:10 -05:00
< / Accordion >
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
< Accordion title = "Socket mode not connecting" >
Validate bot + app tokens and Socket Mode enablement in Slack app settings.
< / Accordion >
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
< Accordion title = "HTTP mode not receiving events" >
Validate:
2026-01-08 00:50:29 +00:00
2026-02-11 12:49:10 -05:00
- signing secret
- webhook path
- Slack Request URLs (Events + Interactivity + Slash Commands)
- unique `webhookPath` per HTTP account
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
< / Accordion >
2026-01-06 23:32:12 +00:00
2026-02-11 12:49:10 -05:00
< Accordion title = "Native/slash commands not firing" >
Verify whether you intended:
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
- native command mode (`channels.slack.commands.native: true` ) with matching slash commands registered in Slack
- or single slash command mode (`channels.slack.slashCommand.enabled: true` )
2026-01-06 23:32:12 +00:00
2026-02-11 12:49:10 -05:00
Also check `commands.useAccessGroups` and channel/user allowlists.
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
< / Accordion >
< / AccordionGroup >
2026-01-06 23:32:12 +00:00
2026-02-05 18:14:13 -05:00
## Text streaming
2026-02-18 00:49:30 +01:00
OpenClaw supports Slack native text streaming via the Agents and AI Apps API.
2026-02-05 18:14:13 -05:00
2026-02-21 19:53:23 +01:00
`channels.slack.streaming` controls live preview behavior:
- `off` : disable live preview streaming.
- `partial` (default): replace preview text with the latest partial output.
- `block` : append chunked preview updates.
- `progress` : show progress status text while generating, then send final text.
`channels.slack.nativeStreaming` controls Slack's native streaming API (`chat.startStream` / `chat.appendStream` / `chat.stopStream` ) when `streaming` is `partial` (default: `true` ).
Disable native Slack streaming (keep draft preview behavior):
2026-02-05 18:14:13 -05:00
```yaml
channels:
slack:
2026-02-21 19:53:23 +01:00
streaming: partial
nativeStreaming: false
2026-02-05 18:14:13 -05:00
```
2026-02-21 19:53:23 +01:00
Legacy keys:
- `channels.slack.streamMode` (`replace | status_final | append` ) is auto-migrated to `channels.slack.streaming` .
- boolean `channels.slack.streaming` is auto-migrated to `channels.slack.nativeStreaming` .
2026-02-05 18:14:13 -05:00
### Requirements
2026-02-18 00:49:30 +01:00
1. Enable **Agents and AI Apps** in your Slack app settings.
2. Ensure the app has the `assistant:write` scope.
3. A reply thread must be available for that message. Thread selection still follows `replyToMode` .
2026-02-05 18:14:13 -05:00
### Behavior
2026-02-18 00:49:30 +01:00
- First text chunk starts a stream (`chat.startStream` ).
- Later text chunks append to the same stream (`chat.appendStream` ).
- End of reply finalizes stream (`chat.stopStream` ).
- Media and non-text payloads fall back to normal delivery.
- If streaming fails mid-reply, OpenClaw falls back to normal delivery for remaining payloads.
2026-02-21 11:18:29 -05:00
## Configuration reference pointers
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
Primary reference:
2026-02-07 10:28:19 -05:00
2026-02-11 12:49:10 -05:00
- [Configuration reference - Slack ](/gateway/configuration-reference#slack )
2026-02-07 10:28:19 -05:00
2026-02-15 03:48:40 +01:00
High-signal Slack fields:
- mode/auth: `mode` , `botToken` , `appToken` , `signingSecret` , `webhookPath` , `accounts.*`
- DM access: `dm.enabled` , `dmPolicy` , `allowFrom` (legacy: `dm.policy` , `dm.allowFrom` ), `dm.groupEnabled` , `dm.groupChannels`
2026-02-24 01:01:51 +00:00
- compatibility toggle: `dangerouslyAllowNameMatching` (break-glass; keep off unless needed)
2026-02-15 03:48:40 +01:00
- channel access: `groupPolicy` , `channels.*` , `channels.*.users` , `channels.*.requireMention`
- threading/history: `replyToMode` , `replyToModeByChatType` , `thread.*` , `historyLimit` , `dmHistoryLimit` , `dms.*.historyLimit`
2026-02-21 19:53:23 +01:00
- delivery: `textChunkLimit` , `chunkMode` , `mediaMaxMb` , `streaming` , `nativeStreaming`
2026-02-15 03:48:40 +01:00
- ops/features: `configWrites` , `commands.native` , `slashCommand.*` , `actions.*` , `userToken` , `userTokenReadOnly`
2026-02-07 10:28:19 -05:00
2026-02-11 12:49:10 -05:00
## Related
2026-01-31 21:13:13 +09:00
2026-02-11 12:49:10 -05:00
- [Pairing ](/channels/pairing )
- [Channel routing ](/channels/channel-routing )
- [Troubleshooting ](/channels/troubleshooting )
- [Configuration ](/gateway/configuration )
- [Slash commands ](/tools/slash-commands )