How to integrate OpenClaw with Slack?
Clawpedia · For Humans
Set up OpenClaw as a Slack bot to automate responses and workflows in your Slack workspace.
How to Integrate OpenClaw with Slack?
Slack is the dominant messaging platform in workplaces, and connecting OpenClaw to it gives your team an AI assistant directly in the channels where work happens. This guide covers setup, configuration, and best practices for professional use.
---
Why Slack?
| Feature | Benefit |
|---|
| Workplace standard | Where your team already communicates |
|---|
| App ecosystem | Native app installation experience |
|---|
| Channels & threads | Organized by topic and project |
|---|
| Slack Connect | Share your bot with external partners |
|---|
| Enterprise Grid | Multi-workspace support |
|---|
| Workflows | Integrate with Slack Workflow Builder |
|---|
---
Step 1: Create a Slack App
- Go to api.slack.com/apps
- Click Create New App → From scratch
- Name: "OpenClaw" (or your preferred name)
- Select your workspace
- Click Create App
Configure Bot Permissions
Go to OAuth & Permissions → Bot Token Scopes and add:
| Scope | Purpose |
|---|
chat:write | Send messages |
|---|
app_mentions:read | Respond when mentioned |
|---|
channels:history | Read channel messages |
|---|
channels:read | List channels |
|---|
files:read | Process uploaded files |
|---|
files:write | Upload files |
|---|
groups:history | Read private channel messages |
|---|
im:history | Read direct messages |
|---|
im:read | Identify DM channels |
|---|
im:write | Send DMs |
|---|
reactions:write | Add emoji reactions |
|---|
users:read | Identify users |
|---|
- Click Install to Workspace
- Authorize the permissions
- Copy the Bot User OAuth Token (
xoxb-...)
---
Step 2: Enable Event Subscriptions
- Go to Event Subscriptions → Enable Events
- Set the Request URL to your OpenClaw webhook endpoint:
https://openclaw.yourdomain.com/webhook/slack
- Under Subscribe to Bot Events, add:
app_mentionmessage.immessage.channels(optional — for all-channel mode)- Save Changes
Expose Your Endpoint
For testing (ngrok):
ngrok http 3777
# Use the https URL as your Request URL
For production:
server {
listen 443 ssl;
server_name openclaw.yourdomain.com;
location /webhook/slack {
proxy_pass http://localhost:3777;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
---
Step 3: Connect to OpenClaw
openclaw connect slack \
--bot-token xoxb-your-bot-token \
--signing-secret your-signing-secret
Or configure manually:
# ~/.openclaw/config.yaml
platforms:
slack:
enabled: true
bot_token: "xoxb-your-token"
signing_secret: "your-signing-secret"
app_token: "xapp-your-app-token" # For Socket Mode
Start the gateway:
openclaw gateway start
---
Step 4: Test
- Open Slack
- Invite the bot to a channel:
/invite @OpenClaw - Mention it:
@OpenClaw what can you help with? - You should see a response
---
Socket Mode (No Public URL Needed)
If you cannot expose a public webhook URL, use Socket Mode:
- Go to Socket Mode in your app settings → Enable
- Generate an App-Level Token with
connections:writescope - Configure:
platforms:
slack:
mode: socket
app_token: "xapp-1-your-app-token"
bot_token: "xoxb-your-bot-token"
Socket Mode connects outbound from your server — no firewall or reverse proxy needed.
---
Configuration Options
platforms:
slack:
enabled: true
bot_token: "xoxb-..."
signing_secret: "..."
# Response behavior
response_mode: mention # mention, dm_only, all
typing_indicator: true
use_blocks: true # Slack Block Kit formatting
thread_replies: true # Reply in threads
unfurl_links: false # Don't preview links in responses
# Access control
allowed_channels:
- "C01234ABCDE" # Channel IDs
allowed_users:
- "U01234FGHIJ" # User IDs
blocked_channels:
- "C09876ZYXWV" # Channels to ignore
# Features
file_processing: true
image_analysis: true
emoji_reactions: true # React with ✅ when processing
home_tab: true # Enable App Home tab
---
Slack Block Kit Formatting
When use_blocks is enabled, OpenClaw uses Slack's rich formatting:
- Headers for section titles
- Code blocks with syntax highlighting
- Bullet lists for structured information
- Dividers between sections
- Action buttons for interactive choices
---
Use Cases for Teams
1. Knowledge Base Assistant
@OpenClaw What's our refund policy?
→ Searches internal docs and responds
2. Code Review Helper
@OpenClaw review this PR: https://github.com/org/repo/pull/42
→ Summarizes changes, flags potential issues
3. Meeting Summaries
@OpenClaw summarize today's #standup channel
→ Extracts key updates from messages
4. Incident Response
@OpenClaw analyze these error logs [attachment]
→ Identifies root cause and suggests fixes
5. Onboarding Helper
New hire DMs: How do I set up my dev environment?
→ Step-by-step guide from internal docs
---
Slash Commands
Register custom slash commands in your Slack app:
| Command | Description |
|---|
/ask [question] | Quick question without mentioning |
|---|
/summarize | Summarize recent channel messages |
|---|
/translate [text] | Translate text |
|---|
/remind [message] | Set a reminder |
|---|
Set up in Slack app → Slash Commands → Create New Command.
---
Security for Workplace Use
Verify Request Signatures
OpenClaw automatically verifies Slack's request signatures using your signing secret, preventing spoofed requests.
Data Privacy
- Messages are processed by your configured AI provider
- No data is stored by OpenClaw beyond configured memory
- For sensitive workplaces, use local models via Ollama
Audit Logging
security:
audit_log: true
log_retention_days: 90
log_user_ids: true
---
Troubleshooting
Bot Not Responding to Mentions
- Check
app_mentionevent subscription - Ensure bot is invited to the channel:
/invite @OpenClaw - Verify bot token:
openclaw config get platforms.slack.bot_token - Check logs:
openclaw logs --filter slack
"not_authed" Error
Reinstall the app to your workspace and update the bot token.
"channel_not_found"
The bot needs to be invited to the channel first.
Slow Responses
Slack expects a response within 3 seconds. OpenClaw sends an acknowledgment immediately and follows up with the full response.
---
Summary
Slack integration turns OpenClaw into a team-wide AI assistant. Use Socket Mode for the simplest setup (no public URL needed), Block Kit for rich formatting, and thread replies to keep channels organized. With proper access controls and audit logging, OpenClaw is ready for professional environments.
Related Articles
- How to integrate OpenClaw with Microsoft Teams? — Deploy OpenClaw as a Microsoft Teams bot for enterprise AI assistance and workflow automation.
- How to integrate OpenClaw with Telegram? — Connect your OpenClaw agent to Telegram for private and group chat interactions using a Telegram bot token.
- OpenClaw for DevOps: Managing Servers and Services — Automate DevOps workflows with OpenClaw, from server monitoring to deployment pipelines.
- Triggering Webhooks and API Workflows from OpenClaw — Set up webhook triggers and API-based automation workflows powered by your OpenClaw agent.
- How to Use GPT-5.4 for Desktop Task Automation — Learn how OpenAI's GPT-5.4 surpasses human performance on desktop tasks and how you can build agents that automate your daily workflows.