Channels

How to Connect OpenClaw to Slack

4 min read

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.

Setup flow

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. 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.

    text
    In 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. 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. 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.

    bash
    openclaw gateway
  4. 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.

    text
    In 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. 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. 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`.

    bash
    openclaw gateway
  7. 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

OptionDescriptionExample
channels.slack.enabledTurns the Slack channel integration on for the gateway.
channels.slack.modeSelects Slack transport mode, either Socket Mode ("socket") or HTTP Request URLs ("http").socket
channels.slack.appTokenThe Slack App-Level Token (`xapp-...`) required for Socket Mode connections.xapp-1A2B3C4D
channels.slack.botTokenThe Slack Bot Token (`xoxb-...`) used for sending messages and reading events.xoxb-1A2B3C4D
SLACK_APP_TOKENEnv fallback for the Slack App-Level Token for the default Slack account in Socket Mode.xapp-1A2B3C4D
SLACK_BOT_TOKENEnv fallback for the Slack Bot Token for the default Slack account.xoxb-1A2B3C4D
channels.slack.signingSecretThe Slack signing secret used to verify HTTP Request URL events.whsec-abc123-signing-secret
channels.slack.webhookPathThe HTTP path where Slack sends Events, Interactivity, and Slash Command requests in HTTP mode./slack/events
channels.slack.dmPolicyControls DM access policy for Slack (pairing, allowlist, open, or disabled).pairing
channels.slack.allowFromDefines which Slack users can DM the agent when DM policy is open or allowlist.
channels.slack.groupPolicyControls how Slack channels are handled (open, allowlist, or disabled).allowlist
channels.slack.channelsChannel allowlist and per-channel routing configuration keyed by Slack channel ID.
channels.slack.thread.historyScopeControls how much of Slack thread history is considered when starting a thread session.thread
channels.slack.thread.initialHistoryLimitSets how many existing thread messages to fetch when a new thread session starts.
channels.slack.thread.requireExplicitMentionWhen true, the bot only responds to explicit @mentions inside threads.
channels.slack.replyToModeControls reply threading behavior for Slack messages (off, first, all, or batched).off
channels.slack.ackReactionEmoji shortcode used as an acknowledgement reaction while processing a message.eyes
channels.slack.streaming.modeControls live preview streaming mode for Slack replies (off, partial, block, or progress).partial
channels.slack.streaming.nativeTransportEnables or disables Slack native text streaming when streaming mode is partial.
channels.slack.typingReactionEmoji shortcode used as a temporary typing reaction while generating a reply.hourglass_flowing_sand
channels.slack.mediaMaxMbMaximum size in megabytes for inbound and outbound Slack media handled by OpenClaw.
channels.slack.textChunkLimitMaximum number of characters per outbound Slack text chunk.
channels.slack.chunkModeControls how long Slack messages are split into chunks, e.g. paragraph-first splitting.newline
channels.slack.commands.nativeEnables native Slack command handlers that map to registered slash commands.
channels.slack.slashCommand.enabledTurns on the single configured slash command mode when native commands are off.
channels.slack.slashCommand.nameName of the single slash command used when native commands are disabled.openclaw
channels.slack.capabilities.interactiveRepliesEnables Slack-only interactive reply controls like buttons and select menus.
channels.slack.execApprovals.enabledControls whether Slack acts as a native approval client for exec approvals.
channels.slack.execApprovals.approversList of Slack user IDs allowed to approve or deny exec requests.
channels.slack.execApprovals.targetWhere 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.

bash
openclaw channels status --probe
openclaw logs --follow
openclaw doctor

DM messages ignored

policy`) allows the sender. Then check pairing approvals or DM allowlist entries to ensure your Slack user is authorized.

bash
openclaw pairing list slack

Socket 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.

bash
openclaw channels status --probe --json

HTTP 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.

More in Channels