Video Walkthrough
Prerequisites
- A Slack workspace (free tier works)
- Admin access to create and install apps (or ask your workspace admin)
- OpenClaw installed and running
- Basic CLI familiarity (we’ll use
openclawcommands)
Step 1: Create a Slack app
- Go to api.slack.com/apps and sign in.
- Click Create New App → From scratch.
- Name it something like
OpenClaw Botand select your workspace. - Click Create App.
Step 2: Enable Socket Mode
OpenClaw typically connects to Slack using Socket Mode, which avoids needing a public webhook server.- In your Slack app dashboard, open Socket Mode.
- Turn Enable Socket Mode ON.
- Go to Basic Information.
- Scroll to App-Level Tokens.
- Click Generate Token and Scopes.
- Enter a Token Name.
- Add the scope
connections:write.
xapp-.... Save it.
Step 3: Configure bot permissions (OAuth scopes)
In your Slack app, go to OAuth & Permissions → Bot Token Scopes and add:chat:write(send messages)app_mentions:read(read mentions)channels:read(access channels)reactions:write(add emoji reactions)pins:write(pin/unpin messages)im:write(DM users)users:read(member info)im:history(respond in direct messages)
files:write(attachments)search:read(search messages/conten)
Step 4: Install the app to your workspace
- Go to OAuth & Permissions.
- Click Install App to Workspace.
- Approve the permissions.
xoxb-.... Save it.
Step 5: Subscribe to events
In your Slack app, go to Event Subscriptions:- Enable events.
- Under Subscribe to bot events, add the events you want the bot to receive.
app_mentionmessage.channelsmessage.groupsmessage.immessage.mpimreaction_addedreaction_removedpin_addedpin_removedmember_joined_channelmember_left_channelchannel_rename
Step 6: Configure OpenClaw
Add the Slack tokens to your instance configuration.- Go to the Agent37 dashboard.
- Create an instance (or open an existing one).
- Open Terminal.
- Edit your OpenClaw config (
~/.openclaw/config.json—create if missing):
Step 7: Start the OpenClaw gateway
Step 8: Test the integration
- In Slack, open a DM with the OpenClaw Bot.
- Send
Hello. - If set up correctly, the bot should reply with a pairing code.
- In the instance terminal, execute the below command with pairing code.