Setup & Deployment

How to Set Up OpenClaw as a Slack Bot: Complete Workspace Integration Guide (2026)

20 min read · Updated 2026-03-30

By DoneClaw Team · We run managed OpenClaw deployments and write from hands-on production experience.

Slack is where work happens for over 750,000 organizations worldwide. If your team already lives in Slack, adding an AI agent directly into your workspace means nobody needs to switch tabs, open a separate app, or remember another URL. OpenClaw's Slack integration is production-ready, supporting DMs, channels, threads, slash commands, interactive buttons, native text streaming, and multi-account setups — all through Slack's official Bolt SDK. This guide walks you through the complete OpenClaw Slack bot setup process: from creating your Slack app and configuring tokens to advanced features like interactive replies, per-channel access control, and HTTP Events API mode. Whether you're setting up a personal AI assistant in DMs or deploying an agent across your entire company workspace, you'll have it running in under 15 minutes.

Why Use OpenClaw in Slack?

Before diving into setup, here's why Slack is one of the best channels for running an OpenClaw agent:

Threading: Native thread support keeps conversations organized; OpenClaw creates separate sessions per thread. Slash commands: Users run /openclaw without leaving their flow. Interactive UI: Buttons, select menus, and modals via Block Kit. Text streaming: Live typing preview via Slack's Agents & AI Apps API. Access control: Channel-level and user-level allowlists. File sharing: Upload/download files up to 20MB natively. Enterprise ready: Socket Mode (no public URL needed) or HTTP Events API. Multi-workspace: Connect multiple Slack workspaces to one OpenClaw instance.

Compared to Discord or Telegram, Slack's biggest advantages are enterprise SSO integration, per-channel permissions granularity, and the fact that your team is probably already there.

Prerequisites

Before you start, make sure you have:

  • OpenClaw installed and running — See our setup guide for beginners or the Docker deployment guide if you haven't done this yet
  • A Slack workspace where you have admin permissions (or permission to install apps)
  • Terminal access to your OpenClaw instance
  • ~15 minutes of setup time

Step 1: Create a Slack App

The first step is creating a Slack app that OpenClaw will use to connect to your workspace.

Option A: Quick Setup with App Manifest (Recommended) — The fastest approach is using Slack's app manifest, which pre-configures all the necessary scopes and events in one shot. Go to https://api.slack.com/apps, click "Create New App" then "From an app manifest", select your workspace, and paste the manifest below. Then click "Create" and "Install to Workspace" to authorize.

Option B: Manual Setup — If you prefer to configure everything yourself: Go to https://api.slack.com/apps, click "Create New App" then "From scratch". Name it (e.g., "OpenClaw") and select your workspace. Navigate to OAuth & Permissions and add the required Bot Token Scopes: chat:write, channels:history, channels:read, groups:history, im:history, im:read, im:write, mpim:history, mpim:read, mpim:write, users:read, app_mentions:read, assistant:write, reactions:read, reactions:write, pins:read, pins:write, emoji:read, commands, files:read, files:write. Enable Socket Mode under Settings, create an App-Level Token with connections:write scope, subscribe to the bot events listed in the manifest, enable the Messages Tab under App Home, and install the app to your workspace.

{
  "display_information": {
    "name": "OpenClaw",
    "description": "Slack connector for OpenClaw"
  },
  "features": {
    "bot_user": {
      "display_name": "OpenClaw",
      "always_online": false
    },
    "app_home": {
      "messages_tab_enabled": true,
      "messages_tab_read_only_enabled": false
    },
    "slash_commands": [
      {
        "command": "/openclaw",
        "description": "Send a message to OpenClaw",
        "should_escape": false
      }
    ]
  },
  "oauth_config": {
    "scopes": {
      "bot": [
        "chat:write", "channels:history", "channels:read",
        "groups:history", "im:history", "im:read", "im:write",
        "mpim:history", "mpim:read", "mpim:write", "users:read",
        "app_mentions:read", "assistant:write", "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"
      ]
    }
  }
}

Step 2: Collect Your Tokens

You need two tokens for Socket Mode (the default and recommended mode):

Bot Token (xoxb-...): Go to OAuth & Permissions in your Slack app settings and copy the Bot User OAuth Token — it starts with xoxb-.

App Token (xapp-...): Go to Settings then Basic Information, scroll to App-Level Tokens, and copy the token you created — it starts with xapp-.

