Slack bot quickstart

Six steps from Slack app to a working OpenClaw bot in your workspace

This is the fast path for Slack workspaces—Socket Mode means you usually do not open inbound firewall ports on the Gateway. Channel policies, streaming replies, and advanced Bolt options are in the full Slack channel guide. Confirm exact config keys in official docs.

Time: about 15 minutes if OpenClaw is already installed. Running 24/7? See VPS hosting or managed hosting.

Slack assistant threads (beta): Assistant view, suggested prompts, and thread-scoped sessions may ship in beta trains ahead of stable—confirm on GitHub Releases (current beta: v2026.6.6-beta.*). Stable v2026.6.5 covers standard bot install (DMs, mentions, Socket Mode). For pre-release features, use openclaw update --channel beta and see Releases → beta.

Before you start

  • OpenClaw installed (installation) and an LLM provider configured.
  • A Slack workspace where you can install apps (admin or app manager).
  • Gateway reachable if hosted on a VPS (VPS overview). Socket Mode is outbound—no public URL required for Slack itself.
  • Optional: local models via Ollama to cut API cost (heavier RAM on the host).

Step 1 — Create a Slack app

  1. Open api.slack.com/apps → Create New App → From scratch.
  2. Name it (e.g. OpenClaw) and pick your workspace.
  3. Under OAuth & Permissions → Bot Token Scopes, add at minimum:
    • chat:write — send messages
    • app_mentions:read — respond to @mentions
    • im:history, im:read, im:write — direct messages

Add channel scopes later if the bot must read public channels—see the full Slack guide.

Step 2 — Enable Socket Mode

Socket Mode avoids exposing a public HTTP URL—good for home labs and many VPS setups.

  1. Settings → Socket Mode → enable.
  2. Create an App-Level Token with scope connections:write.
  3. Copy the token (starts with xapp-).

Step 3 — Install to workspace

  1. Install App → install to your workspace.
  2. Copy the Bot User OAuth Token (xoxb-...).
  3. Under App Home, enable the Messages Tab so users can DM the bot.

Step 4 — Add tokens to OpenClaw

During openclaw onboard, enable Slack and paste bot token and app token when prompted—or add under channels.slack in configuration (see Slack reference for JSON shape).

Keep DM policy on pairing until you have reviewed security basics.

Step 5 — Start the Gateway

Terminal
openclaw gateway start
openclaw doctor

doctor should report Slack healthy. For always-on bots, run the Gateway on a small VPS or managed host—pick a region close to you and your LLM API.

Step 6 — Test in Slack

  1. Open Slack → Apps → your bot → Message.
  2. Send hello. With pairing enabled, approve: openclaw pairing list slack then openclaw pairing approve slack <code> (pairing guide).
  3. In a channel, @mention the bot to test mentions.

Recent releases improve Slack streaming replies—see releases after upgrades.

Troubleshooting

Symptom Likely cause Fix
Bot never replies in DMMessages Tab off / missing scopesEnable App Home; add im:* scopes; reinstall
not_authed / invalid_authWrong or revoked tokenReinstall app; update xoxb token in config
Socket Mode disconnectsBad xapp token or Gateway downRegenerate app token; restart Gateway; check logs
Works in DM, not in channelBot not invited / missing mention scope/invite @bot; add app_mentions:read; reinstall
“Sending messages to this app has been turned off”App Home Messages Tab disabledSlack app → App Home → enable Messages Tab
Only pairing messagesUser not approvedpairing approve
Enterprise Grid / multiple workspacesInstalled in wrong workspaceReinstall to target workspace; check token workspace ID

More detail: Slack guide · troubleshooting

What to do next