Channels
How to Connect OpenClaw to Slack
Browse more in Channels.
All channels guides →This guide shows you how to connect OpenClaw to Slack using either Socket Mode or HTTP Request URLs. You will create a Slack app from a manifest, wire its tokens into OpenClaw, and start the gateway so your agents can talk in DMs and channels.
By the end, you will have a production-ready Slack integration with sane defaults for routing and threading.
Prerequisites
- ✓A Slack workspace where you can create and install custom apps.
- ✓An OpenClaw gateway installation that you can run with the `openclaw gateway` command.
- ✓Network access from your OpenClaw gateway to Slack APIs; for HTTP mode you also need a public HTTPS URL reachable from Slack.
Steps
- 1
Create a Slack app for Socket Mode
Create the Slack app first so you have the tokens OpenClaw needs. Use the manifest-based flow so scopes, events, and slash commands match what OpenClaw expects out of the box.
textIn Slack app settings press the **[Create New App](https://api.slack.com/apps/new)** button: * choose **from a manifest** and select a workspace for your app * paste the [example manifest](https://docs.openclaw.ai/channels/slack#manifest-and-scope-checklist) from below and continue to create * generate an **App-Level Token** (`xapp-...`) with `connections:write` * install app and copy the **Bot Token** (`xoxb-...`) shown - 2
Configure OpenClaw for Slack Socket Mode
Wire the Slack app tokens into your OpenClaw config so the gateway can open a Socket Mode connection. slack` block for multi-account setups, or the env vars for a quick default-account setup.
text{ channels: { slack: { enabled: true, mode: "socket", appToken: "xapp-...", botToken: "xoxb-...", }, }, } Env fallback (default account only): SLACK_APP_TOKEN=xapp-... SLACK_BOT_TOKEN=xoxb-... - 3
Start the OpenClaw gateway for Slack Socket Mode
Once the config is in place, start the gateway so it connects to Slack and begins consuming events. Keep this running in your usual process manager or terminal while you test DMs and channel mentions.
bashopenclaw gateway - 4
Create a Slack app for HTTP Request URLs
If you prefer Slack to push events over HTTPS instead of sockets, create a second app (or update the manifest) for HTTP mode. You need the signing secret and consistent Request URLs so Slack can verify and deliver events to your gateway.
textIn Slack app settings press the **[Create New App](https://api.slack.com/apps/new)** button: * choose **from a manifest** and select a workspace for your app * paste the [example manifest](https://docs.openclaw.ai/channels/slack#manifest-and-scope-checklist) and update the URLs before create * save the **Signing Secret** for request verification * install app and copy the **Bot Token** (`xoxb-...`) shown - 5
Configure OpenClaw for Slack HTTP mode
Point OpenClaw at your Slack HTTP app by setting the bot token, signing secret, and webhook path. Use unique `webhookPath` values if you run multiple Slack accounts in HTTP mode so their registrations do not collide.
text{ channels: { slack: { enabled: true, mode: "http", botToken: "xoxb-...", signingSecret: "your-signing-secret", webhookPath: "/slack/events", }, }, } Use unique webhook paths for multi-account HTTP Give each account a distinct `webhookPath` (default `/slack/events`) so registrations do not collide. - 6
Start the OpenClaw gateway for Slack HTTP mode
With HTTP mode configured, start the gateway so it begins serving the Slack events endpoint. Make sure your public URL and Slack Request URLs all point at the configured `webhookPath`.
bashopenclaw gateway - 7
Enable interactive replies and exec approvals (optional)
Once basic messaging works, you can turn on interactive replies and native exec approvals so agents can render buttons and approval flows directly in Slack. slack` config tree and can be scoped globally or per account.
json{ channels: { slack: { capabilities: { interactiveReplies: true, }, }, }, } { channels: { slack: { accounts: { ops: { capabilities: { interactiveReplies: true, }, }, }, }, }, } { channels: { slack: { execApprovals: { enabled: true, approvers: ["U12345678"], target: "both", }, }, }, }
Configuration
| Option | Description | Example |
|---|---|---|
| channels.slack.enabled | Turns the Slack channel integration on for the gateway. | |
| channels.slack.mode | Selects Slack transport mode, either Socket Mode ("socket") or HTTP Request URLs ("http"). | socket |
| channels.slack.appToken | The Slack App-Level Token (`xapp-...`) required for Socket Mode connections. | xapp-1A2B3C4D |
| channels.slack.botToken | The Slack Bot Token (`xoxb-...`) used for sending messages and reading events. | xoxb-1A2B3C4D |
| SLACK_APP_TOKEN | Env fallback for the Slack App-Level Token for the default Slack account in Socket Mode. | xapp-1A2B3C4D |
| SLACK_BOT_TOKEN | Env fallback for the Slack Bot Token for the default Slack account. | xoxb-1A2B3C4D |
| channels.slack.signingSecret | The Slack signing secret used to verify HTTP Request URL events. | whsec-abc123-signing-secret |
| channels.slack.webhookPath | The HTTP path where Slack sends Events, Interactivity, and Slash Command requests in HTTP mode. | /slack/events |
| channels.slack.dmPolicy | Controls DM access policy for Slack (pairing, allowlist, open, or disabled). | pairing |
| channels.slack.allowFrom | Defines which Slack users can DM the agent when DM policy is open or allowlist. | |
| channels.slack.groupPolicy | Controls how Slack channels are handled (open, allowlist, or disabled). | allowlist |
| channels.slack.channels | Channel allowlist and per-channel routing configuration keyed by Slack channel ID. | |
| channels.slack.thread.historyScope | Controls how much of Slack thread history is considered when starting a thread session. | thread |
| channels.slack.thread.initialHistoryLimit | Sets how many existing thread messages to fetch when a new thread session starts. | |
| channels.slack.thread.requireExplicitMention | When true, the bot only responds to explicit @mentions inside threads. | |
| channels.slack.replyToMode | Controls reply threading behavior for Slack messages (off, first, all, or batched). | off |
| channels.slack.ackReaction | Emoji shortcode used as an acknowledgement reaction while processing a message. | eyes |
| channels.slack.streaming.mode | Controls live preview streaming mode for Slack replies (off, partial, block, or progress). | partial |
| channels.slack.streaming.nativeTransport | Enables or disables Slack native text streaming when streaming mode is partial. | |
| channels.slack.typingReaction | Emoji shortcode used as a temporary typing reaction while generating a reply. | hourglass_flowing_sand |
| channels.slack.mediaMaxMb | Maximum size in megabytes for inbound and outbound Slack media handled by OpenClaw. | |
| channels.slack.textChunkLimit | Maximum number of characters per outbound Slack text chunk. | |
| channels.slack.chunkMode | Controls how long Slack messages are split into chunks, e.g. paragraph-first splitting. | newline |
| channels.slack.commands.native | Enables native Slack command handlers that map to registered slash commands. | |
| channels.slack.slashCommand.enabled | Turns on the single configured slash command mode when native commands are off. | |
| channels.slack.slashCommand.name | Name of the single slash command used when native commands are disabled. | openclaw |
| channels.slack.capabilities.interactiveReplies | Enables Slack-only interactive reply controls like buttons and select menus. | |
| channels.slack.execApprovals.enabled | Controls whether Slack acts as a native approval client for exec approvals. | |
| channels.slack.execApprovals.approvers | List of Slack user IDs allowed to approve or deny exec requests. | |
| channels.slack.execApprovals.target | Where to send exec approval prompts in Slack (dm, channel, or both). | both |
Troubleshooting
No replies in channels
channels` if you use an allowlist, `requireMention` is set the way you expect, and that the per-channel `users` allowlist is not blocking the sender.
openclaw channels status --probe
openclaw logs --follow
openclaw doctorDM messages ignored
policy`) allows the sender. Then check pairing approvals or DM allowlist entries to ensure your Slack user is authorized.
openclaw pairing list slackSocket mode not connecting
When Socket Mode fails to connect, double-check that the bot and app tokens are valid and that Socket Mode is enabled in the Slack app settings. If `openclaw channels status --probe --json` shows `botTokenStatus` or `appTokenStatus: "configured_unavailable"`, the account is configured but the runtime cannot resolve the SecretRef-backed token value.
openclaw channels status --probe --jsonHTTP mode not receiving events
If your HTTP-mode Slack app never triggers events, verify the signing secret, the `webhookPath`, and that Slack Request URLs for Events, Interactivity, and Slash Commands all point to that path. A `signingSecretStatus: "configured_unavailable"` snapshot means the HTTP account is configured but the runtime cannot resolve the SecretRef-backed signing secret.
Native or slash commands not firing
enabled: true`). useAccessGroups` and any channel or user allowlists that might block command execution.
Frequently asked questions
Powered by Mem0
Add persistent memory to OpenClaw
Official Mem0 plugin for OpenClaw keeps context across chats and tools. Smaller prompts, lower cost, better continuity for your agents.