Slack Setup
Complete guide to connecting Slack with OpenClaw
Complete guide to connecting Slack with OpenClaw
New to Slack? Start with the Slack bot quickstart. This page is the comprehensive reference for scopes, Socket Mode, streaming, and advanced configuration.
Slack is a popular team collaboration platform. OpenClaw 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-