OpenClaw operations guide
Set up your first OpenClaw Slack app in Socket Mode
Short answer. Create a Slack app from a manifest, connect its app and bot tokens to OpenClaw, and verify a private reply over Socket Mode. Use a Slack workspace where you can install apps and a local CLI Gateway running as a managed service.
Last updated · Published
By CWYN · Reviewed November 19, 2026 against OpenClaw 2026.11.5
Use a Slack workspace where you can install apps and a local CLI Gateway running as a managed service. Confirm a model replies in the dashboard first. Socket Mode connects out to Slack over WebSocket, so this setup can keep the Gateway private.
1. Create the Slack app from a manifest
In Slack’s app console, choose Create New App, then From a manifest, and select your test workspace. Paste the Minimal manifest in the Socket Mode tab of the Slack setup reference, then choose Next and Create. The manifest enables Socket Mode and subscribes the app to DM events.
2. Generate the app token and install the bot
Under Basic Information, open App-Level Tokens and choose Generate Token and Scopes. Add connections:write, save, and copy the app-level token. Then choose Install App and Install to Workspace. Copy the Bot User OAuth Token after installation. Keep the two tokens private.
3. Add the Slack plugin and configure Socket Mode
On the Gateway host, install the Slack plugin. In the global environment file at ~/.openclaw/.env, add the app-level token as SLACK_APP_TOKEN and the bot token as SLACK_BOT_TOKEN. Preserve existing entries.
openclaw plugins install @openclaw/slack
Save the following as slack.socket.patch.json5 in your current directory. For this test, require DM pairing and disable room handling.
{
channels: {
slack: {
enabled: true,
mode: "socket",
dmPolicy: "pairing",
groupPolicy: "disabled",
appToken: { source: "env", provider: "default", id: "SLACK_APP_TOKEN" },
botToken: { source: "env", provider: "default", id: "SLACK_BOT_TOKEN" },
},
},
}
Run the dry run to validate the patch and both token references. If it passes, apply the patch and restart the managed Gateway.
openclaw config patch --file ./slack.socket.patch.json5 --dry-run
openclaw config patch --file ./slack.socket.patch.json5
openclaw gateway restart
4. Pair your Slack account
Open the app’s Messages tab in Slack and send a DM from your own account. Check the pending requests on the Gateway host. Replace <CODE> with the pairing code from your own chat. The pairing reference explains when CLI approval makes that sender the command owner.
openclaw pairing list slack
openclaw pairing approve slack <CODE>
5. Verify a private Slack reply
After approval, send a fresh prompt in the app’s Messages tab and check for the model reply in the resulting thread.