Back to Blog
O

Connect OpenClaw to WhatsApp, Telegram, Discord & Slack: Channel Setup Guide

Setup Guides

Connect OpenClaw to WhatsApp, Telegram, Discord & Slack: Channel Setup Guide

OpenClaw Expert Team
15 min read

Four Channels, One Guide

This guide covers the exact setup process for the four most popular OpenClaw messaging channels. Each section is self-contained — jump to the platform you need.

WhatsApp (Via Baileys)

OpenClaw connects to WhatsApp via Baileys — an open-source library that interfaces with WhatsApp Web. No Meta Business API approval needed.

Setup Steps

  1. Start the channel login process:
# Direct install
openclaw channels login

# Docker
docker compose run --rm openclaw-cli channels login
  1. Scan the QR code with your phone: WhatsApp Settings → Linked Devices → Link a Device
  2. Wait for confirmation — OpenClaw will display "WhatsApp connected" when the session is active

Configuration Options

In ~/.openclaw/openclaw.json:

{
  "channels": {
    "whatsapp": {
      "enabled": true,
      "pairing": {
        "mode": "code",
        "allowlist": ["+1234567890"]
      },
      "groups": {
        "enabled": false
      }
    }
  }
}
  • pairing.mode: "code" — New contacts must send a pairing code before the AI responds. Prevents random strangers from using your bot
  • pairing.allowlist — Only these phone numbers can interact (overrides pairing)
  • groups.enabled — Set to true to allow AI responses in group chats

Approving New Users

# Approve a user who sent a pairing code
openclaw pairing approve whatsapp <code>

WhatsApp Gotchas

  • Session expiry: WhatsApp Web sessions expire periodically. You'll need to re-scan the QR code. Set up monitoring to detect disconnections
  • One session per number: You can only link one OpenClaw instance to one WhatsApp number. Using it on your personal number means sharing the number with the bot
  • Message limits: WhatsApp caps messages at 4,096 characters. Configure your AI to keep responses under this limit

Telegram (Via grammY)

Telegram has the most bot-friendly API of any messaging platform. OpenClaw integrates via the grammY framework.

Setup Steps

  1. Create a bot with BotFather:
  • Open Telegram and search for @BotFather
  • Send /newbot
  • Choose a display name (e.g., "Your Company AI")
  • Choose a username ending in "bot" (e.g., yourcompany_ai_bot)
  • Copy the API token BotFather gives you
  1. Add the channel to OpenClaw:
# Direct install
openclaw channels add --channel telegram --token "YOUR_BOT_TOKEN"

# Docker
docker compose run --rm openclaw-cli channels add --channel telegram --token "YOUR_BOT_TOKEN"
  1. Test: Send a message to your bot on Telegram. You should get an AI response within seconds.

Optional: Set Bot Commands

In BotFather, send /setcommands to your bot and paste:

start - Start a conversation
help - Show available commands
human - Request a human agent

Telegram Gotchas

  • Webhook vs polling: OpenClaw uses webhooks by default (requires HTTPS endpoint). For local development, it falls back to polling
  • Group chat behavior: In groups, Telegram bots only receive messages that @mention the bot or are replies to the bot's messages (unless privacy mode is disabled in BotFather)
  • Message limit: 4,096 characters per message, same as WhatsApp

Discord (Via discord.js)

OpenClaw's Discord integration supports slash commands, thread conversations, and multi-server deployment.

Setup Steps

  1. Create a Discord application:
  • Go to the Discord Developer Portal
  • Click "New Application" and name it
  • Go to "Bot" section → click "Add Bot"
  • Enable these Privileged Gateway Intents: Message Content, Server Members
  • Copy the bot token
  1. Generate an invite URL:
  • Go to "OAuth2" → "URL Generator"
  • Select scopes: bot, applications.commands
  • Select permissions: Send Messages, Read Message History, Use Slash Commands, Embed Links
  • Copy the generated URL and open it to add the bot to your server
  1. Add the channel to OpenClaw:
# Direct install
openclaw channels add --channel discord --token "YOUR_BOT_TOKEN"

# Docker
docker compose run --rm openclaw-cli channels add --channel discord --token "YOUR_BOT_TOKEN"

Discord Gotchas

  • Message Content Intent: Required for the bot to read message content in servers with 100+ members. Must be enabled in the Developer Portal
  • Slash command registration: Can take up to an hour to propagate globally. Guild-specific commands are instant
  • Message limit: 2,000 characters per message — stricter than WhatsApp/Telegram. Configure shorter AI responses for Discord
  • Thread support: OpenClaw can create threads for long conversations to keep channels clean

Slack (Via Bolt SDK)

Slack integration is ideal for internal AI assistants — answering team questions, searching documents, and automating workflows.

Setup Steps

  1. Create a Slack app:
  • Go to api.slack.com/apps and click "Create New App"
  • Choose "From scratch", name it, and select your workspace
  • Under "Socket Mode" → Enable Socket Mode and generate an app-level token (starts with xapp-)
  • Under "OAuth & Permissions" → Add these Bot Token Scopes: chat:write, channels:history, groups:history, im:history, app_mentions:read
  • Install to workspace and copy the Bot User OAuth Token (starts with xoxb-)
  • Under "Event Subscriptions" → Subscribe to: message.channels, message.groups, message.im, app_mention
  1. Add the channel to OpenClaw:
# Direct install
openclaw channels add --channel slack --bot-token "xoxb-..." --app-token "xapp-..."

# Docker
docker compose run --rm openclaw-cli channels add --channel slack --bot-token "xoxb-..." --app-token "xapp-..."

Slack Gotchas

  • Two tokens required: Slack needs both the Bot Token (xoxb-) and the App Token (xapp-) for Socket Mode
  • Socket Mode vs webhooks: OpenClaw uses Socket Mode by default (no public URL needed). This is simpler but adds ~100ms latency vs webhooks
  • Channel access: The bot must be invited to each channel: type /invite @your-bot-name in the channel
  • DM behavior: By default, the bot responds to all DMs. In channels, it responds to @mentions only

General Channel Management Commands

# List all configured channels
openclaw channels list

# Check channel status
openclaw channels status

# Remove a channel
openclaw channels remove --channel telegram

# Restart a specific channel
openclaw channels restart --channel discord

Multi-channel setup in 24 hours. We configure all your messaging channels — WhatsApp, Telegram, Discord, Slack, and more — with security, media handling, and per-channel AI personality. No API credentials headaches on your end.

Book your channel setup or learn about our channel integration service.

openclaw channelsopenclaw whatsapp setupopenclaw telegram setupopenclaw discord setupopenclaw slack setup

Need Help with OpenClaw?

Our experts handle the entire setup — installation, configuration, integrations, and ongoing support. Get your AI assistant running in 24 hours.