Files
openclaw-skill/openclaw-knowhow-skill/output/openclaw-docs_data/pages/Slack_b4dfcd3b02.json
Selig 4c966a3ad2 Initial commit: OpenClaw Skill Collection
6 custom skills (assign-task, dispatch-webhook, daily-briefing,
task-capture, qmd-brain, tts-voice) with technical documentation.
Compatible with Claude Code, OpenClaw, Codex CLI, and OpenCode.
2026-03-13 10:58:30 +08:00

180 lines
29 KiB
JSON
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"title": "Slack",
"content": "## Socket mode (default)\n\n### Quick setup (beginner)\n\n1. Create a Slack app and enable **Socket Mode**.\n2. Create an **App Token** (`xapp-...`) and **Bot Token** (`xoxb-...`).\n3. Set tokens for OpenClaw and start the gateway.\n\n1. Create a Slack app (From scratch) in [https://api.slack.com/apps](https://api.slack.com/apps).\n2. **Socket Mode** → toggle on. Then go to **Basic Information** → **App-Level Tokens** → **Generate Token and Scopes** with scope `connections:write`. Copy the **App Token** (`xapp-...`).\n3. **OAuth & Permissions** → add bot token scopes (use the manifest below). Click **Install to Workspace**. Copy the **Bot User OAuth Token** (`xoxb-...`).\n4. Optional: **OAuth & Permissions** → add **User Token Scopes** (see the read-only list below). Reinstall the app and copy the **User OAuth Token** (`xoxp-...`).\n5. **Event Subscriptions** → enable events and subscribe to:\n * `message.*` (includes edits/deletes/thread broadcasts)\n * `app_mention`\n * `reaction_added`, `reaction_removed`\n * `member_joined_channel`, `member_left_channel`\n * `channel_rename`\n * `pin_added`, `pin_removed`\n6. Invite the bot to channels you want it to read.\n7. Slash Commands → create `/openclaw` if you use `channels.slack.slashCommand`. If you enable native commands, add one slash command per built-in command (same names as `/help`). Native defaults to off for Slack unless you set `channels.slack.commands.native: true` (global `commands.native` is `\"auto\"` which leaves Slack off).\n8. App Home → enable the **Messages Tab** so users can DM the bot.\n\nUse the manifest below so scopes and events stay in sync.\n\nMulti-account support: use `channels.slack.accounts` with per-account tokens and optional `name`. See [`gateway/configuration`](/gateway/configuration#telegramaccounts--discordaccounts--slackaccounts--signalaccounts--imessageaccounts) for the shared pattern.\n\n### OpenClaw config (minimal)\n\nSet tokens via env vars (recommended):\n\n* `SLACK_APP_TOKEN=xapp-...`\n* `SLACK_BOT_TOKEN=xoxb-...`\n\n### User token (optional)\n\nOpenClaw can use a Slack user token (`xoxp-...`) for read operations (history,\npins, reactions, emoji, member info). By default this stays read-only: reads\nprefer the user token when present, and writes still use the bot token unless\nyou explicitly opt in. Even with `userTokenReadOnly: false`, the bot token stays\npreferred for writes when it is available.\n\nUser tokens are configured in the config file (no env var support). For\nmulti-account, set `channels.slack.accounts.<id>.userToken`.\n\nExample with bot + app + user tokens:\n\nExample with userTokenReadOnly explicitly set (allow user token writes):\n\n* Read operations (history, reactions list, pins list, emoji list, member info,\n search) prefer the user token when configured, otherwise the bot token.\n* Write operations (send/edit/delete messages, add/remove reactions, pin/unpin,\n file uploads) use the bot token by default. If `userTokenReadOnly: false` and\n no bot token is available, OpenClaw falls back to the user token.\n\n* `channels.slack.historyLimit` (or `channels.slack.accounts.*.historyLimit`) controls how many recent channel/group messages are wrapped into the prompt.\n* Falls back to `messages.groupChat.historyLimit`. Set `0` to disable (default 50).\n\n## HTTP mode (Events API)\n\nUse HTTP webhook mode when your Gateway is reachable by Slack over HTTPS (typical for server deployments).\nHTTP mode uses the Events API + Interactivity + Slash Commands with a shared request URL.\n\n1. Create a Slack app and **disable Socket Mode** (optional if you only use HTTP).\n2. **Basic Information** → copy the **Signing Secret**.\n3. **OAuth & Permissions** → install the app and copy the **Bot User OAuth Token** (`xoxb-...`).\n4. **Event Subscriptions** → enable events and set the **Request URL** to your gateway webhook path (default `/slack/events`).\n5. **Interactivity & Shortcuts** → enable and set the same **Request URL**.\n6. **Slash Commands** → set the same **Request URL** for your command(s).\n\nExample request URL:\n`https://gateway-host/slack/events`\n\n### OpenClaw config (minimal)\n\nMulti-account HTTP mode: set `channels.slack.accounts.<id>.mode = \"http\"` and provide a unique\n`webhookPath` per account so each Slack app can point to its own URL.\n\n### Manifest (optional)\n\nUse this Slack app manifest to create the app quickly (adjust the name/command if you want). Include the\nuser scopes if you plan to configure a user token.\n\nIf you enable native commands, add one `slash_commands` entry per command you want to expose (matching the `/help` list). Override with `channels.slack.commands.native`.\n\n## Scopes (current vs optional)\n\nSlack's Conversations API is type-scoped: you only need the scopes for the\nconversation types you actually touch (channels, groups, im, mpim). See\n[https://docs.slack.dev/apis/web-api/using-the-conversations-api/](https://docs.slack.dev/apis/web-api/using-the-conversations-api/) for the overview.\n\n### Bot token scopes (required)\n\n* `chat:write` (send/update/delete messages via `chat.postMessage`)\n [https://docs.slack.dev/reference/methods/chat.postMessage](https://docs.slack.dev/reference/methods/chat.postMessage)\n* `im:write` (open DMs via `conversations.open` for user DMs)\n [https://docs.slack.dev/reference/methods/conversations.open](https://docs.slack.dev/reference/methods/conversations.open)\n* `channels:history`, `groups:history`, `im:history`, `mpim:history`\n [https://docs.slack.dev/reference/methods/conversations.history](https://docs.slack.dev/reference/methods/conversations.history)\n* `channels:read`, `groups:read`, `im:read`, `mpim:read`\n [https://docs.slack.dev/reference/methods/conversations.info](https://docs.slack.dev/reference/methods/conversations.info)\n* `users:read` (user lookup)\n [https://docs.slack.dev/reference/methods/users.info](https://docs.slack.dev/reference/methods/users.info)\n* `reactions:read`, `reactions:write` (`reactions.get` / `reactions.add`)\n [https://docs.slack.dev/reference/methods/reactions.get](https://docs.slack.dev/reference/methods/reactions.get)\n [https://docs.slack.dev/reference/methods/reactions.add](https://docs.slack.dev/reference/methods/reactions.add)\n* `pins:read`, `pins:write` (`pins.list` / `pins.add` / `pins.remove`)\n [https://docs.slack.dev/reference/scopes/pins.read](https://docs.slack.dev/reference/scopes/pins.read)\n [https://docs.slack.dev/reference/scopes/pins.write](https://docs.slack.dev/reference/scopes/pins.write)\n* `emoji:read` (`emoji.list`)\n [https://docs.slack.dev/reference/scopes/emoji.read](https://docs.slack.dev/reference/scopes/emoji.read)\n* `files:write` (uploads via `files.uploadV2`)\n [https://docs.slack.dev/messaging/working-with-files/#upload](https://docs.slack.dev/messaging/working-with-files/#upload)\n\n### User token scopes (optional, read-only by default)\n\nAdd these under **User Token Scopes** if you configure `channels.slack.userToken`.\n\n* `channels:history`, `groups:history`, `im:history`, `mpim:history`\n* `channels:read`, `groups:read`, `im:read`, `mpim:read`\n* `users:read`\n* `reactions:read`\n* `pins:read`\n* `emoji:read`\n* `search:read`\n\n### Not needed today (but likely future)\n\n* `mpim:write` (only if we add group-DM open/DM start via `conversations.open`)\n* `groups:write` (only if we add private-channel management: create/rename/invite/archive)\n* `chat:write.public` (only if we want to post to channels the bot isn't in)\n [https://docs.slack.dev/reference/scopes/chat.write.public](https://docs.slack.dev/reference/scopes/chat.write.public)\n* `users:read.email` (only if we need email fields from `users.info`)\n [https://docs.slack.dev/changelog/2017-04-narrowing-email-access](https://docs.slack.dev/changelog/2017-04-narrowing-email-access)\n* `files:read` (only if we start listing/reading file metadata)\n\nSlack uses Socket Mode only (no HTTP webhook server). Provide both tokens:\n\nTokens can also be supplied via env vars:\n\n* `SLACK_BOT_TOKEN`\n* `SLACK_APP_TOKEN`\n\nAck reactions are controlled globally via `messages.ackReaction` +\n`messages.ackReactionScope`. Use `messages.removeAckAfterReply` to clear the\nack reaction after the bot replies.\n\n* Outbound text is chunked to `channels.slack.textChunkLimit` (default 4000).\n* Optional newline chunking: set `channels.slack.chunkMode=\"newline\"` to split on blank lines (paragraph boundaries) before length chunking.\n* Media uploads are capped by `channels.slack.mediaMaxMb` (default 20).\n\nBy default, OpenClaw replies in the main channel. Use `channels.slack.replyToMode` to control automatic threading:\n\n| Mode | Behavior |\n| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `off` | **Default.** Reply in main channel. Only thread if the triggering message was already in a thread. |\n| `first` | First reply goes to thread (under the triggering message), subsequent replies go to main channel. Useful for keeping context visible while avoiding thread clutter. |\n| `all` | All replies go to thread. Keeps conversations contained but may reduce visibility. |\n\nThe mode applies to both auto-replies and agent tool calls (`slack sendMessage`).\n\n### Per-chat-type threading\n\nYou can configure different threading behavior per chat type by setting `channels.slack.replyToModeByChatType`:\n\nSupported chat types:\n\n* `direct`: 1:1 DMs (Slack `im`)\n* `group`: group DMs / MPIMs (Slack `mpim`)\n* `channel`: standard channels (public/private)\n\n1. `replyToModeByChatType.<chatType>`\n2. `replyToMode`\n3. Provider default (`off`)\n\nLegacy `channels.slack.dm.replyToMode` is still accepted as a fallback for `direct` when no chat-type override is set.\n\nThread group DMs but keep channels in the root:\n\nMake channels thread, keep DMs in the root:\n\n### Manual threading tags\n\nFor fine-grained control, use these tags in agent responses:\n\n* `[[reply_to_current]]` — reply to the triggering message (start/continue thread).\n* `[[reply_to:<id>]]` — reply to a specific message id.\n\n## Sessions + routing\n\n* DMs share the `main` session (like WhatsApp/Telegram).\n* Channels map to `agent:<agentId>:slack:channel:<channelId>` sessions.\n* Slash commands use `agent:<agentId>:slack:slash:<userId>` sessions (prefix configurable via `channels.slack.slashCommand.sessionPrefix`).\n* If Slack doesnt provide `channel_type`, OpenClaw infers it from the channel ID prefix (`D`, `C`, `G`) and defaults to `channel` to keep session keys stable.\n* Native command registration uses `commands.native` (global default `\"auto\"` → Slack off) and can be overridden per-workspace with `channels.slack.commands.native`. Text commands require standalone `/...` messages and can be disabled with `commands.text: false`. Slack slash commands are managed in the Slack app and are not removed automatically. Use `commands.useAccessGroups: false` to bypass access-group checks for commands.\n* Full command list + config: [Slash commands](/tools/slash-commands)\n\n## DM security (pairing)\n\n* Default: `channels.slack.dm.policy=\"pairing\"` — unknown DM senders get a pairing code (expires after 1 hour).\n* Approve via: `openclaw pairing approve slack <code>`.\n* To allow anyone: set `channels.slack.dm.policy=\"open\"` and `channels.slack.dm.allowFrom=[\"*\"]`.\n* `channels.slack.dm.allowFrom` accepts user IDs, @handles, or emails (resolved at startup when tokens allow). The wizard accepts usernames and resolves them to ids during setup when tokens allow.\n\n* `channels.slack.groupPolicy` controls channel handling (`open|disabled|allowlist`).\n* `allowlist` requires channels to be listed in `channels.slack.channels`.\n* If you only set `SLACK_BOT_TOKEN`/`SLACK_APP_TOKEN` and never create a `channels.slack` section,\n the runtime defaults `groupPolicy` to `open`. Add `channels.slack.groupPolicy`,\n `channels.defaults.groupPolicy`, or a channel allowlist to lock it down.\n* The configure wizard accepts `#channel` names and resolves them to IDs when possible\n (public + private); if multiple matches exist, it prefers the active channel.\n* On startup, OpenClaw resolves channel/user names in allowlists to IDs (when tokens allow)\n and logs the mapping; unresolved entries are kept as typed.\n* To allow **no channels**, set `channels.slack.groupPolicy: \"disabled\"` (or keep an empty allowlist).\n\nChannel options (`channels.slack.channels.<id>` or `channels.slack.channels.<name>`):\n\n* `allow`: allow/deny the channel when `groupPolicy=\"allowlist\"`.\n* `requireMention`: mention gating for the channel.\n* `tools`: optional per-channel tool policy overrides (`allow`/`deny`/`alsoAllow`).\n* `toolsBySender`: optional per-sender tool policy overrides within the channel (keys are sender ids/@handles/emails; `\"*\"` wildcard supported).\n* `allowBots`: allow bot-authored messages in this channel (default: false).\n* `users`: optional per-channel user allowlist.\n* `skills`: skill filter (omit = all skills, empty = none).\n* `systemPrompt`: extra system prompt for the channel (combined with topic/purpose).\n* `enabled`: set `false` to disable the channel.\n\nUse these with cron/CLI sends:\n\n* `user:<id>` for DMs\n* `channel:<id>` for channels\n\nSlack tool actions can be gated with `channels.slack.actions.*`:\n\n| Action group | Default | Notes |\n| ------------ | ------- | ---------------------- |\n| reactions | enabled | React + list reactions |\n| messages | enabled | Read/send/edit/delete |\n| pins | enabled | Pin/unpin/list |\n| memberInfo | enabled | Member info |\n| emojiList | enabled | Custom emoji list |\n\n* Writes default to the bot token so state-changing actions stay scoped to the\n app's bot permissions and identity.\n* Setting `userTokenReadOnly: false` allows the user token to be used for write\n operations when a bot token is unavailable, which means actions run with the\n installing user's access. Treat the user token as highly privileged and keep\n action gates and allowlists tight.\n* If you enable user-token writes, make sure the user token includes the write\n scopes you expect (`chat:write`, `reactions:write`, `pins:write`,\n `files:write`) or those operations will fail.\n\n* Mention gating is controlled via `channels.slack.channels` (set `requireMention` to `true`); `agents.list[].groupChat.mentionPatterns` (or `messages.groupChat.mentionPatterns`) also count as mentions.\n* Multi-agent override: set per-agent patterns on `agents.list[].groupChat.mentionPatterns`.\n* Reaction notifications follow `channels.slack.reactionNotifications` (use `reactionAllowlist` with mode `allowlist`).\n* Bot-authored messages are ignored by default; enable via `channels.slack.allowBots` or `channels.slack.channels.<id>.allowBots`.\n* Warning: If you allow replies to other bots (`channels.slack.allowBots=true` or `channels.slack.channels.<id>.allowBots=true`), prevent bot-to-bot reply loops with `requireMention`, `channels.slack.channels.<id>.users` allowlists, and/or clear guardrails in `AGENTS.md` and `SOUL.md`.\n* For the Slack tool, reaction removal semantics are in [/tools/reactions](/tools/reactions).\n* Attachments are downloaded to the media store when permitted and under the size limit.",
"code_samples": [
{
"code": "### Setup\n\n1. Create a Slack app (From scratch) in [https://api.slack.com/apps](https://api.slack.com/apps).\n2. **Socket Mode** → toggle on. Then go to **Basic Information** → **App-Level Tokens** → **Generate Token and Scopes** with scope `connections:write`. Copy the **App Token** (`xapp-...`).\n3. **OAuth & Permissions** → add bot token scopes (use the manifest below). Click **Install to Workspace**. Copy the **Bot User OAuth Token** (`xoxb-...`).\n4. Optional: **OAuth & Permissions** → add **User Token Scopes** (see the read-only list below). Reinstall the app and copy the **User OAuth Token** (`xoxp-...`).\n5. **Event Subscriptions** → enable events and subscribe to:\n * `message.*` (includes edits/deletes/thread broadcasts)\n * `app_mention`\n * `reaction_added`, `reaction_removed`\n * `member_joined_channel`, `member_left_channel`\n * `channel_rename`\n * `pin_added`, `pin_removed`\n6. Invite the bot to channels you want it to read.\n7. Slash Commands → create `/openclaw` if you use `channels.slack.slashCommand`. If you enable native commands, add one slash command per built-in command (same names as `/help`). Native defaults to off for Slack unless you set `channels.slack.commands.native: true` (global `commands.native` is `\"auto\"` which leaves Slack off).\n8. App Home → enable the **Messages Tab** so users can DM the bot.\n\nUse the manifest below so scopes and events stay in sync.\n\nMulti-account support: use `channels.slack.accounts` with per-account tokens and optional `name`. See [`gateway/configuration`](/gateway/configuration#telegramaccounts--discordaccounts--slackaccounts--signalaccounts--imessageaccounts) for the shared pattern.\n\n### OpenClaw config (minimal)\n\nSet tokens via env vars (recommended):\n\n* `SLACK_APP_TOKEN=xapp-...`\n* `SLACK_BOT_TOKEN=xoxb-...`\n\nOr via config:",
"language": "unknown"
},
{
"code": "### User token (optional)\n\nOpenClaw can use a Slack user token (`xoxp-...`) for read operations (history,\npins, reactions, emoji, member info). By default this stays read-only: reads\nprefer the user token when present, and writes still use the bot token unless\nyou explicitly opt in. Even with `userTokenReadOnly: false`, the bot token stays\npreferred for writes when it is available.\n\nUser tokens are configured in the config file (no env var support). For\nmulti-account, set `channels.slack.accounts.<id>.userToken`.\n\nExample with bot + app + user tokens:",
"language": "unknown"
},
{
"code": "Example with userTokenReadOnly explicitly set (allow user token writes):",
"language": "unknown"
},
{
"code": "#### Token usage\n\n* Read operations (history, reactions list, pins list, emoji list, member info,\n search) prefer the user token when configured, otherwise the bot token.\n* Write operations (send/edit/delete messages, add/remove reactions, pin/unpin,\n file uploads) use the bot token by default. If `userTokenReadOnly: false` and\n no bot token is available, OpenClaw falls back to the user token.\n\n### History context\n\n* `channels.slack.historyLimit` (or `channels.slack.accounts.*.historyLimit`) controls how many recent channel/group messages are wrapped into the prompt.\n* Falls back to `messages.groupChat.historyLimit`. Set `0` to disable (default 50).\n\n## HTTP mode (Events API)\n\nUse HTTP webhook mode when your Gateway is reachable by Slack over HTTPS (typical for server deployments).\nHTTP mode uses the Events API + Interactivity + Slash Commands with a shared request URL.\n\n### Setup\n\n1. Create a Slack app and **disable Socket Mode** (optional if you only use HTTP).\n2. **Basic Information** → copy the **Signing Secret**.\n3. **OAuth & Permissions** → install the app and copy the **Bot User OAuth Token** (`xoxb-...`).\n4. **Event Subscriptions** → enable events and set the **Request URL** to your gateway webhook path (default `/slack/events`).\n5. **Interactivity & Shortcuts** → enable and set the same **Request URL**.\n6. **Slash Commands** → set the same **Request URL** for your command(s).\n\nExample request URL:\n`https://gateway-host/slack/events`\n\n### OpenClaw config (minimal)",
"language": "unknown"
},
{
"code": "Multi-account HTTP mode: set `channels.slack.accounts.<id>.mode = \"http\"` and provide a unique\n`webhookPath` per account so each Slack app can point to its own URL.\n\n### Manifest (optional)\n\nUse this Slack app manifest to create the app quickly (adjust the name/command if you want). Include the\nuser scopes if you plan to configure a user token.",
"language": "unknown"
},
{
"code": "If you enable native commands, add one `slash_commands` entry per command you want to expose (matching the `/help` list). Override with `channels.slack.commands.native`.\n\n## Scopes (current vs optional)\n\nSlack's Conversations API is type-scoped: you only need the scopes for the\nconversation types you actually touch (channels, groups, im, mpim). See\n[https://docs.slack.dev/apis/web-api/using-the-conversations-api/](https://docs.slack.dev/apis/web-api/using-the-conversations-api/) for the overview.\n\n### Bot token scopes (required)\n\n* `chat:write` (send/update/delete messages via `chat.postMessage`)\n [https://docs.slack.dev/reference/methods/chat.postMessage](https://docs.slack.dev/reference/methods/chat.postMessage)\n* `im:write` (open DMs via `conversations.open` for user DMs)\n [https://docs.slack.dev/reference/methods/conversations.open](https://docs.slack.dev/reference/methods/conversations.open)\n* `channels:history`, `groups:history`, `im:history`, `mpim:history`\n [https://docs.slack.dev/reference/methods/conversations.history](https://docs.slack.dev/reference/methods/conversations.history)\n* `channels:read`, `groups:read`, `im:read`, `mpim:read`\n [https://docs.slack.dev/reference/methods/conversations.info](https://docs.slack.dev/reference/methods/conversations.info)\n* `users:read` (user lookup)\n [https://docs.slack.dev/reference/methods/users.info](https://docs.slack.dev/reference/methods/users.info)\n* `reactions:read`, `reactions:write` (`reactions.get` / `reactions.add`)\n [https://docs.slack.dev/reference/methods/reactions.get](https://docs.slack.dev/reference/methods/reactions.get)\n [https://docs.slack.dev/reference/methods/reactions.add](https://docs.slack.dev/reference/methods/reactions.add)\n* `pins:read`, `pins:write` (`pins.list` / `pins.add` / `pins.remove`)\n [https://docs.slack.dev/reference/scopes/pins.read](https://docs.slack.dev/reference/scopes/pins.read)\n [https://docs.slack.dev/reference/scopes/pins.write](https://docs.slack.dev/reference/scopes/pins.write)\n* `emoji:read` (`emoji.list`)\n [https://docs.slack.dev/reference/scopes/emoji.read](https://docs.slack.dev/reference/scopes/emoji.read)\n* `files:write` (uploads via `files.uploadV2`)\n [https://docs.slack.dev/messaging/working-with-files/#upload](https://docs.slack.dev/messaging/working-with-files/#upload)\n\n### User token scopes (optional, read-only by default)\n\nAdd these under **User Token Scopes** if you configure `channels.slack.userToken`.\n\n* `channels:history`, `groups:history`, `im:history`, `mpim:history`\n* `channels:read`, `groups:read`, `im:read`, `mpim:read`\n* `users:read`\n* `reactions:read`\n* `pins:read`\n* `emoji:read`\n* `search:read`\n\n### Not needed today (but likely future)\n\n* `mpim:write` (only if we add group-DM open/DM start via `conversations.open`)\n* `groups:write` (only if we add private-channel management: create/rename/invite/archive)\n* `chat:write.public` (only if we want to post to channels the bot isn't in)\n [https://docs.slack.dev/reference/scopes/chat.write.public](https://docs.slack.dev/reference/scopes/chat.write.public)\n* `users:read.email` (only if we need email fields from `users.info`)\n [https://docs.slack.dev/changelog/2017-04-narrowing-email-access](https://docs.slack.dev/changelog/2017-04-narrowing-email-access)\n* `files:read` (only if we start listing/reading file metadata)\n\n## Config\n\nSlack uses Socket Mode only (no HTTP webhook server). Provide both tokens:",
"language": "unknown"
},
{
"code": "Tokens can also be supplied via env vars:\n\n* `SLACK_BOT_TOKEN`\n* `SLACK_APP_TOKEN`\n\nAck reactions are controlled globally via `messages.ackReaction` +\n`messages.ackReactionScope`. Use `messages.removeAckAfterReply` to clear the\nack reaction after the bot replies.\n\n## Limits\n\n* Outbound text is chunked to `channels.slack.textChunkLimit` (default 4000).\n* Optional newline chunking: set `channels.slack.chunkMode=\"newline\"` to split on blank lines (paragraph boundaries) before length chunking.\n* Media uploads are capped by `channels.slack.mediaMaxMb` (default 20).\n\n## Reply threading\n\nBy default, OpenClaw replies in the main channel. Use `channels.slack.replyToMode` to control automatic threading:\n\n| Mode | Behavior |\n| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `off` | **Default.** Reply in main channel. Only thread if the triggering message was already in a thread. |\n| `first` | First reply goes to thread (under the triggering message), subsequent replies go to main channel. Useful for keeping context visible while avoiding thread clutter. |\n| `all` | All replies go to thread. Keeps conversations contained but may reduce visibility. |\n\nThe mode applies to both auto-replies and agent tool calls (`slack sendMessage`).\n\n### Per-chat-type threading\n\nYou can configure different threading behavior per chat type by setting `channels.slack.replyToModeByChatType`:",
"language": "unknown"
},
{
"code": "Supported chat types:\n\n* `direct`: 1:1 DMs (Slack `im`)\n* `group`: group DMs / MPIMs (Slack `mpim`)\n* `channel`: standard channels (public/private)\n\nPrecedence:\n\n1. `replyToModeByChatType.<chatType>`\n2. `replyToMode`\n3. Provider default (`off`)\n\nLegacy `channels.slack.dm.replyToMode` is still accepted as a fallback for `direct` when no chat-type override is set.\n\nExamples:\n\nThread DMs only:",
"language": "unknown"
},
{
"code": "Thread group DMs but keep channels in the root:",
"language": "unknown"
},
{
"code": "Make channels thread, keep DMs in the root:",
"language": "unknown"
}
],
"headings": [
{
"level": "h2",
"text": "Socket mode (default)",
"id": "socket-mode-(default)"
},
{
"level": "h3",
"text": "Quick setup (beginner)",
"id": "quick-setup-(beginner)"
},
{
"level": "h3",
"text": "Setup",
"id": "setup"
},
{
"level": "h3",
"text": "OpenClaw config (minimal)",
"id": "openclaw-config-(minimal)"
},
{
"level": "h3",
"text": "User token (optional)",
"id": "user-token-(optional)"
},
{
"level": "h3",
"text": "History context",
"id": "history-context"
},
{
"level": "h2",
"text": "HTTP mode (Events API)",
"id": "http-mode-(events-api)"
},
{
"level": "h3",
"text": "Setup",
"id": "setup"
},
{
"level": "h3",
"text": "OpenClaw config (minimal)",
"id": "openclaw-config-(minimal)"
},
{
"level": "h3",
"text": "Manifest (optional)",
"id": "manifest-(optional)"
},
{
"level": "h2",
"text": "Scopes (current vs optional)",
"id": "scopes-(current-vs-optional)"
},
{
"level": "h3",
"text": "Bot token scopes (required)",
"id": "bot-token-scopes-(required)"
},
{
"level": "h3",
"text": "User token scopes (optional, read-only by default)",
"id": "user-token-scopes-(optional,-read-only-by-default)"
},
{
"level": "h3",
"text": "Not needed today (but likely future)",
"id": "not-needed-today-(but-likely-future)"
},
{
"level": "h2",
"text": "Config",
"id": "config"
},
{
"level": "h2",
"text": "Limits",
"id": "limits"
},
{
"level": "h2",
"text": "Reply threading",
"id": "reply-threading"
},
{
"level": "h3",
"text": "Per-chat-type threading",
"id": "per-chat-type-threading"
},
{
"level": "h3",
"text": "Manual threading tags",
"id": "manual-threading-tags"
},
{
"level": "h2",
"text": "Sessions + routing",
"id": "sessions-+-routing"
},
{
"level": "h2",
"text": "DM security (pairing)",
"id": "dm-security-(pairing)"
},
{
"level": "h2",
"text": "Group policy",
"id": "group-policy"
},
{
"level": "h2",
"text": "Delivery targets",
"id": "delivery-targets"
},
{
"level": "h2",
"text": "Tool actions",
"id": "tool-actions"
},
{
"level": "h2",
"text": "Security notes",
"id": "security-notes"
},
{
"level": "h2",
"text": "Notes",
"id": "notes"
}
],
"url": "llms-txt#slack",
"links": []
}