How to Connect OpenClaw with Slack: A Complete Guide
Anonymous
March 3, 2026
How to Connect OpenClaw with Slack: A Complete Guide
You've got OpenClaw running locally, and now you need to connect a Slack channel. Maybe you've already connected WhatsApp or Telegram, but Slack requires a bit more setup. Let's walk through the complete process.
Prerequisites
Before we begin, make sure you have:
- OpenClaw installed and running — If not, check out this guide on installing OpenClaw on DigitalOcean
- A Slack account — Sign up at slack.com using Apple or Google authentication
- A Slack workspace — You'll have one by default when you create your account
Overview
The Slack integration process involves:
- Creating a Slack app with the right permissions
- Obtaining Bot and App tokens
- Configuring OpenClaw with these tokens
- Enabling Socket Mode and event subscriptions
- Registering the Slack channel
Let's get started.
Step 1: Create a Slack App
First, we need to create a Slack application that will act as the bridge between OpenClaw and your Slack workspace.
Navigate to Slack API
- Go to api.slack.com/apps
- Click "Create App" in the top right
- Select "From an app manifest"
- Choose your workspace from the dropdown
Configure the Manifest
Slack apps use a manifest file to define permissions and features. OpenClaw provides a ready-to-use manifest in its documentation.
Copy this manifest and paste it into the manifest editor:
Click Next, review the configuration, and click Create.
Step 2: Obtain the Bot Token
Now that the app is created, we need to get the Bot Token (OAuth Token).
- In your app settings, scroll to "OAuth & Permissions" in the left sidebar
- Under "Bot Token Scopes", you should see the permissions from the manifest already configured
- Scroll down to "OAuth Tokens for Your Workspace"
- Click "Install to Workspace"
- Review the permissions and click "Allow"
- Copy the Bot User OAuth Token (starts with
xoxb-)
This token allows OpenClaw to post messages, react to messages, and interact with your workspace as a bot.
Step 3: Obtain the App-Level Token
Next, we need an App-Level Token for Socket Mode connections.
- In your app settings, click "Basic Information" at the top
- Scroll down to "App-Level Tokens"
- Click "Generate Token and Scopes"
- Give it a name (e.g., "OpenClaw App Token")
- Set the scope to
connections:write - Click "Generate Token"
- Copy the token (starts with
xapp-)
This token enables Socket Mode, which allows OpenClaw to receive real-time events from Slack without exposing a public webhook URL.
Step 4: Get Your User ID
To enable direct messages from your profile, we need your Slack user ID.
- In Slack, go to the bottom-left corner
- Click on your profile picture
- Select "Copy a link to profile" from the three-dot menu
- Paste the link — it will look like:
https://yourworkspace.slack.com/team/UXXXXXXXXXX - Extract the ID (the part after
/team/):UXXXXXXXXXX
This ID goes into the allowFrom array in OpenClaw's configuration.
Step 5: Configure OpenClaw
Now let's add the Slack channel to OpenClaw's configuration.
Access the Config
- Open your OpenClaw configuration file (usually
~/.openclaw/config.yamlor similar) - If available, switch to RAW/JSON mode to see the configuration as JSON
- Scroll to the bottom or find where channels are defined
Add Slack Configuration
Add the Slack channel configuration at the same level as other channels:
Replace the Tokens
Update these three fields:
appToken— Paste the token from Step 3 (starts withxapp-)botToken— Paste the token from Step 2 (starts withxoxb-)allowFrom— Replace with your user ID from Step 4
Important: Channel Naming
The default configuration only includes #general, but Slack channels are named #general-workspace-name. Update the channel name to match your exact Slack channel.
Save the configuration.
Step 6: Finalize Slack App Settings
There are a few more settings to verify in your Slack app.
Enable App Features
- Go to "Basic Information" in your app settings
- Scroll to "Display Information"
- Click "Edit" next to "App Display Name"
- Ensure these are enabled:
- Messages Tab — For DM conversations
- Home Tab — For the bot's home screen
- Under "Bot User", enable "Always Show My Bot as Online" (optional but recommended)
Verify Socket Mode
- Go to "Socket Mode" in the left sidebar
- Ensure "Enable Socket Mode" is checked
- This is critical — without it, OpenClaw won't receive events
Verify Event Subscriptions
- Go to "Event Subscriptions" in the left sidebar
- Ensure "Enable Events" is checked
- Review the bot events list — if you used the manifest, these should already be configured:
app_mentionmessage.channelsmessage.groupsmessage.immessage.mpimreaction_addedreaction_removedmember_joined_channelmember_left_channelchannel_renamepin_addedpin_removed
Step 7: Add Missing Bot Permissions
There's one critical step that's often missed — OpenClaw's documentation manifest is missing some permissions required for direct messaging.
Add IM and MPIM Permissions
- Go to "OAuth & Permissions" in your app settings
- Under "Bot Token Scopes", add:
im:read— Read direct messagesmpim:read— Read multi-person direct messagesmpim:write— Write to multi-person direct messages
Reinstall the App
After adding new permissions, Slack requires you to reinstall the app:
- Scroll down to "OAuth Tokens for Your Workspace"
- Click "Reinstall to Workspace" (or find it in the sidebar under "Install App")
- Review the permissions and click "Allow"
This is crucial — without these permissions, OpenClaw won't be able to respond to direct messages.
Step 8: Restart OpenClaw
For the configuration changes to take effect, restart the OpenClaw gateway.
If Running in a Container
If Running Directly
OpenClaw should now be running with the Slack configuration active.
Step 9: Test the Connection
Let's verify that everything is working.
Test Direct Message
- In Slack, you should see a new app installed (named whatever you called it in the manifest, e.g., "OpenClaw")
- Open a direct message with the bot
- Send a message:
Hola, ¿cómo estás? - Wait a moment — you should see the bot typing indicator appear
- The bot should respond
Test Channel Mention
- Go to the channel you configured (e.g.,
#general-workspace-name) - Send a message mentioning OpenClaw:
@OpenClaw hola - The first time you do this, you may see a notification saying the bot isn't in the channel
- Add the bot to the channel (invite the app to the channel)
- Try again — the bot should respond in the channel
Verify in OpenClaw
In OpenClaw's chat interface, you should see messages appearing from both:
- The DM conversation
- The channel mentions (these create separate sessions)
Understanding the Configuration
Let's break down what each part of the configuration does.
Socket Mode
Socket Mode allows OpenClaw to connect to Slack via WebSocket rather than requiring a public webhook URL. This is more secure and works better for local installations.
Slash Commands
This enables the /openclaw slash command in Slack. When you use it, messages go through a session with the slack:slash prefix. Setting ephemeral: false makes responses visible to everyone in the channel.
Direct Messages
This enables DM conversations with the bot. The allowlist policy means only users in the allowFrom array can send DMs to the bot. Replace UYOUR_USER_ID with your actual Slack user ID.
Channel Access
This configures which channels the bot can access. Setting requireMention: true means the bot only responds when explicitly mentioned with @OpenClaw.
Common Issues and Solutions
Bot Not Responding in DM
Problem: You send a DM, but the bot doesn't respond.
Solution: Verify you added the missing permissions (im:read, mpim:read, mpim:write) and reinstalled the app. Also, check that your user ID is correct in allowFrom.
Bot Not Responding in Channel
Problem: The bot doesn't respond to mentions in the channel.
Solution: Ensure the channel name in OpenClaw's config matches the exact Slack channel name (including the workspace suffix). Also, verify the bot has been added to the channel.
Socket Mode Not Connecting
Problem: Socket Mode fails to connect.
Solution: Verify that socket_mode_enabled is set to true in the Slack app settings and that you have a valid appToken in OpenClaw's config.
Events Not Being Received
Problem: OpenClaw doesn't receive message events.
Solution: Check that all required bot events are subscribed in the Slack app's Event Subscriptions. Compare your list with the manifest — if anything is missing, add it.
Incorrect Channel Name
Problem: Configuration works for DMs but not channels.
Solution: Slack channels include the workspace name (e.g., #general-workspace-name), not just #general. Update your config to match the exact channel name from Slack.
Best Practices
Security
- Never commit tokens to version control
- Store sensitive values in environment variables if possible
- Use
allowlistpolicies for DM and channel access - Regularly rotate tokens if your workspace security requirements demand it
Channel Organization
- Consider creating a dedicated channel for OpenClaw interactions
- Use descriptive channel names (e.g.,
#openclaw-workspace-name) - Document which channels have OpenClaw access for your team
User Access
- Keep the
allowFromlist minimal — only add users who need DM access - For team use, channel mentions are preferable to DMs
- Educate users about the
/openclawslash command
Troubleshooting Checklist
If the connection isn't working, run through this checklist:
- Bot token starts with
xoxb-and is correct - App token starts with
xapp-and is correct - User ID in
allowFromis correct - Channel name in config matches Slack exactly
- Socket Mode is enabled in Slack app
- Event Subscriptions are enabled and configured
-
im:read,mpim:read,mpim:writepermissions are added - App was reinstalled after adding new permissions
- Bot has been added to the channel (for channel access)
- OpenClaw gateway has been restarted after config changes
What You Can Do With Slack + OpenClaw
Once connected, you can:
- Ask questions — Get AI-powered answers directly in Slack
- Execute commands — Run scripts or commands via OpenClaw
- Manage tasks — Create to-dos, reminders, and notes
- Code assistance — Get help with debugging or code generation
- File sharing — Send files to OpenClaw for analysis
- Reactions — Use emoji reactions to interact with messages
- Pinning — Pin important messages for later reference
All of this happens from within your familiar Slack workspace, no need to switch applications.
Resources
Official Documentation
- OpenClaw Docs: https://docs.openclaw.ai/
- OpenClaw Slack Manifest: https://docs.openclaw.ai/channels/slack#slack-app-manifest-example
- OpenClaw Site: https://openclaw.ai/
- GitHub Repository: https://github.com/openclaw/openclaw
Slack Resources
- Slack API: https://api.slack.com/apps
- Socket Mode Guide: https://api.slack.com/apis/connections/sockets
- Event Types: https://api.slack.com/apis/connections/events-api
Related Tutorials
- Install OpenClaw on DigitalOcean: https://www.youtube.com/watch?v=I6fhDxyqnJQ
- OpenClaw WhatsApp Integration: (Coming soon)
- OpenClaw Telegram Integration: (Coming soon)
Conclusion
Connecting OpenClaw to Slack requires a bit more setup than other integrations, but the payoff is worth it. You get a powerful AI assistant that lives directly in your workspace, ready to help with questions, tasks, and automation.
Key takeaways:
- Use the manifest template to ensure all permissions are configured correctly
- Don't forget to add the
im:read,mpim:read, andmpim:writepermissions - Channel names include the workspace suffix (e.g.,
#general-workspace-name) - Restart the OpenClaw gateway after config changes
- Test both DM and channel communication
Now go get connected — your AI-powered productivity boost is just a Slack message away.
Want more OpenClaw tutorials? Check out my YouTube channel for step-by-step guides on installing, configuring, and maximizing OpenClaw.