🦞
Channel Integration

Connect OpenClaw to Slack

Add OpenClaw to your Slack workspace. Get AI assistance in channels, threads, or DMs with slash command support.

💼 Why Use Slack?
  • WebSocket ConnectionReal-time messaging via Slack Bot API + Socket Mode
  • Slash CommandsNative /clawd command interface
  • Thread SupportKeep conversations organized with history context
  • Rich FormattingFormatted responses with reactions and pins
  • Flexible AccessDMs, public channels, and private channels
Requirements
  • Slack Bot TokenStarts with xoxb-...
  • Slack App TokenStarts with xapp-... (for Socket Mode)
  • Slack AppWith appropriate OAuth scopes configured

Setup Steps

1

Create a Slack App

Go to the Slack API portal and create a new application:

  • • Visit api.slack.com/apps
  • • Click "Create New App"
  • • Choose "From scratch"
  • • Name it (e.g., "OpenClaw") and select your workspace
2

Add Bot Token Scopes

Configure OAuth permissions for your bot:

  • • Go to "OAuth & Permissions" in the sidebar
  • • Under "Bot Token Scopes", add:
  • - app_mentions:read — Read mentions
  • - channels:history — View channel messages
  • - channels:read — View channel info
  • - chat:write — Send messages
  • - im:history — View DM history
  • - im:read — View DM info
  • - im:write — Start DM conversations
  • - reactions:write — Add reactions
  • - users:read — View user info
3

Enable Socket Mode

Socket Mode allows real-time communication without a public URL:

  • • Go to "Socket Mode" in the sidebar
  • • Toggle "Enable Socket Mode" on
  • • Generate an App-Level Token with connections:write scope
  • • Copy the token (starts with xapp-...)
4

Install App to Workspace

Install the app and get your Bot Token:

  • • Go to "Install App" in the sidebar
  • • Click "Install to Workspace"
  • • Authorize the requested permissions
  • • Copy the Bot User OAuth Token (starts with xoxb-...)
5

Configure OpenClaw

Add the Slack configuration to your openclaw.json:

{
  "channels": {
    "slack": {
      "enabled": true,
      "botToken": "xoxb-...",
      "appToken": "xapp-..."
    }
  }
}
6

Invite Bot to Channels

Add the bot to channels where you want it to respond:

  • • Open the channel in Slack
  • • Type /invite @OpenClaw
  • • Or click the channel name -> Integrations -> Add apps
  • • Restart OpenClaw with openclaw restart and test by mentioning the bot.
Features

Thread Support

Maintains conversation context within threads with configurable history scope.

Emoji Reactions

Bot can add reactions to acknowledge messages or indicate status.

Message Pinning

Pin important responses for easy reference later.

Slash Commands

Use /clawd for quick AI queries from anywhere.

Member Info

Look up workspace member information when needed.

DM Support

Private one-on-one conversations with the bot.

Advanced Configuration

Full configuration options for Slack integration:

{
  "channels": {
    "slack": {
      "enabled": true,
      "botToken": "xoxb-...",
      "appToken": "xapp-...",
      "dm": {
        "enabled": true,
        "policy": "pairing",
        "allowFrom": ["U123", "U456"]
      },
      "channels": {
        "#general": {
          "allow": true,
          "requireMention": true,
          "users": ["U123"]
        }
      },
      "historyLimit": 50,
      "slashCommand": {
        "enabled": true,
        "name": "clawd"
      },
      "actions": {
        "reactions": true,
        "messages": true,
        "pins": true
      }
    }
  }
}
  • dm.enabledAllow direct messages to the bot
  • dm.policyDM access policy ("pairing" or "open")
  • dm.allowFromArray of user IDs allowed to DM
  • channelsPer-channel configuration object
  • requireMentionOnly respond when @mentioned
  • historyLimitNumber of messages to include for context
  • slashCommandConfigure slash command settings
  • actionsEnable/disable reactions, messages, and pins
Channel Policies

Allowlist Mode

Only respond in explicitly configured channels. Best for controlled environments.

Open Mode

Respond in all channels where the bot is invited. Use requireMention to gate responses.

How to Get Slack User IDs

From Profile:

Click on a user's name -> View profile -> Click the three dots (...) -> Copy member ID

From Slack Admin:

Workspace Settings -> Manage Members -> Export member list as CSV

⚠️ Troubleshooting

Bot not responding in channels?

Make sure the bot is invited to the channel and has the correct scopes. Check if requireMention is enabled.

Socket Mode connection errors?

Verify your App Token (xapp-...) is correct and has the connections:write scope.

Slash command not showing?

Go to "Slash Commands" in your Slack app settings and create the command manually, pointing it to Socket Mode.

Permission denied errors?

Reinstall the app to your workspace after adding new scopes. Some scope changes require re-installation.

Slack Connected!

Now configure more channels or enhance your bot with custom skills.