How to Integrate OpenClaw with Slack: Complete Setup Guide 2026
Connect OpenClaw to Slack using Socket Mode or the Events API. Covers scopes, signing, allowlists, threading, rate limits, and real team automation patterns.
Slack is where work lives. It's also where work gets buried. Important alerts scroll past. The same question gets asked ten times. Decisions happen in threads nobody can find a week later.
OpenClaw can fix a lot of that. It acts as a Slack bot that actually remembers context, answers questions from your docs, triages support requests, and runs repeatable actions β without flooding every channel with bot noise.
But Slack integration is more complex than Telegram or Discord. There are two connection modes, OAuth scopes to get right, request signing to validate, threading behavior to configure, and rate limits to respect. Skip any of these and you'll end up with a bot that either doesn't work or annoys your entire team.
This guide covers how to set it up properly.
π Choose your path: Self-hosted setup β β’ Managed setup with ClawdHost (60 sec)
How OpenClaw Connects to Slack
OpenClaw supports two connection modes. Which one you use depends on your deployment and how strict your network is.
Socket Mode
Socket Mode keeps a long-lived WebSocket connection to Slack. No inbound HTTP endpoint required β which is useful if you're behind a firewall, testing locally, or don't want to expose a public webhook.
You'll need two tokens:
- App Token (
xapp-...) β for the Socket Mode connection - Bot Token (
xoxb-...) β for OAuth and API calls
Enable Socket Mode in your Slack app settings and subscribe to the events you need. OpenClaw keeps the connection alive and refreshes the WebSocket URL automatically.
One limit to know: Slack allows up to 10 open WebSocket connections per app. In practice, one connection handles many channels fine. You'll only hit this if you're running multiple gateway instances.
Best for: Development, testing, deployments behind firewalls, simpler setups.
HTTP Events API
HTTP mode uses Slack's Events API, which sends POST requests to your server over HTTPS. This is the production-grade option β it scales horizontally without managing WebSocket connection state.
You configure a public Request URL for Event Subscriptions (usually something like https://yourdomain.com/slack/events). Point Interactivity and Slash Commands at the same URL so one ingress handles everything.
HTTP mode is stateless. Each event is its own request, and you verify authenticity using Slack's signing process.
Best for: Production deployments, teams that need horizontal scaling, environments with strict connection policies.
Create the Slack App
- Go to api.slack.com/apps
- Click Create New App β From scratch
- Name it (e.g., "OpenClaw") and select your workspace
- In the left sidebar, go to OAuth & Permissions
Set OAuth Scopes
Under Bot Token Scopes, add the minimum scopes you need:
Essential:
chat:writeβ Send messageschannels:historyβ Read public channel messagesgroups:historyβ Read private channel messagesim:historyβ Read DM messageschannels:readβ Discover public channelsgroups:readβ Discover private channels
Optional (add as needed):
reactions:read/reactions:writeβ Read and add emoji reactionsfiles:read/files:writeβ Access and upload filespins:writeβ Pin messagesusers:readβ Look up user profiles
Start minimal. You can always add more scopes later β Slack admins prefer apps that don't ask for everything on day one.
Install to Workspace
- Click Install to Workspace and authorize
- Copy the Bot User OAuth Token (
xoxb-...) - If using Socket Mode, go to Basic Information β App-Level Tokens β Generate Token with
connections:writescope. Copy the App Token (xapp-...)
Subscribe to Events
Go to Event Subscriptions and enable events.
If using HTTP mode, enter your Request URL here. Slack will send a verification challenge β your server needs to respond correctly.
Subscribe to bot events:
message.channelsβ Messages in public channelsmessage.groupsβ Messages in private channelsmessage.imβ Direct messagesapp_mentionβ When someone mentions @OpenClaw
Add Tokens to OpenClaw
Option A: Environment variables (recommended)
export SLACK_BOT_TOKEN="xoxb-your-bot-token"
export SLACK_APP_TOKEN="xapp-your-app-token" # Socket Mode only
export SLACK_SIGNING_SECRET="your-signing-secret" # HTTP mode only
Option B: OpenClaw config (~/.openclaw/config.json)
{
"channels": {
"slack": {
"enabled": true,
"botToken": "xoxb-your-bot-token",
"appToken": "xapp-your-app-token",
"signingSecret": "your-signing-secret"
}
}
}
Keep tokens out of your repo. Environment variables or a secrets manager is the way to go. If you're on a VPS, lock down file permissions on any config that contains tokens.
Slack Request Signing (HTTP Mode)
If you're using the Events API, you need to validate every incoming request. Slack signs each request with your app's Signing Secret so you can verify it's actually from Slack and not an attacker.
Two details people get wrong constantly:
- Use the raw request body for HMAC computation. Don't stringify a parsed JSON object and assume it matches β it won't.
- Reject old timestamps to block replay attacks. Check the
X-Slack-Request-Timestampheader and reject anything older than 5 minutes.
Slack's official guide walks through this step by step: Verifying requests from Slack.
Channel Policy and Allowlists
The fastest way to get your Slack bot muted by the entire team is letting it respond everywhere. OpenClaw supports channel policies that keep the bot useful without being noisy:
- Open β Respond in any channel it's invited to
- Disabled β Don't respond in channels at all
- Allowlist β Only respond in explicitly listed channels
Example config:
{
"channels": {
"slack": {
"enabled": true,
"channelPolicy": "allowlist",
"dm": { "enabled": false },
"channels": {
"C0123ABCDEF": {
"allow": true,
"requireMention": true
},
"C0456GHIJKL": {
"allow": true,
"requireMention": false
}
}
}
}
}
Per-channel settings that work well in real teams:
requireMentionin #general so OpenClaw only answers when taggedallow: falsein #announcements so it never replies there- Restrict sensitive actions (file uploads, running commands) to specific user IDs
- Channel-specific system prompts for tone and boundaries
That last one is underrated. Your #support channel needs short, friendly answers. Your #engineering channel can handle logs and stack traces. One global personality rarely fits both.
DM Pairing
Direct messages feel private, which means people share things there they probably shouldn't. A pairing flow adds a gate: when a new user DMs OpenClaw, they get a short-lived pairing code that an admin approves before the bot continues the conversation.
If your workspace is fully internal and you trust every member, you can open DMs without pairing. But for larger orgs or workspaces with external guests, keep pairing enabled. Slack connects people fast. Trust takes longer.
Threading Options
Slack threads are polarizing. Some teams live in them. Others pretend they don't exist. OpenClaw can adapt with a reply mode setting:
- off β Reply in the channel (unless the original message was already in a thread)
- first β First reply goes in a thread, follow-ups go in-channel
- all β Always reply in a thread under the triggering message
A practical default: off in channels and threaded for DMs. Keeps channels readable while preserving context where it matters.
Sessions and Memory
OpenClaw keeps session memory per conversation. Each channel gets its own session, so history doesn't leak across channels. Slash commands can use user-keyed sessions so each person gets continuity even when they invoke the bot from different places.
This is what makes OpenClaw feel like it "remembers" β it actually does. But that also means you should think about which channels are allowed to build long-lived context. Your #random channel is not a great place for persistent memory.
Rate Limits and Retries
Slack enforces rate limits on its Web API. The key one: chat.postMessage generally allows one message per second per channel, with workspace-wide limits on top of that.
If you're posting to multiple channels at once (like an incident summary), plan for queuing and backoff. Don't just loop and hope for the best.
Events API Retries
If your endpoint times out or returns an error, Slack retries the same event β up to three times with headers like x-slack-retry-num.
This means your handlers must be idempotent. Store processed event IDs or message timestamps and ignore duplicates. It's tedious but it prevents double-posts that annoy everyone.
Real Team Automation Patterns
Here are patterns that tend to survive after the initial novelty wears off:
Incident and Deploy Notifications
Post a short alert, then let people ask follow-up questions in-thread. Add quick reactions for triage priority. If nobody responds within a set time, have OpenClaw DM the on-call engineer.
Approvals
A single emoji reaction as an approval signal works well for small teams. For audit trails, use slash commands like /approve and /reject that write to your internal system.
Internal Docs Lookup
People ask "where is the runbook?" because Slack search is bad. OpenClaw can fetch the right doc link and keep short memory of what your team already tried. If the bot answers the same question ten times, your docs need updating β not more bot answers.
Support Routing
In a shared #support channel, OpenClaw can categorize issues and post a structured summary. Integrate with a ticketing system and it can create tickets, then post updates back into the thread as the issue progresses.
Daily Standups
OpenClaw can prompt team members for standup updates at a scheduled time, collect responses, and post a summary. No more standup meetings where everyone stares at their screens.
Start OpenClaw and Test
Start the gateway:
openclaw gateway --port 18789 --verbose
In Slack, go to an allowed channel and mention the bot:
@OpenClaw are you online?
If it responds, you're set. If it doesn't:
- Check the gateway logs for connection errors
- Verify your bot token and app token are correct
- Confirm the bot is invited to the channel (
/invite @OpenClaw) - Make sure event subscriptions are enabled in your Slack app settings
- For HTTP mode, verify your Request URL passed Slack's challenge
Security Checklist
- β Store tokens in environment variables, not in code
- β Validate request signatures in HTTP mode
- β Use allowlist channel policy β not open
- β Require mentions in public channels
- β Disable DMs or enable pairing for unknown users
- β Restrict sensitive actions to specific user IDs
- β Set billing alerts on your LLM provider dashboard
- β Keep the gateway port (18789) behind a firewall
- β
Run
chmod 600on any config files containing tokens
For a deeper security guide, see our Clawdbot security deep dive.
FAQ
Do I need to write code for this?
No. You configure the Slack app in the Slack API portal and set up OpenClaw with config files. OpenClaw handles the connection, event processing, and responses.
Socket Mode or Events API β which should I use?
Socket Mode for development, testing, or deployments behind firewalls. Events API for production, horizontal scaling, or when your org requires stateless HTTP integrations.
How do I restrict the bot to specific channels?
Use channelPolicy: "allowlist" in your OpenClaw config, then list the channel IDs you want to allow. Enable requireMention in busy channels.
How do I prevent duplicate bot replies?
Make your event handlers idempotent by tracking processed event IDs. Slack retries failed events up to three times β without deduplication, you'll get double or triple posts.
How do I rotate a compromised token?
Go to your Slack app settings β OAuth & Permissions β Reinstall to Workspace for a new bot token. For app tokens, go to Basic Information β App-Level Tokens and regenerate. Update your OpenClaw config and restart the gateway.
Can I run Slack alongside Discord and Telegram?
Yes. OpenClaw supports multiple platforms simultaneously from the same instance. Each platform gets its own config section and its own channel policies.
How much does this cost?
The Slack integration itself is free. Your costs are VPS hosting ($5-20/month) plus LLM API usage. Active Slack workspaces can generate significant token usage β set billing alerts early.
Skip the Setup: ClawdHost
Slack integration has more moving parts than Discord or Telegram. App tokens, bot tokens, signing secrets, event subscriptions, Socket Mode vs HTTP, threading config, rate limit handling β it's a lot to get right and keep running.
ClawdHost handles all of it.
How It Works
- Sign up at clawdhost.net
- Add your LLM API key (Claude, GPT, OpenRouter, or others)
- Connect Slack β follow the guided setup to link your Slack app
- Done β OpenClaw is live in your Slack workspace
No VPS. No config files. No signing secrets to manage.
What You Get
| Self-Hosted | ClawdHost | |
|---|---|---|
| Setup time | 30-60 minutes | 60 seconds |
| Connection mode | You configure Socket/HTTP | Pre-configured |
| Request signing | Your responsibility | Handled |
| Token management | Manual rotation | Managed securely |
| Rate limit handling | You implement it | Built-in |
| OpenClaw updates | Manual | Automatic |
| Multi-platform | Configure each yourself | Built-in (Slack + Discord + Telegram) |
| Cost | $5-20/mo VPS + your time | $29/mo |
Built-In Features
- β Your Own VPS β Your instance runs in complete isolation
- β Pre-configured Slack integration β Socket Mode ready, signing handled
- β Channel allowlists β Set up from the ClawdHost dashboard
- β Automatic updates β Latest OpenClaw features without manual work
- β Encrypted credentials β AES-256 encryption for all tokens and keys
- β Multi-platform support β Slack, Discord, Telegram from one dashboard
- β 24-hour money-back guarantee β Try it risk-free
When to Self-Host vs Use ClawdHost
Self-host if:
- You need Events API with custom HTTP handling
- You want full control over every config detail
- You already manage infrastructure for your team
- You want to learn how OpenClaw's Slack integration works internally
Use ClawdHost if:
- You want OpenClaw in Slack without the operational overhead
- Your team needs it running today, not after a weekend of setup
- You want multi-platform support (Slack + Discord + Telegram) from one place
- You'd rather focus on using the bot than maintaining it
Get started with ClawdHost β | See how it works β
Sources
Related Articles
OpenClaw Docker Setup: Common Problems & How to Skip Docker Entirely
Docker is the default way to run OpenClaw, but it comes with real problems β port conflicts, permission errors, memory issues, and upgrade crashes. Here's how to fix them, or skip Docker altogether.
Hostinger vs ClawdHost for OpenClaw: VPS DIY or Managed Hosting?
Hostinger offers cheap VPS with a 1-click OpenClaw template. ClawdHost offers fully managed hosting. Here's an honest comparison β pricing, setup, maintenance, and who should pick which.
7 Best OpenClaw Hosting Providers Compared (March 2026)
An honest comparison of every major OpenClaw hosting provider β pricing, features, and who each one is actually best for. No fluff, real trade-offs.