๐Ÿ”—Integration & Channels

How to Integrate OpenClaw with Slack

Intermediate1-2 hoursUpdated 2025-01-16

Integrating OpenClaw with Slack enables your team to access AI capabilities directly from your workspace. This intermediate guide covers Slack app creation, OAuth configuration, event subscriptions, slash commands, and handling Slack's 3-second response limit.

Why This Is Hard to Do Yourself

These are the common pitfalls that trip people up.

๐Ÿ”ง

Slack app creation maze

OAuth scopes, event subscriptions, slash commands, and interactivity URLs all need correct configuration

๐Ÿ”‘

OAuth token management

Bot tokens, user tokens, and signing secrets all serve different purposes and expire differently

๐Ÿงต

Thread handling

Slack threads have unique IDs. Maintaining conversation context across threaded replies requires careful mapping.

โฐ

3-second response limit

Slack expects a response within 3 seconds. Longer AI responses need deferred replies via response_url.

Step-by-Step Guide

Step 1

Create a Slack App

# 1. Go to api.slack.com/apps
# 2. Create New App โ†’ From scratch
# 3. Name: "OpenClaw AI"
# 4. Select your workspace
Step 2

Configure OAuth scopes

# Under OAuth & Permissions, add Bot Token Scopes:
# - chat:write
# - app_mentions:read
# - channels:history
# - im:history
# - commands
# Install the app to your workspace
# Save the Bot User OAuth Token (xoxb-...)
Step 3

Set up event subscriptions

# Under Event Subscriptions:
# Request URL: https://your-domain.com/webhooks/slack/events
# Subscribe to bot events:
# - app_mention
# - message.im
# - message.channels (if you want channel monitoring)
Step 4

Configure OpenClaw for Slack

# In config/channels/slack.yaml:
slack:
  enabled: true
  bot_token: "xoxb-YOUR-BOT-TOKEN"
  signing_secret: "YOUR_SIGNING_SECRET"
  app_token: "xapp-YOUR-APP-TOKEN"  # For Socket Mode
  response_mode: deferred  # Required for AI responses > 3 seconds
Step 5

Add slash commands (optional)

# Under Slash Commands:
# /ask - Request URL: https://your-domain.com/webhooks/slack/commands
# /summarize - Request URL: https://your-domain.com/webhooks/slack/commands
# /help - Request URL: https://your-domain.com/webhooks/slack/commands

Warning: Slash command responses are visible only to the user by default. Use `response_type: in_channel` in your configuration to make responses visible to everyone.

Step 6

Test the integration

# In Slack, try:
# @OpenClaw AI What's on my calendar today?
# Or DM the bot directly

# Check logs:
tail -f ~/.openclaw/logs/channels.log | grep slack

Slack Integration Done Right

OAuth scopes, event subscriptions, slash commands, deferred responses, thread handling โ€” our Slack integration experts configure everything so your team can start using OpenClaw from Slack immediately.

Get matched with a specialist who can help.

Sign Up for Expert Help โ†’

Frequently Asked Questions