Complete guide to connecting Slack with OpenClaw (formerly Moltbot, Clawdbot)
New to channel setup? For a hands-on, step-by-step tutorial, check out our Channel Setup Tutorial. This page is a comprehensive reference covering all Slack features and configuration options.
Slack is a popular team collaboration platform. OpenClaw (formerly Moltbot, Clawdbot) connects to Slack workspaces using the Bolt framework, providing DMs, channels, and workspace automation capabilities.
Setting up Slack requires creating a Slack app:
Enable Socket Mode (required for OpenClaw):
connections:write scopexapp-)chat:write, im:read, im:write, channels:readxoxb-)Configure Slack in your OpenClaw configuration file:
{
"channels": {
"slack": {
"botToken": "xoxb-your-bot-token",
"appToken": "xapp-your-app-token"
}
}
}
Alternatively, use environment variables (environment variables take precedence):
export SLACK_BOT_TOKEN="xoxb-your-bot-token"
export SLACK_APP_TOKEN="xapp-your-app-token"
Control who can send direct messages to your OpenClaw assistant:
{
"channels": {
"slack": {
"botToken": "xoxb-your-bot-token",
"appToken": "xapp-your-app-token",
"dm": {
"allowFrom": ["U1234567890", "U0987654321"]
}
}
}
}
Add Slack user IDs to the allowFrom array to control DM access. You can find user IDs in Slack by right-clicking a user and selecting "View profile".
OpenClaw can interact in Slack channels:
dm.allowFrom to control accessIf the bot doesn't respond:
If DMs aren't working:
dm.allowFrom configurationU)im:read and im:write scopesIf Socket Mode fails:
connections:write scopexapp-