← Channels Overview

💼 OpenClaw + Slack

Enterprise-ready with threads, reactions, admin controls, and app mentions. Uses Socket Mode — no public URL required. Perfect for developer workflows and team assistants.

Medium · ~15 minSocket Mode (WebSocket)Best for teams & work

🏢 Why Slack?

AdvantageDetails
Thread supportReply in threads — keeps conversations organized and channels clean.
No public URLSocket Mode uses WebSocket — works behind NAT, no port forwarding, no ngrok.
Enterprise readyAdmin controls, compliance features, audit logs — IT teams approve Slack integrations.
Mention-based activationAgent only responds when @mentioned in channels — no spam.
DMsDirect message the bot for private conversations alongside channel usage.
ReactionsAgent can read and add emoji reactions for quick feedback loops.
💡 Best for dev workflow: If your team already lives in Slack, OpenClaw becomes a native team member. PR review summaries, CI alerts, ticket creation — all delivered in-context. See the Dev Workflow Playbook.

📝 Create a Slack app

  1. Go to api.slack.com/apps
  2. Click “Create New App” → choose “From scratch”
  3. Name it (e.g., “OpenClaw”) and select your workspace
  4. You'll land on the Basic Information page — keep this tab open

🔑 Bot scopes (permissions)

Go to OAuth & PermissionsBot Token Scopes → add these:

ScopeRequired?Purpose
chat:write✅ RequiredSend messages
app_mentions:read✅ RequiredRespond when @mentioned
channels:history✅ RequiredRead public channel messages
groups:history✅ RequiredRead private channel messages
im:history✅ RequiredRead direct messages
im:read✅ RequiredKnow when DMs are opened
im:write✅ RequiredStart DM conversations
mpim:history✅ RequiredRead group DMs
reactions:readRecommendedRead emoji reactions
reactions:writeRecommendedAdd emoji reactions
pins:readOptionalRead pinned messages
pins:writeOptionalPin important messages
commandsOptionalSlash command support
✅ Minimum viable scopes: chat:write, app_mentions:read, channels:history, groups:history, im:history, im:read, im:write, mpim:history. Add the rest if you need reactions and pins.

🔌 Enable Socket Mode

  1. Go to Socket Mode in the sidebar → toggle it ON
  2. When prompted, create an App-Level Token with scope connections:write
  3. Name it anything (e.g., “openclaw-socket”) → click Generate
  4. Copy the token (starts with xapp-) — this is your Slack App Token

Then go to Event Subscriptions → toggle ON → add these bot events:

  • message.channels — messages in public channels
  • message.groups — messages in private channels
  • message.im — direct messages
  • message.mpim — group DMs
  • app_mention — when someone @mentions the bot
💡 Socket Mode vs Webhooks: Socket Mode uses WebSocket — your OpenClaw instance connects outbound to Slack (no public URL needed). This is ideal for local machines and VPS behind firewalls. Webhooks require a public HTTPS endpoint.

📥 Install to your workspace

  1. Go to OAuth & Permissions → click “Install to Workspace”
  2. Authorize the requested permissions
  3. Copy the Bot User OAuth Token (starts with xoxb-) — this is your Slack Bot Token

You now have two tokens:

TokenPrefixPurpose
App-Level Tokenxapp-Socket Mode connection
Bot User OAuth Tokenxoxb-API calls (send messages, etc.)

⚙️ Configure OpenClaw

// ~/.openclaw/openclaw.json
{
  "channels": {
    "slack": {
      "enabled": true,
      "botToken": "xoxb-...",
      "appToken": "xapp-...",
      "dmPolicy": "pairing"
    }
  }
}

Environment variables (alternative)

export SLACK_BOT_TOKEN="xoxb-..."
export SLACK_APP_TOKEN="xapp-..."

Restart the gateway: openclaw gateway restart

Go to Slack, DM the bot, and say “hello” to test the connection.

🧵 Thread-based conversations

Slack threads are a natural fit for OpenClaw sessions:

  • When someone @mentions the bot in a channel, the bot responds in a thread (not cluttering the main channel)
  • Each thread maintains its own conversation context
  • Multiple people can have separate threads going simultaneously
✅ Best practice from community: Create a Slack skill that instructs your agent to “always respond in threads and not as new messages.” This keeps channels clean and conversations easy to follow.

📢 Channel routing

Control where the bot responds:

{
  "channels": {
    "slack": {
      "groupPolicy": "allowlist",
      "groups": {
        "C_DEV_CHANNEL": {
          "requireMention": true
        },
        "C_AI_CHANNEL": {
          "requireMention": false,
          "activation": "always"
        }
      }
    }
  }
}

Channel IDs start with C. Right-click a channel → “View channel details” → copy the Channel ID at the bottom.

Cron delivery to Slack

openclaw cron add \
  --name "Morning dev briefing" \
  --cron "0 8 * * 1-5" \
  --session isolated \
  --message "Morning briefing: check open PRs and CI status" \
  --announce --channel slack \
  --to "channel:C_DEV_CHANNEL"

✨ Supported features

FeatureStatusNotes
Text messages✅ FullMarkdown, code blocks, mrkdwn format
Thread replies✅ FullBot replies in threads by default
@mentions✅ FullMention-based activation in channels
DMs✅ FullDirect messages with pairing/allowlist
Reactions✅ FullRead and write emoji reactions
File uploads✅ FullImages, PDFs, code files
Pins✅ FullPin important messages (with scope)
Slash commands✅ Full/status, /model, /reset
Voice / audio❌ NoSlack Huddles not supported
Multi-workspace⚠️ LimitedOne workspace per Slack app installation

🔧 Troubleshooting

ProblemFix
Bot doesn't respond to messagesCheck Event Subscriptions are ON and bot events (message.im, app_mention) are subscribed.
Bot responds but can't read messagesMissing scope. Add channels:history, im:history etc. Reinstall the app after adding scopes.
“not_authed” or “invalid_auth”Bot token is wrong or expired. Regenerate from OAuth & Permissions page.
Socket Mode won't connectCheck appToken (starts with xapp-) is correct and Socket Mode is enabled in the Slack app settings.
Bot can't DM usersMissing im:write scope. Add it and reinstall the app.
Messages in private channels not seenBot must be invited to the channel (/invite @OpenClaw) AND have groups:history scope.
Scopes changed but not workingAfter adding new scopes, you must reinstall the app to the workspace for changes to take effect.
⚠️ Common gotcha: After changing bot scopes, you must reinstall the app to your workspace. Go to OAuth & Permissions → “Reinstall to Workspace”. Simply restarting the gateway is not enough.