# Set up your first OpenClaw Slack app in Socket Mode

Canonical: https://cwyn.com/pages/openclaw-guide-first-slack-socket-mode-app.html
Last updated: 2026-11-23T05:18:30-05:00

OpenClaw operations guide

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 November 23, 2026 · Published November 19, 2026

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](https://docs.openclaw.ai/channels/slack/transports) 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](https://api.slack.com/apps/new), 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](https://docs.openclaw.ai/channels/slack/setup), 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](https://docs.openclaw.ai/help/environment) 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](https://docs.openclaw.ai/channels/slack/access-control).

```
{
  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](https://docs.openclaw.ai/cli/gateway/restart-and-supervision).

```
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](https://docs.openclaw.ai/channels/slack/threads-and-sessions#agent-view-dms) 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](https://docs.openclaw.ai/channels/pairing) 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.

[Get your free CWYN Score](https://cwyn.com/pages/score.html)

## Related guides

- [OpenClaw Slack Socket Mode connected but no events arrive](https://cwyn.com/pages/openclaw-guide-slack-socket-no-events.html)
- [Set up your first OpenClaw Discord bot](https://cwyn.com/pages/openclaw-guide-first-discord-bot.html)
- [Set up your first OpenClaw app in Microsoft Teams](https://cwyn.com/pages/openclaw-guide-first-microsoft-teams-app.html)
- [Set up your first OpenClaw IRC bot](https://cwyn.com/pages/openclaw-guide-first-irc-bot.html)
- [Mattermost OpenClaw bot setup for your first reply](https://cwyn.com/pages/openclaw-guide-first-mattermost-bot.html)

## Next steps

- [All 135 OpenClaw guides](https://cwyn.com/guides/openclaw/)
- [OpenClaw setup walkthrough](https://cwyn.com/setup/openclaw/)
- [CWYN Score](https://cwyn.com/pages/score.html)
- [OpenClaw Complete Setup Pack ($14.95)](https://cwyn.com/pages/pack-openclaw-complete-setup-pack.html)

### Keep the working Socket Mode setup

Use the Gateway and rollback checklists in the [OpenClaw Complete Setup Pack ($14.95)](https://cwyn.com/pages/pack-openclaw-complete-setup-pack.html), an optional paid kit, to record the local setup that delivered your private Slack reply.
Kit details as of Nov 22, 2026

OpenClaw Complete Setup Pack $14.95

Start an OpenClaw workspace with editable instructions, local Gateway and tool presets, and checklists for pairing, memory, costs and rollback.
