Skip to main content

OpenClaw Slack Plugin

OpenClaw is a gateway for an AI agent that can be perform tasks and communicate across chat-based platforms like Slack. Doing so involves connecting OpenClaw to your Slack workspace with the OpenClaw Slack Plugin.

After installing the plugin, the OpenClaw agent becomes available to users in your workspace via assistant threads, the /openclaw slash command, and @mentions in channels by default.

0. Install OpenClaw and set up an agent

If you don't already have an OpenClaw agent, you'll need to make a quick detour. Follow the OpenClaw Getting Started Guide first to install OpenClaw and create your agent, then come back here to connect it to Slack.

1. Install the plugin

With Openclaw installed, open up a terminal and install the plugin with the following command.

openclaw plugins install @openclaw/slack

2. Create a Slack app

Now you'll need a Slack app to interface with your workspace. We've created two pre-configured Slack apps for you. They differ only in transport mode.

We recommend Socket Mode because it requires no public URL. The app will open a single WebSocket connection to Slack servers.

You can also use HTTP instead. Choose that if you're going to be running multiple copies of the same app, just know it requires a bit more setup.

Make your choice, click the corresponding button, and follow the steps over in App Settings. Then move on to step 3.

3. Configure tokens

When using Socket Mode, you need two tokens: an app-level token and a bot token.

Grab an app-level token

  1. In your app's settings, go to Basic Information.
  2. Scroll to the App-Level Tokens section and click Generate Token and Scopes.
  3. Name the token (e.g. "OpenClaw") and add the connections:write scope.
  4. Click Generate and copy the xapp- token.

Grab a bot token

  1. In your app's settings, go to OAuth & Permissions.
  2. Under OAuth Tokens click Install to [workspace].
  3. After being returned to OAuth & Permissions, copy the Bot User OAuth Token (xoxb-).

Set your environment variables

export SLACK_APP_TOKEN=xapp-...
export SLACK_BOT_TOKEN=xoxb-...

4. Start the gateway

Run the following command to open a OpenClaw gateway. This establishes a connection to Slack and routes incoming messages to your agent:

openclaw gateway

Next steps

Your OpenClaw agent is now live in Slack. From here, we recommend you explore the OpenClaw docs. Perhaps the following will feel inspiring: