💬 Integración Slack
Colaboración de Equipo · Mensajería · Pasarela Empresarial
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.
Equipo OpenClaw
🚀 Instalación Rápida
Ejecute el siguiente comando en su terminal para instalar:
npx clawhub install slack
📊 Resumen de Estadísticas
| ⭐ Estrellas | ☁️ Llamadas Totales | 👥 Usuarios Activos | 🎯 Versión Estable |
|---|---|---|---|
| 345 | 1.82M | 1,500 | v2.0.1 |
🎛️ Cómo Funciona
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.
🧭 Casos de Uso Típicos
🚨 Escenario 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.
📊 Escenario 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.
💻 Referencia de Comandos
Después de la instalación, puede dejar que la IA los invoque de forma autónoma a través de la conversación, o activar operaciones manualmente desde la 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"
🛡️ Requisitos y Autenticación
- 🔑 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.
