How to Add Telegram Groups and Topics to OpenClaw Agents
25 March 2026A week ago my agents only lived in DMs. If I wanted to talk to B, I opened a private chat. Clean, simple, isolated.
Then I added B to a Telegram group with Corsus — my personal assistant — and everything changed. Now both agents are in the same room, listening to the same conversations, available to the whole team.
Here's exactly how to set it up.
Why Bother with Groups?
DMs work fine when it's just you and one agent. But once you have multiple agents — or a team that needs access — groups become the obvious move.
With OpenClaw, a Telegram group can be:
- A shared workspace where multiple agents collaborate
- A routing hub — forum topics route to different agents automatically
- A team interface — non-technical teammates just message the group
You can route each topic in a supergroup to a different agent. General → your main agent. Dev → your coding agent. Research → your researcher. One group, three agents, zero confusion.
What You'll Need
- OpenClaw gateway running
- A Telegram bot (created via @BotFather)
- The bot token
- Your numeric Telegram user ID
Step 1 — Create the Bot
If you haven't already:
- Open Telegram and chat with @BotFather
- Send
/newbot - Follow the prompts — choose a name and username
- Copy the token it gives you (looks like
123456789:ABCdef...)
Step 2 — Find Your User ID
OpenClaw needs to know who's allowed to talk to it. DMs use your numeric user ID.
Quick way: DM your new bot, then paste this in your terminal:
curl "https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates"
Look for "id":769794876 in the response — that's your user ID.
Step 3 — Disable Privacy Mode
This is the step most people miss.
Telegram bots default to privacy mode — they can only see messages directed at them. In a group, that means they'd see nothing without being @mentioned constantly.
- Go to @BotFather →
/setprivacy - Select your bot
- Choose Disable
Important: After disabling privacy, you must remove the bot from the group and re-add it. Telegram applies the privacy change on the re-add.
Step 4 — Configure OpenClaw
Add this to your OpenClaw config (usually ~/.openclaw/openclaw.json):
{
"channels": {
"telegram": {
"enabled": true,
"botToken": "YOUR_TOKEN_HERE",
"dmPolicy": "allowlist",
"allowFrom": ["YOUR_USER_ID"],
"groupPolicy": "open",
"groups": {
"YOUR_GROUP_ID": {
"requireMention": false
}
}
}
}
}
Finding your group ID: Add @userinfobot to your group and forward a message — it'll reply with the ID. It looks like -1001234567890.
Step 5 — Restart and Test
openclaw gateway restart
Send a message in the group. If you've set requireMention: false, the bot should respond immediately.
If it doesn't, run:
openclaw logs --follow
This shows you exactly why each message is being accepted or rejected.
Going Further — Forum Topics
If your group is a supergroup with forum topics, you can route each topic to a different agent:
{
"channels": {
"telegram": {
"groups": {
"-1001234567890": {
"topics": {
"1": { "agentId": "main" },
"3": { "agentId": "coder" },
"5": { "agentId": "researcher" }
}
}
}
}
}
}
Topic 1 is the General topic — handled as a special case by Telegram. Each topic gets its own isolated session, memory, and agent.
The Group Chat Context Problem
One thing to know: agents in groups see messages from everyone. That's powerful, but it also means context can get noisy fast.
OpenClaw handles this with session isolation — each group (and topic) gets its own session context. Agents don't inherit your personal DM context. What happens in the group, stays in the group.
This is actually a feature. You can have a "research" topic where the researcher agent builds up context on a project, separate from your main agent's personal tasks.
Wrapping Up
Getting agents into Telegram groups took me about 20 minutes once I knew the steps. The privacy mode toggle and the group ID were the two things that tripped me up.
If you're running multiple agents, groups are worth it. One gateway, one bot, multiple agents, any team member can join.
The full config reference is in the docs if you need to go deeper.