Telegram
Add Telegram as a messaging channel. Run it alongside WhatsApp or as your primary channel.
What it does
- Connects NanoClaw to Telegram via the Bot API
- Works alongside WhatsApp or as a standalone channel
- Configurable as control-only (triggers actions) or passive (receives notifications)
- Supports group chats and direct messages
- Automatic bot registration via @BotFather
What you'll need
- NanoClaw installed and running
- A Telegram account
- Bot token from @BotFather
Install
/add-telegram How it works
The /add-telegram skill walks you through the entire process of connecting NanoClaw to Telegram. You don’t need to edit any code or configuration files by hand — Claude Code handles everything interactively.
First, the skill checks your NanoClaw installation and applies the necessary code changes through the skills engine. This adds the TelegramChannel class, installs the grammy dependency, and wires everything into the message processing pipeline. If you already have other channels like WhatsApp running, Telegram is added alongside them without touching the existing setup.
Next, you create a Telegram bot through @BotFather. The skill guides you step by step: naming the bot, getting the token, and configuring group privacy settings if you plan to use the bot in group chats. You paste the bot token back into the terminal and the skill saves it to your environment.
Once the bot is live, you send a /chatid command in the Telegram chat where you want NanoClaw to operate. The skill picks up the chat ID and registers it in the database. You can register multiple chats — one as your main channel and others as trigger-only or notification-only channels.
Finally, the skill runs a verification step: it sends a test message through the bot to confirm everything is connected. If something goes wrong, the skill provides specific troubleshooting steps for common issues like incorrect tokens or group privacy settings.
Channel modes
Telegram supports three registration modes in NanoClaw:
- Main channel — full two-way communication. Messages you send in this chat trigger the agent, and the agent responds in the same chat.
- Trigger-only — messages in this chat trigger actions, but the agent responds through your main channel instead.
- Passive — the agent can send notifications to this chat, but messages here don’t trigger the agent.
This is useful when you want Telegram for quick commands while keeping WhatsApp as your primary conversation channel, or the other way around.
Agent Swarms
If you’re using NanoClaw’s Agent Swarm feature, Telegram has first-class support for multi-agent groups. Each sub-agent can have its own bot identity in the group chat, so you can see which agent is responding. The /add-telegram-swarm skill handles this setup separately after your base Telegram channel is working.
Tips
- Group chats require disabling “Group Privacy” in @BotFather so the bot can read all messages, not just commands directed at it.
- The
grammylibrary handles Telegram’s Bot API efficiently with built-in retry logic and rate limiting. - Telegram has generous rate limits compared to other messaging platforms, making it well-suited for agent interactions that produce longer responses.