Workflow:Openclaw Openclaw Channel Connection
| Knowledge Sources | |
|---|---|
| Domains | Messaging, Channel_Ops, Configuration |
| Last Updated | 2026-02-06 12:00 GMT |
Overview
End-to-end process for connecting messaging platform channels (WhatsApp, Telegram, Discord, Slack, and others) to a running OpenClaw gateway.
Description
This workflow covers adding, authenticating, and configuring messaging channels on an existing OpenClaw gateway. Each channel adapter handles platform-specific authentication (QR codes, bot tokens, app tokens), message ingestion, and reply delivery. The workflow includes setting DM access policies, group chat behavior, and channel-specific features like reactions, threading, and streaming.
Key outputs:
- One or more authenticated channel connections
- DM policy configuration (pairing, allowlist, or open)
- Group chat routing rules and mention patterns
- Channel health verified via status probes
Usage
Execute this workflow when adding a new messaging channel to an already-running OpenClaw gateway, or when reconfiguring channel access policies. The gateway must be running and the user must have appropriate platform credentials (bot tokens, phone numbers, app registrations).
Execution Steps
Step 1: Obtain Platform Credentials
Acquire the authentication credentials required by the target messaging platform. Each platform has its own registration process: WhatsApp needs a phone number with the WhatsApp app, Telegram requires creating a bot via BotFather, Discord needs an Application with a Bot user, and Slack requires creating a Slack App with Socket Mode enabled.
Key considerations:
- WhatsApp: use a dedicated phone number (not personal) for bot usage
- Telegram: enable inline mode and disable privacy mode for group access
- Discord: enable Message Content Intent and Server Members Intent
- Slack: generate both App Token (xapp-) and Bot Token (xoxb-)
Step 2: Register the Channel
Add the channel to the gateway configuration using the CLI or by editing the config file directly. The CLI provides guided flows for each channel type, handling token storage and initial validation.
What happens:
- Channel entry created in ~/.openclaw/openclaw.json
- Credentials stored securely (tokens in config, OAuth in credentials directory)
- For WhatsApp: QR code displayed in terminal for Linked Devices scanning
- Channel adapter initialized and connection established
Step 3: Configure Access Policies
Set the DM (direct message) access policy to control who can interact with the agent. The default policy is "pairing" which requires explicit owner approval for each new contact. Alternative policies include "allowlist" (predefined contacts only) and "open" (anyone can message).
Key considerations:
- Pairing mode: new contacts receive a 4-digit code, owner approves via CLI
- Allowlist mode: specify E.164 phone numbers, usernames, or user IDs
- Group policies configured separately with mention requirements
- Self-chat mode available for WhatsApp personal number usage
Step 4: Configure Group Chat Behavior
Set up group chat routing rules including mention patterns, per-group allowlists, and threading behavior. Groups can require @mention before the agent responds, and individual groups can be allowed or denied independently.
What happens:
- Group entries added to channel config (by ID or wildcard)
- Mention patterns set (e.g., requireMention: true)
- Per-group user allowlists configured if needed
- Reply threading mode selected (off, first message, all messages)
Step 5: Verify Channel Health
Probe the channel connection to confirm authentication is valid, the bot is reachable, and messages can flow in both directions. Send a test message to verify the complete inbound-to-outbound pipeline.
What happens:
- Channel status checked via CLI status command with probe flag
- Connection state verified (authenticated, connected, listening)
- Test message sent and reply confirmed
- Any errors surfaced with actionable diagnostics