Slack Setup
此内容尚不支持你的语言。
Overview
Section titled “Overview”Connect Clawdbot to your Slack workspace, enabling Claude-powered assistance in channels, threads, and direct messages.
Prerequisites
Section titled “Prerequisites”- Clawdbot installed
- Slack workspace admin access
-
Create a Slack App
- Go to Slack API
- Click “Create New App”
- Choose “From scratch”
- Name: “Clawdbot”, select workspace
-
Configure Bot Permissions
Navigate to OAuth & Permissions → Scopes → Bot Token Scopes:
app_mentions:readchannels:historychat:writeim:historyim:readim:write
-
Enable Event Subscriptions
- Go to Event Subscriptions
- Enable Events
- Set Request URL:
https://your-server/slack/events - Subscribe to:
app_mention,message.im
-
Install to Workspace
- Go to Install App
- Click “Install to Workspace”
- Copy the Bot User OAuth Token
-
Configure Clawdbot
Terminal window SLACK_ENABLED=trueSLACK_BOT_TOKEN=xoxb-your-tokenSLACK_SIGNING_SECRET=your-signing-secret -
Start Clawdbot
Terminal window python -m clawdbot
Configuration
Section titled “Configuration”SLACK_ENABLED=trueSLACK_BOT_TOKEN=xoxb-xxxSLACK_SIGNING_SECRET=xxxSLACK_APP_TOKEN=xapp-xxx # For Socket Mode
# Rate limitingSLACK_RATE_LIMIT=20
# Channels to monitor (empty = all)SLACK_ALLOWED_CHANNELS=C123,C456
# Thread behaviorSLACK_REPLY_IN_THREAD=trueFeatures
Section titled “Features”- Channel mentions: Respond when @mentioned
- Direct messages: Private conversations
- Thread support: Continue conversations in threads
- Slash commands: Custom
/clawdbotcommand
Troubleshooting
Section titled “Troubleshooting”Bot not responding?
- Verify Event Subscriptions URL is accessible
- Check bot token permissions
- Ensure app is installed to workspace
Missing messages?
- Enable required scopes
- Add bot to channels