Tutorial

Connect Slack to OpenClaw

Run your OpenClaw AI assistant directly inside Slack. This guide walks you through creating a Slack app, getting the required tokens, and launching your instance. The whole process takes about 5 minutes.

Telegram + Slack: OpenClaw Setup supports running both platforms simultaneously on a single instance. You can set up Telegram first, Slack first, or both at once during the setup wizard.

How it works

OpenClaw connects to Slack via Socket Mode — a secure WebSocket connection initiated from your instance to Slack's servers. This means no public webhook URLs are needed and your instance stays fully private with no public IP exposure.

You'll need two tokens:

  • Bot Token (xoxb-...) — authenticates your bot and grants it permissions in your workspace.
  • App Token (xapp-...) — establishes the Socket Mode connection.

Step 1: Create a Slack app

  1. Go to api.slack.com/apps and click Create New App.
  2. Choose "From scratch".
  3. Give it a name (e.g. "OpenClaw Assistant") and select your workspace.
  4. Click Create App.

Step 2: Add bot token scopes

Your bot needs permission to read and write messages. In your app settings:

  1. Go to OAuth & Permissions in the sidebar.
  2. Scroll to Scopes → Bot Token Scopes.
  3. Add these scopes:
    app_mentions:readRespond when mentioned in channels
    chat:writeSend messages as the bot
    channels:historyRead public channel messages
    groups:historyRead private channel messages
    im:historyRead direct messages
    im:readView DM metadata
    mpim:historyRead group DMs

Step 3: Install the app and get the Bot Token

  1. Still in OAuth & Permissions, click Install to Workspace at the top.
  2. Review the permissions and click Allow.
  3. Copy the Bot User OAuth Token — it starts with xoxb-.

Tip: Keep this token secret. Treat it like a password.

Step 4: Enable Socket Mode and get the App Token

  1. In the sidebar, go to Socket Mode.
  2. Toggle Enable Socket Mode to on.
  3. You'll be prompted to create an app-level token. Give it a name (e.g. "openclaw-socket") and add the connections:write scope.
  4. Click Generate.
  5. Copy the App Token — it starts with xapp-.

Step 5: Subscribe to events

So your bot can receive messages, you need to subscribe to events:

  1. In the sidebar, go to Event Subscriptions.
  2. Toggle Enable Events to on. (Since Socket Mode is enabled, no URL is needed.)
  3. Under Subscribe to bot events, add:
    • app_mention — when someone @-mentions your bot
    • message.im — direct messages to the bot
    • message.channels — messages in public channels (optional)
    • message.groups — messages in private channels (optional)
  4. Click Save Changes.

Note: After changing event subscriptions, you may need to reinstall the app to your workspace. Slack will prompt you if needed.

Step 6: Enter tokens in OpenClaw Setup

  1. Go to the OpenClaw Setup dashboard.
  2. Start the setup wizard and select Slack (or both Telegram + Slack) as your platform.
  3. Paste your Bot Token (xoxb-...) and App Token (xapp-...).
  4. Configure your LLM provider and launch.

Your OpenClaw assistant will connect to Slack via Socket Mode and start responding to messages. No webhook setup needed.

Step 7: Configure the allowlist

By default, your bot uses an allowlist so only approved users and channels can interact with it. After launching:

  1. Open the Slack section in your instance dashboard.
  2. Add Slack user IDs for DM access (find yours in Slack: click your profile → ...Copy member ID).
  3. Add channel IDs for channels where the bot should respond (right-click a channel → View channel details → scroll to find the ID at the bottom).

Troubleshooting

Bot doesn't respond to DMs
Make sure you've subscribed to the message.im event and your Slack user ID is in the DM allowlist.
Bot doesn't respond in channels
The bot requires @-mention by default. Make sure the channel ID is in the allowlist, and that you've subscribed to app_mention and message.channels events.
Token validation fails
Double-check you're pasting the correct token type: Bot Token starts with xoxb-, App Token starts with xapp-. Make sure the app is installed to your workspace.
Socket Mode not connecting
Ensure Socket Mode is enabled in your app settings and the App Token has the connections:write scope.

Ready to launch?

Once you have both tokens, go to the dashboard to complete setup and launch your Slack-connected assistant.

Cookie preferences