Keep these tokens secret. Anyone with these tokens can control your Slack bot. Never commit them to git or share them publicly.

Step 3: Configure OpenClaw

Now connect OpenClaw to Slack. You have two options:

Option A: Config File (Recommended) — Edit your OpenClaw configuration with openclaw config edit and add the Slack channel configuration:

Option B: Environment Variables — For simpler setups or Docker deployments, use environment variables. Note: Environment variable fallback only works for the default Slack account. For multi-workspace setups, use the config file.

{
  channels: {
    slack: {
      enabled: true,
      mode: "socket",
      appToken: "xapp-1-A0123456789-1234567890123-abc123...",
      botToken: "xoxb-1234567890-1234567890123-abc123...",
    },
  },
}
services:
  openclaw:
    environment:
      - SLACK_APP_TOKEN=xapp-...
      - SLACK_BOT_TOKEN=xoxb-...

Step 4: Start the Gateway

Restart OpenClaw to pick up the new configuration. Then check that Slack connected successfully. You should see output confirming the Slack channel is connected. If you're following the logs, look for a line like "Slack: Socket Mode connected" — that means you're live.

openclaw gateway restart
openclaw channels status --probe
openclaw logs --follow

Step 5: Test It

Test DMs: Open Slack and navigate to Apps in your sidebar. Find your OpenClaw bot and click on it. Type a message like "What can you help me with?" and you should get a response within seconds.

Test Channel Mentions: Invite the bot to a channel with /invite @OpenClaw, then mention it: @OpenClaw summarize the last 10 messages. The bot responds in a thread by default.

Test Slash Commands: Type /openclaw what's the weather in Tokyo? in any channel where the bot is present.

Configuring Access Control

One of OpenClaw's strengths in Slack is granular access control. You can precisely define who talks to the bot and where.

DM Access Policy — The dmPolicy setting controls who can DM the bot. Options include: "pairing" (default, new users need approval), "allowlist" (only pre-approved users), "open" (anyone can DM), and "disabled" (no DMs). Pairing mode is the default and most secure option for personal use.

