OpenClaw on Multiple Channels: Running Telegram, Discord, and WhatsApp Simultaneously
Why One Channel Isn't Enough
In theory, one channel sounds fine. The agent is on Telegram, you send it messages — done.
In practice, it looks different. Dimitrios uses Telegram for quick personal updates. The dev team is on Discord. A client wants WhatsApp. And the internal morning report should go to a Discord channel, not a private chat.
When your agent is on only one channel, things break. Information gets lost. Context is missing. And you start manually forwarding messages — exactly what you were trying to automate.
OpenClaw supports multiple simultaneous channels. This post shows how we set this up for our 6-agent team.
---
How Multi-Channel Works in OpenClaw
OpenClaw treats each channel as an independent connection. The gateway manages all channels in parallel — every incoming message carries the channel context, so the agent knows where it came from and where to reply.
```
Gateway
├── Telegram (Sam, personal chat)
├── Discord (team server, multiple channels)
├── WhatsApp (customer-facing)
└── Signal (internal, optional)
```
Configuration in the OpenClaw config (simplified schema):
```yaml
channels:
telegram:
token: ${TELEGRAM_TOKEN}
allowedUsers:
- "123456789" # Dimitrios
discord:
token: ${DISCORD_TOKEN}
guildId: ${DISCORD_GUILD_ID}
allowedRoles:
- "Team"
- "Admin"
whatsapp:
token: ${WHATSAPP_TOKEN}
allowedNumbers:
- "+49123456789"
```
Each channel has its own allowlist. A Discord user without the "Team" role can't send commands to the agent — even if they find the server.
---
Step 1: Set Up Telegram
Telegram is typically the first channel — easy to set up, reliable, no app approval process.
```bash
# 1. Create Telegram bot: message @BotFather on Telegram
# /newbot → enter name → receive token
# 2. Store token in .env
echo 'TELEGRAM_TOKEN=8234567890:AAHxxxxxxxx' >> ~/.openclaw/workspace/.env
# 3. Find your Telegram user ID
# Message @userinfobot on Telegram → it returns your ID
# 4. Configure OpenClaw
openclaw configure
# → Channel: telegram
# → Token: $TELEGRAM_TOKEN
# → Allowed users: your user ID
```
Important: Never enter the bot token as plaintext in the config. Always reference it as an environment variable.
After `openclaw gateway restart`, the agent is reachable on Telegram. Test:
```
You on Telegram: "Hey, are you there?"
Agent: "Yes. What do you need?"
```
---
Step 2: Set Up Discord
Discord is more complex than Telegram, but more powerful for team scenarios — threads, roles, multiple channels.
```bash
# 1. Create Discord Application
# → https://discord.com/developers/applications
# → "New Application" → enter name
# → Bot section → create bot → copy token
# 2. Set bot permissions (in Developer Portal under OAuth2 → URL Generator):
# Scopes: bot
# Bot Permissions:
# - Read Messages / View Channels
# - Send Messages
# - Read Message History
# - Add Reactions
# - Manage Messages (for pin functionality)
# - Create Public Threads
# 3. Invite bot to server using the generated URL
# 4. Store token in .env
echo 'DISCORD_TOKEN=MTIxNTxxxxxxxx.xxxxxx.xxxxxxxxxx' >> ~/.openclaw/workspace/.env
# 5. Find your Guild ID:
# Discord → Server Settings → Right-click server icon → "Copy Server ID"
echo 'DISCORD_GUILD_ID=1234567890123456789' >> ~/.openclaw/workspace/.env
```
Discord channel routing: Our agent Sam doesn't respond in every Discord channel. She's only active in specific ones:
```yaml
channels:
discord:
token: ${DISCORD_TOKEN}
guildId: ${DISCORD_GUILD_ID}
activeChannels:
- "sam-direct" # Sam's direct channel
- "team-general" # General team channel
- "dev-alerts" # Automated alerts
allowedRoles:
- "Team"
- "Admin"
```
In `#marketing` or `#random`, Sam stays silent — unless directly mentioned (`@Sam`).
---
Step 3: WhatsApp (for Customer-Facing Scenarios)
WhatsApp for business use is available via the WhatsApp Business API. For testing and smaller setups, the [WhatsApp Cloud API](https://developers.facebook.com/docs/whatsapp/cloud-api) offers a free tier.
```bash
# WhatsApp Cloud API setup (simplified):
# 1. Create Meta Business Account
# 2. Set up WhatsApp Business App in Developer Portal
# 3. Configure webhook URL → OpenClaw Gateway endpoint
# 4. Store Phone Number ID and Access Token in .env:
echo 'WHATSAPP_PHONE_NUMBER_ID=123456789012345' >> .env
echo 'WHATSAPP_TOKEN=EAAxxxxxxxxxxxxxxxx' >> .env
```
Important note: WhatsApp Business API is designed for production use and requires an approval process. For internal team communication, Telegram or Signal is simpler.
In our setup, we only use WhatsApp for one specific use case: customers can message a WhatsApp number, and Alex (our everyday agent) handles initial inquiries and routes them. For everything else: Telegram.
---
Routing: Which Agent Responds on Which Channel?
This is the critical question with multi-agent + multi-channel. When a message comes into the Discord server — which of the 6 agents should respond?
Our strategy: one agent per channel context.
| Channel / Context | Agent | Reason |
|------------------|-------|--------|
| Telegram → Dimitrios personal | Sam | Team lead, personal assistant |
| Telegram → Alerting | Sam | Direct notifications |
| Discord → `#sam-direct` | Sam | Personal channel |
| Discord → `#dev-alerts` | Sam (writes), Peter (works) | Sam coordinates, Peter executes |
| Discord → `#team-general` | Sam (on mention) | Reactive |
| WhatsApp → Customer number | Alex | First inquiries, FAQ |
This avoids the biggest multi-agent problem: two agents responding to the same message simultaneously and contradicting each other.
Rule: Every incoming message flow has exactly one primary agent.
---
Context Separation: What the Agent "Knows"
A subtle but important topic: what is the agent allowed to share in which channel?
Example: Sam has access to Dimitrios's personal emails, calendar, and ClickUp tasks. But other team members are also in the Discord server. Sam shouldn't mention "Dimitrios has a dentist appointment this afternoon" there — even if it's in her MEMORY.md.
We solve this with context rules in SOUL.md:
```markdown
Channel-Specific Rules
Telegram (Dimitrios personal): Full access to all information.
Personal context, private details — all fine.
Discord (Team Server): Work-related information only.
No personal details about Dimitrios.
No private costs, personal appointments, or confidential business data.
WhatsApp (Customer-facing): Only publicly available information.
No access to internal systems, no pricing without approval.
Always: "I'd be happy to connect you with our team."
```
The agent reads these rules and automatically adjusts what it shares where.
---
Proactive Messages: Which Channel Gets What?
Besides responding to incoming messages, Sam also sends proactive messages — morning reports, alerts, blog post announcements. Each of these has a clear destination:
```python
# Explicitly defined in cron job prompts:
# Morning report → always Telegram to Dimitrios
"Send the report via Telegram."
# Blog post deployed → Discord #announcements
"Announce the new post in Discord #announcements."
# Critical server alert → Telegram immediately
"If disk > 90%: alert via Telegram immediately."
# Weekly report → Discord #weekly-reports
"Send the report to Discord #weekly-reports."
```
By specifying the channel explicitly in the prompt, you prevent the agent from "forgetting" where to send the message.
---
Common Problems and Solutions
Problem: Agent responds twice (once on Telegram, once on Discord)
Cause: Two channels receive the same type of message, and the agent sends to both.
Fix: Clear channel preference in SOUL.md:
```markdown
Proactive messages to Dimitrios: always Telegram, never Discord.
Discord only for team communication and announcements.
```
Problem: Bot token expires / gets revoked
Cause: Discord tokens don't expire, but Telegram tokens can be revoked (e.g. if you use /revoke with @BotFather).
Diagnosis:
```bash
openclaw channels list
# Shows: telegram → disconnected / error
```
Fix: Create a new token, replace in .env, restart gateway.
Problem: Agent responds to all messages in the Discord server
Cause: No `activeChannels` configuration set.
Fix: Specify channels explicitly in the Discord config:
```yaml
activeChannels:
- "sam-direct"
- "team-updates"
```
And in SOUL.md:
```markdown
On the Discord server: only respond when in one of the configured channels
or when directly mentioned via @Sam.
```
Problem: WhatsApp webhook not being received
Cause: The OpenClaw Gateway isn't reachable from outside (local installation without a public IP).
Fix: Tailscale + Tailscale Serve for a secure, internal webhook endpoint:
```bash
# Only within the Tailscale network:
tailscale serve https / http://localhost:3000
# Never:
# tailscale funnel — that would be a public port!
```
For WhatsApp's webhook, you need a public URL. The secure solution: a separate reverse proxy (nginx on a VPS) that forwards WhatsApp webhooks internally. Not a 5-minute setup — but the right way.
---
Our Actual Channel Setup
For reference — how we really run it:
Sam:
Peter:
Maya:
Alex:
Atlas:
Iris:
Each agent has its own bot account — no shared tokens between agents. This matters for both security and clarity.
---
Token Management With Multiple Channels
With 6 agents and 2-3 channels each, you quickly end up with 15+ API keys. Order matters here.
In our setup: one central `.env` per agent, not one global `.env` for all:
```
/opt/agents/workspaces/
├── sam/.env # Sam's Telegram + Discord token
├── peter/.env # Peter's Discord token
├── maya/.env # Maya's Discord token
├── alex/.env # Alex's Telegram + WhatsApp token
├── atlas/.env # Atlas's Telegram token (private)
└── iris/.env # Iris's Discord token
```
If Peter's Discord bot is compromised: only Peter's token is revoked. The other agents are unaffected.
---
The Bottom Line
Multi-channel isn't a luxury — it's the natural next step when agents move beyond a personal setup into team scenarios. The configuration is straightforward in OpenClaw; the real work is in the routing design and context rules.
The complete channel setup for all 6 agents — including YAML configurations, SOUL.md channel rules, and the WhatsApp reverse proxy setup — is documented in the OpenClaw Setup Playbook.
Fully available in German too. 🇩🇪
Want to learn more?
Our playbook contains 18 detailed chapters — available in English and German.
Get the Playbook