Quick Start
The fastest way to set up Slack is with the interactive onboarding:Creating a Slack App
Create a new app
- Go to Slack API: Your Apps
- Click “Create New App”
- Choose “From scratch”
- Give your app a name (e.g., “OpenClaw Bot”)
- Select the workspace where you want to install it
- Click “Create App”
Enable Socket Mode
- In the left sidebar, click “Socket Mode”
- Toggle “Enable Socket Mode” on
- Give your token a name (e.g., “OpenClaw Socket”)
- Click “Generate”
- Copy the app-level token (starts with
xapp-) - Save this token - you’ll need it later
Configure OAuth scopes
- Go to “OAuth & Permissions” in the sidebar
- Scroll to “Scopes” → “Bot Token Scopes”
- Add these scopes:
chat:write- Send messageschannels:history- Read public channel messageschannels:read- View public channelsgroups:history- Read private channel messagesim:history- Read DM messagesmpim:history- Read multi-person DM messagesusers:read- View usersapp_mentions:read- Receive @mentionsreactions:read- Read reactionsreactions:write- Add reactionsfiles:read- Read filesfiles:write- Upload filespins:read- Read pinned messagespins:write- Pin messagescommands- Use slash commands
Install app to workspace
- Go to “OAuth & Permissions”
- Click “Install to Workspace” (or “Reinstall to Workspace” if you added new scopes)
- Review permissions and click “Allow”
- Copy the Bot User OAuth Token (starts with
xoxb-) - Save this token - you’ll need it for configuration
Enable events (optional but recommended)
- Go to “Event Subscriptions” in the sidebar
- Toggle “Enable Events” on
- Under “Subscribe to bot events”, add:
app_mention- Bot @mentionsmessage.channels- Public channel messagesmessage.groups- Private channel messagesmessage.im- Direct messagesmessage.mpim- Multi-person DMsreaction_added- Reactions addedreaction_removed- Reactions removed
- Click “Save Changes”
Configuration
Using Environment Variables
The simplest way to configure Slack:Using Config File
Alternatively, store tokens directly inopenclaw.config.json:
| Key | Type | Default | Description |
|---|---|---|---|
enabled | boolean | false | Enable Slack channel |
botToken | string | - | Bot OAuth token (xoxb-…) or use SLACK_BOT_TOKEN env var |
appToken | string | - | App-level token (xapp-…) or use SLACK_APP_TOKEN env var |
dmPolicy | string | "pairing" | DM access policy: pairing, allowlist, open, disabled |
allowFrom | string[] | [] | Slack user IDs allowed to DM (e.g., ["U123ABC456"]) |
groupPolicy | string | "allowlist" | Channel access policy: allowlist, open, disabled |
channels | object | {} | Per-channel configuration (keys are channel IDs like C123ABC456) |
DM Policies
pairing(recommended): Unknown users get a pairing code; approve withopenclaw pairing approve slack <userId>allowlist: Only user IDs inallowFromcan DM the botopen: Anyone can DM the bot (setallowFrom: ["*"])disabled: Ignore all Slack DMs
Getting Your Slack User ID
Method 1: Check profile- Click your profile picture in Slack
- Select “Profile”
- Click the three dots → “Copy member ID”
- DM your bot in Slack
- Run
openclaw logs --follow - Look for a line like:
Channel Configuration
Allowlist Specific Channels
To restrict the bot to specific channels:- Right-click the channel in Slack
- Select “View channel details”
- Scroll to the bottom - the ID is at the end
Per-Channel Settings
| Key | Type | Default | Description |
|---|---|---|---|
allow | boolean | false | Enable bot in this channel |
requireMention | boolean | false | Only respond when bot is @mentioned |
allowFrom | string[] | [] | User IDs allowed to use the bot in this channel |
toolPolicy | string | "open" | Tool usage policy: open, allowlist, disabled |
Resolving Channel Names
OpenClaw can resolve channel names to IDs:Slash Commands
Slack slash commands let users trigger the bot with/command.
Creating a Slash Command
- Go to “Slash Commands” in your app settings
- Click “Create New Command”
- Set:
- Command:
/openclaw(or any name) - Request URL: Leave this for Socket Mode (not used)
- Short Description: “Talk to OpenClaw”
- Usage Hint:
[message]
- Command:
- Click “Save”
Thread Support
Slack threads are automatically detected and maintained. Messages in a thread will keep conversation context:Interactive Components
Slack supports buttons, select menus, and other interactive elements. OpenClaw can render these in responses:Multi-Account Support
You can connect to multiple Slack workspaces:Troubleshooting
Bot not responding to messages
Bot not responding to messages
Check these common issues:
-
Socket Mode is not enabled
- Go to Slack API → Socket Mode → Toggle on
-
Missing OAuth scopes
- Verify all required scopes are added (see setup steps)
- Reinstall the app after adding scopes
-
Channel not in allowlist
- Check
channelsconfiguration includes the channel ID
- Check
-
Bot not invited to channel
- Type
/invite @BotNamein the channel
- Type
Socket connection errors
Socket connection errors
Socket Mode requires both tokens:
- Bot token (xoxb-…) - from “OAuth & Permissions”
- App token (xapp-…) - from “Socket Mode”
Messages not appearing in logs
Messages not appearing in logs
Ensure Event Subscriptions are configured:
- Go to “Event Subscriptions” in Slack API
- Enable events
- Subscribe to:
message.channelsmessage.groupsmessage.imapp_mention
- Save and reinstall the app
Cannot send DMs to bot
Cannot send DMs to bot
Enable the Messages tab in App Home:
- Go to “App Home” in Slack API
- Enable “Messages Tab”
- Check “Allow users to send Slash commands and messages from the messages tab”
Invalid token error
Invalid token error
Check that your tokens are correct and not expired:
- Bot token starts with
xoxb- - App token starts with
xapp-
Security Considerations
- Keep tokens secret - they give full access to your bot and workspace
- Use environment variables instead of committing tokens to version control
- Rotate tokens if they may have been exposed
- Use allowlist mode for production bots
- Review OAuth scopes - only grant what’s needed
- Monitor bot activity via Slack’s audit logs
App Manifest (Quick Setup)
For quick setup, you can use this manifest when creating your app:Next Steps
Signal Setup
Set up Signal as another channel
Pairing Guide
Learn about pairing codes and approvals
Configuration Reference
Full configuration options
Multi-Channel
Using multiple channels together