Channel Access Policy — Control which Slack channels the bot responds in with groupPolicy. Use "open" (responds in all channels it's invited to), "allowlist" (only specific channels, recommended), or "disabled" (no channel responses). Use channel IDs for stability since names can change.

Per-Channel Skills and Tools — You can restrict which skills and tools are available in specific channels. This is incredibly useful for enterprise deployments. Your #engineering channel gets coding tools, while #customer-support gets task management and email access.

{
  channels: {
    slack: {
      dmPolicy: "pairing",
      groupPolicy: "allowlist",
      channels: {
        "C0123456789": {
          requireMention: true,
          users: ["U0123456789"],
        },
        "C9876543210": {
          requireMention: false,
          allowBots: false,
          systemPrompt: "You are a customer support agent. Be helpful and professional.",
        },
      },
    },
  },
}

Skip 60 minutes of setup — deploy in 60 seconds

DoneClaw handles Docker, servers, security, and updates. Your OpenClaw agent is ready to chat in under a minute.

Deploy Now

Advanced Features

Interactive Replies (Buttons and Menus) — OpenClaw can render interactive Slack UI elements — buttons, select menus, and more — directly in its responses. Enable interactiveReplies in the capabilities config. Once enabled, your agent can emit directives like [[slack_buttons: Approve:approve, Reject:reject]] for clickable buttons or [[slack_select: Choose a target | Canary:canary, Production:production]] for dropdowns. These compile into Slack Block Kit elements automatically. Note: Interactive replies are Slack-specific and won't translate to other channels.

Native Text Streaming — OpenClaw supports live text streaming in Slack — you see the response being typed in real-time. Requirements: Enable Agents and AI Apps in your Slack app settings, your app needs the assistant:write scope, and a reply thread must be available. Streaming modes: "off" (no preview, response appears all at once), "partial" (replaces preview text with latest output, recommended), "block" (appends chunked updates), "progress" (shows status text during generation, then final result).

Slash Commands — For quick interactions, slash commands let users invoke OpenClaw without typing a mention. Enable native slash commands for richer functionality. When native commands are enabled, register matching slash commands in your Slack app settings. Use /agentstatus instead of /status (Slack reserves that name).

Threading and Session Management — Each Slack thread gets its own OpenClaw session, meaning conversation context stays isolated per thread. Configure replyToMode ("off", "first", "all") or use replyToModeByChatType for per-chat-type settings. Thread options include historyScope, inheritParent, and initialHistoryLimit.

Acknowledgement Reactions — Show users their message was received with an emoji reaction while OpenClaw processes. Set ackReaction (e.g., "eyes" for the eye emoji) and typingReaction (e.g., "hourglass_flowing_sand"). Both are removed automatically when the reply is sent.

{
  channels: {
    slack: {
      capabilities: {
        interactiveReplies: true,
      },
      streaming: "partial",
      nativeStreaming: true,
      commands: {
        native: true,
      },
      replyToMode: "first",
      ackReaction: "eyes",
      typingReaction: "hourglass_flowing_sand",
    },
  },
}

Socket Mode vs. HTTP Events API

OpenClaw supports two connection modes for Slack. Socket Mode is simpler (no public URL needed), firewall-friendly (outbound WebSocket only), but has slightly higher latency (~50ms) and is good for single instances. HTTP Events API requires a public URL or reverse proxy, has lower latency, and is better for high-traffic multi-instance deployments. Both support multi-workspace setups.

Switch to HTTP mode if you're handling high message volumes (>100 messages/minute), need load balancing across multiple OpenClaw instances, or your infrastructure already has a public URL and reverse proxy. Set the Event Subscriptions, Interactivity, and Slash Command Request URLs in Slack to point to your public URL + webhook path.

{
  channels: {
    slack: {
      enabled: true,
      mode: "http",
      botToken: "xoxb-...",
      signingSecret: "your-signing-secret",
      webhookPath: "/slack/events",
    },
  },
}

Multi-Workspace Setup

If you need to connect OpenClaw to multiple Slack workspaces — say, your personal workspace and your company's — use named accounts. Each account can have its own access policies, channel configs, and even separate capabilities. Named accounts inherit top-level channels.slack settings when their own aren't set.

{
  channels: {
    slack: {
      enabled: true,
      accounts: {
        personal: {
          appToken: "xapp-personal-...",
          botToken: "xoxb-personal-...",
          dmPolicy: "open",
          allowFrom: ["*"],
        },
        company: {
          appToken: "xapp-company-...",
          botToken: "xoxb-company-...",
          dmPolicy: "pairing",
          groupPolicy: "allowlist",
          channels: {
            "C_TEAM_CHANNEL": { requireMention: true },
          },
        },
      },
    },
  },
}

Configuring SOUL.md for Slack

Your agent's personality matters in Slack just as much as anywhere else. Add Slack-specific guidelines to your SOUL.md to control behavior like using code blocks for technical content, keeping initial responses concise, using emoji reactions to acknowledge without cluttering, respecting Slack's 4,000-character chunk limit, and threading long conversations automatically.

## Slack Behavior
- Use code blocks (```) for technical content
- Keep initial responses concise; elaborate in threads
- Use emoji reactions to acknowledge without cluttering
- In channels, only respond when @mentioned or in active threads
- Use Block Kit formatting where appropriate
- Respect Slack's 4,000-character chunk limit
- Pin important information when asked
- Thread long conversations automatically

Real-World Use Cases

1. Team Knowledge Base Assistant — Deploy OpenClaw in #ask-anything to answer questions using your company docs. Configure requireMention: false so it responds to all questions, and add skills like brave-search for web lookups.

2. DevOps Alert Triage — Connect to your #alerts channel to automatically triage and summarize monitoring alerts. Set allowBots: true to accept messages from monitoring bots, and use interactive buttons for acknowledgment and escalation workflows.

3. Personal AI Assistant via DM — The simplest setup: use OpenClaw as your private Slack assistant. Set dmPolicy to allowlist with only your user ID, giving you full access to all configured skills including email, calendar, web search, and coding.

4. Customer Support Agent — Route support channels through OpenClaw with appropriate guardrails. Use a professional system prompt, restrict tools to messaging profile, and offer escalation to human agents when the AI is unsure.

Troubleshooting

Bot Doesn't Respond in Channels — Check in this order: Is groupPolicy set to allowlist without the channel listed? Is the channel ID (not name) in the config? Is the bot being @mentioned (default is mention-required)? Is there a per-channel users list excluding the sender? Run openclaw channels status --probe and openclaw doctor for diagnostics.

Bot Doesn't Respond to DMs — Check the DM policy with openclaw config get channels.slack.dmPolicy. If using pairing mode, check pending pairings with openclaw pairing list slack. Verify the App Home Messages Tab is enabled in Slack app settings.

Socket Mode Won't Connect — Verify both tokens are correct and haven't been regenerated. Confirm Socket Mode is enabled in your Slack app settings. Check that your App Token has the connections:write scope. Check logs with openclaw logs --follow --filter slack.

HTTP Mode Not Receiving Events — Verify your signing secret matches the one in Slack app settings. Confirm your webhook URL is publicly accessible. Check that Event Subscriptions, Interactivity, and Slash Commands all point to the same URL.

Messages Getting Truncated — Slack has a 4,000-character limit per message block. OpenClaw automatically chunks longer responses. Configure textChunkLimit and chunkMode ("newline" splits at paragraph boundaries) to customize behavior.

Slash Commands Not Working — Check if native commands are enabled. Verify the slash command is registered in Slack app settings. Remember to use /agentstatus instead of /status (Slack reserves it).

Security Best Practices

Follow these security recommendations for production Slack deployments:

  • Use pairing mode for DMs — Don't set dmPolicy: "open" unless you specifically need it. Pairing ensures only authorized users can interact with your agent.
  • Use channel IDs, not names — Channel names can be changed; IDs are stable. Right-click any channel and select "View channel details" to find the ID.
  • Restrict tools per channel — Use toolsBySender to give different users different capabilities. Admins can get full access while others get messaging-only profiles.
  • Rotate tokens regularly — If you suspect a token leak, regenerate both tokens immediately in Slack app settings and update your OpenClaw config.
  • Review the security hardening guide — The OpenClaw security hardening checklist covers additional measures for production deployments.

Cost Considerations

Running OpenClaw in Slack uses AI model tokens for every interaction. Rough estimates: A personal DM assistant with 20 messages/day costs $5–15/month. A team channel with 50 messages/day runs $15–40/month. Multi-channel enterprise with 200+ messages/day costs $40–120/month.

These estimates assume Claude Sonnet or GPT-4o. Using cheaper models or Ollama for local inference can reduce costs significantly.

Conclusion

You've got OpenClaw running in Slack. Here are some natural next steps: Add more channels by connecting Telegram or WhatsApp for mobile access. Customize your agent with SOUL.md and best practices. Add skills by browsing ClawHub for pre-built capabilities. Optimize costs with the token cost reduction guide. Harden security by completing the security checklist. Don't want to manage servers, Docker, and updates yourself? DoneClaw gives you a fully managed OpenClaw agent with Slack integration pre-configured. Deploy in under 60 seconds, with automatic updates, monitoring, and support included.

Skip the setup? DoneClaw deploys OpenClaw for you — $29/mo with 7-day free trial, zero configuration.

Skip 60 minutes of setup — deploy in 60 seconds

DoneClaw handles Docker, servers, security, and updates. Your OpenClaw agent is ready to chat in under a minute.

Deploy Now

Frequently asked questions

Can I use OpenClaw in Slack without a public URL?

Yes. Socket Mode is the default and recommended mode. It uses an outbound WebSocket connection, so no inbound ports or public URLs are needed. This works perfectly behind firewalls and NATs.

Does OpenClaw work in Slack Connect (shared channels)?

Yes, OpenClaw can operate in Slack Connect channels. The bot needs to be installed in at least one of the connected workspaces, and channel access controls apply normally. Be extra cautious with access policies in shared channels since external users may be present.

Can multiple people use the same OpenClaw Slack bot?

Absolutely. Each user gets their own DM session with the bot, and channel conversations are shared. Use dmPolicy: "pairing" to control who gets DM access, and per-channel users allowlists to restrict channel interactions.

Can I use OpenClaw with Slack's free plan?

Yes. OpenClaw's Slack integration works with Slack's free tier. The main limitation is Slack's free plan only retains 90 days of message history, but this doesn't affect OpenClaw's functionality since the agent maintains its own persistent memory.

Can OpenClaw read and respond to Slack threads?

Yes. OpenClaw has full thread support. Each thread gets its own session context, and you can configure thread behavior with replyToMode, thread.historyScope, and thread.initialHistoryLimit. The bot can also initiate threads and fetch thread history when joining an existing conversation.