π¬ Slack Integration
Team Collaboration Β· Messaging Β· Enterprise Gateway
Break the communication barrier between LLMs and human teams! Allow your AI agent to deliver rich-format messages, structured reports, and ops-level alerts directly to Slack workspace channels or personal DMs.
OpenClaw Team
π Quick Install
Run the following command in your terminal to install:
npx clawhub install slack
π Stats Overview
| β Stars | βοΈ Total Calls | π₯ Active Users | π― Stable Version |
|---|---|---|---|
| 345 | 1.82M | 1,500 | v2.0.1 |
ποΈ How It Works
This component is OpenClaw's purpose-built "digital communications department." By connecting to Slack's mature Bot Token workflow, the LLM can not only "read" instructions, but now has a "voice" to proactively report:
- π¬ Full-channel Precision Routing: Supports dual addressing modes. Broadcast data to public team groups via
channel_id(e.g.,#general), or lock onto a specificuser_idfor absolutely private point-to-point notifications. - π Rich Text Block Kit Adaptation: Unlike traditional plain text CLI pushes, it automatically translates LLM formatting into Slack's native
Block Kit. Bold text, links, quote blocks, and bullet lists are losslessly preserved. - π§΅ Thread Tracking & Context Inheritance: Supports reading and replying to specific
thread_ts. During troubleshooting group conversations, AI can precisely attach diagnostic results to the original thread, keeping the channel timeline clean. - π Sandboxed Permission Isolation: Uses minimal
chat:writeauthorization scope. Ensures the bot can speak while never overstepping boundaries to tamper with or peek at the team's historical confidential information.
π§ Typical Use Cases
π¨ Scenario 1: DevOps Incident Auto-dispatch
When your agent is running daily scheduled database backup pipelines on cloud servers and encounters Connection Timeout β the model captures the cascading error, mounts the slack component, and proactively sends highlighted error stack blocks to the #backend-ops channel, @-mentioning the on-duty ops manager.
π Scenario 2: Periodic Report Auto-distribution
Combined with Cron jobs and search engines like Tavily, you can instruct the agent: "Every Monday at 9:00 AM, summarize competitive intelligence and send it to the Sales Director's DMs." The LLM composes a polished analysis Markdown and pushes it through this pipeline to the executive's desktop chat β forming a complete loop.
π» Command Reference
After installation, you can let AI call these autonomously via conversation, or manually trigger operations from the CLI:
Basic point-to-point DM notification:
clawhub execute slack channel="U01234567" message="Hello Boss, the rendering task is complete!"
Send multi-line log reports to a public channel:
clawhub execute slack channel="#server-status" \
message="$(cat ./daily_report.log) \n---\n Sent by OpenClaw Agent"
Specify custom bot identity (requires App permissions):
clawhub execute slack channel="#marketing" \
message="Campaign Started!" as_user=true username="Marketing AI"
π‘οΈ Requirements & Authentication
- π Slack Bot Token: Go to
api.slack.comto create an app and obtain thexoxb-xxxBot User OAuth Token. - βοΈ Environment Setup: Install the app to your workspace and pre-load the constant on the host machine:
export SLACK_BOT_TOKEN="xoxb-xxxxxxxxx". - π’ Target Channel Access: To send to restricted or private channels, you must first manually
Invitethe Bot entity into the channel via the Slack client.
Β© 2026 OpenClaw. All rights reserved.
