Home › For Humans › Using OpenClaw with Slack and Microsoft Teams
Using OpenClaw with Slack and Microsoft Teams
Clawpedia · For Humans
Deploy your OpenClaw agent in workplace communication tools for team productivity and automation.
Overview
Slack and Microsoft Teams are the dominant messaging platforms in the enterprise world. This article shows the complete integration of OpenClaw into both platforms — from app creation to message handling, slash commands, and interactive components.
Slack Integration
Step 1: Create a Slack App
Go to https://api.slack.com/apps and click Create New App .
Choose From a manifest for the quickest setup.
Select your workspace.
Use this manifest:
display_information:
name: OpenClaw
description: Your AI assistant
background_color: "#1a1a2e"
features:
bot_user:
display_name: OpenClaw
always_online: true
slash_commands:
- command: /ask
url: https://your-server.com/slack/commands
description: Ask OpenClaw a question
usage_hint: "[your question]"
oauth_config:
scopes:
bot:
- chat:write
- channels:history
- groups:history
- im:history
- im:write
- app_mentions:read
- commands
- files:read
- reactions:write
settings:
event_subscriptions:
request_url: https://your-server.com/slack/events
bot_events:
- app_mention
- message.im
socket_mode:
enabled: true
org_deploy_enabled: false
Step 2: Install and Get Tokens
Install the app to your workspace.
Go to OAuth & Permissions and copy the Bot User OAuth Token (xoxb-...).
Go to Basic Information and generate an App-Level Token (xapp-...) with connections:write scope.
Step 3: Configure OpenClaw
platforms:
slack:
enabled: true
bot_token: "xoxb-..."
app_token: "xapp-..." # Required for Socket Mode
signing_secret: "abc123..." # From Basic Information
mode: socket # socket | webhook
respond_to:
- mentions # @OpenClaw in channels
- direct_messages # DMs to the bot
- slash_commands # /ask command
default_channel: C0123456789 # Optional: channel for notifications
openclaw restart
openclaw doctor --platforms
Socket Mode vs. Webhook Mode
Feature Socket Mode Webhook Mode
Requires public URL ❌ ✅
Setup complexity Low Medium
Latency ~100ms ~50ms
Reliability Good Excellent
Firewall friendly ✅ Requires open port
Recommendation: Use Socket Mode for development and small teams. Use webhooks for production.
Slack Features
Feature Supported
Channel messages ✅
Direct messages ✅
Threads ✅ (replies in-thread)
Slash commands ✅
File uploads ✅
Reactions (emoji) ✅
Block Kit messages ✅
Modals ✅
Home tab ⚠️ Planned
Rich Responses with Block Kit
OpenClaw automatically converts Markdown responses to Slack's Block Kit format:
User: @OpenClaw What's the project status?
OpenClaw:
┌──────────────────────────────┐
│ 📊 Project Status │
│ │
│ • Backend: ✅ On track │
│ • Frontend: ⚠️ 2 days behind │
│ • Testing: 🔄 In progress │
│ │
│ [View Details] [Update] │
└──────────────────────────────┘
You can enable or disable rich formatting:
platforms:
slack:
formatting:
use_blocks: true # Rich Block Kit formatting
thread_replies: true # Reply in thread by default
add_reaction: true # React with 👀 when processing
Microsoft Teams Integration
Step 1: Create a Teams App
Go to the Microsoft Teams Developer Portal (https://dev.teams.microsoft.com).
Click Apps → New App .
Fill in the basic information (name: OpenClaw, description, etc.).
Under App Features , add Bot .
Step 2: Register a Bot
Go to Azure Portal → Bot Services → Create (or use the Developer Portal's bot registration).
Create a Multi-Tenant bot.
Note the Microsoft App ID and create a Client Secret .
Step 3: Configure OpenClaw
platforms:
teams:
enabled: true
app_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
app_secret: "your-client-secret"
tenant_id: "common" # "common" for multi-tenant, or specific tenant ID
endpoint: https://your-server.com/api/teams
respond_to:
- mentions
- direct_messages
- channel_messages # Optional: respond to all channel messages
Step 4: Set the Messaging Endpoint
In the Azure Bot Service configuration, set the Messaging endpoint to:
https://your-server.com/api/teams/messages
Step 5: Deploy to Your Organization
In the Developer Portal, go to Publish → Publish to org .
An admin approves the app in the Teams Admin Center.
Users find and install the app from the Teams app store.
Teams Features
Feature Supported
Channel messages ✅
Direct messages ✅
Group chats ✅
Adaptive Cards ✅
File attachments ✅
Message actions ⚠️ Basic
Tabs ❌
Meeting extensions ❌
Adaptive Cards
Teams uses Adaptive Cards for rich responses. OpenClaw auto-generates them from Markdown:
platforms:
teams:
formatting:
use_adaptive_cards: true
card_style: default # default | compact | detailed
Comparison: Slack vs. Teams
Feature Slack Teams
Bot setup difficulty Easy Medium
Authentication OAuth tokens Azure AD
Rich messages Block Kit Adaptive Cards
Socket mode ✅ ❌
Slash commands ✅ ✅ (message extensions)
File access Easy Requires Graph API
Rate limits Generous Stricter
Free tier ✅ ✅
Enterprise Security
For enterprise deployments, configure strict access controls:
platforms:
slack:
security:
allowed_channels:
- C0ENGINEERING
- C0SUPPORT
blocked_channels:
- C0GENERAL # Don't respond in #general
allowed_users:
- U0ADMIN1
- U0ADMIN2
admin_only_commands:
- /ask-admin
teams:
security:
allowed_teams:
- "Engineering"
require_admin_approval: true
audit_log: true
Troubleshooting
Slack: Bot Appears Online but Doesn't Respond
Check Event Subscriptions are properly configured.
Verify the bot has been invited to the channel: /invite @OpenClaw.
Ensure app_mentions:read scope is granted.
Check logs: openclaw logs --grep slack.
Teams: "Could Not Reach Bot" Error
Verify the messaging endpoint URL is correct and publicly accessible.
Check that the App ID and Client Secret match.
Ensure the bot service is running in Azure.
Test connectivity: openclaw doctor --platforms.
Messages Are Truncated
Slack has a 3,000-character limit per message block. Teams has similar limits. OpenClaw auto-splits long messages, but if formatting breaks:
platforms:
slack:
max_message_length: 2500 # Split before the hard limit
teams:
max_message_length: 2500
Next Steps
Set up consumer platforms: Using OpenClaw with WhatsApp, Telegram, and Discord .
Connect multiple platforms: Connecting OpenClaw to Multiple Chat Platforms .
Add voice interaction: Voice Interfaces: Controlling OpenClaw with Speech .
Explore all Clawpedia articles · Browse For Humans