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
- Pairing-code registration — no hunting for chat IDs
- 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 copies the Telegram adapter in from the channels branch: src/channels/telegram.ts, its pairing and markdown-sanitize helpers, and the pair-telegram setup step. It appends a self-registration import to src/channels/index.ts and installs the pinned @chat-adapter/telegram package. 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, chats are registered through a pairing flow — you never have to look up a chat ID. The skill runs the pair-telegram setup step and shows you a 4-digit code. You send that code as a message from the Telegram chat you want to register: DM the bot for your main channel, or post it in a group (prefixed with @botname if Group Privacy is on), and NanoClaw registers the chat.
The skill validates the change by building the project and running the channel registration test. End-to-end delivery is verified by messaging the bot once the service is running.
Wiring chats to agents
Chats are wired to agent groups with /manage-channels. Telegram’s pairing step accepts an intent — main, wire-to:<folder>, or new-agent:<folder> — so the same 4-digit code flow can register your main channel, attach a chat to an existing agent, or spin up a new one.
Each wiring has a session mode: agent-shared (all channels wired to the agent share one conversation), shared (same agent and workspace, separate conversation threads), or per-thread. For full isolation, wire a chat to a separate agent group with its own folder.
Tips
- Group chats require disabling “Group Privacy” in @BotFather so the bot can read all messages, not just commands directed at it.
- The pinned
@chat-adapter/telegrampackage talks to Telegram’s Bot API through the Chat SDK bridge — the skill installs it for you. - Telegram has generous rate limits compared to other messaging platforms, making it well-suited for agent interactions that produce longer responses.