💬 Slack Integration
Teamzusammenarbeit · 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
🚀 Schnellinstallation
Führen Sie den folgenden Befehl in Ihrem Terminal aus, um zu installieren:
npx clawhub install slack
📊 Statistikübersicht
| ⭐ Sterne | ☁️ Gesamtaufrufe | 👥 Aktive Nutzer | 🎯 Stabile Version |
|---|---|---|---|
| 345 | 1.82M | 1,500 | v2.0.1 |
🎛️ So funktioniert es
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.
🧭 Typische Anwendungsfälle
🚨 Szenario 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.
📊 Szenario 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.
💻 Befehlsreferenz
Nach der Installation können Sie die KI diese autonom über Konversation aufrufen lassen oder Operationen manuell über die CLI auslösen:
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"
🛡️ Voraussetzungen & Authentifizierung
- 🔑 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.
🔗 Quellcode auf GitHub ansehen
© 2026 OpenClaw. All rights reserved.
