How to Connect OpenClaw to Telegram in 2026
Complete guide to connecting OpenClaw to Telegram in 2026. Create a bot with BotFather, configure your token in OpenClaw, and test your first messages.
OpenClaw Telegram setup is the most popular channel configuration for personal AI agents in 2026. Telegram's bot API is stable, free, supports rich formatting, and works on every device. This guide walks through the complete connection process — from creating a bot with BotFather to your first real conversation with your OpenClaw agent.
Step 1: Create a Telegram Bot
Open Telegram and start a conversation with @BotFather. Send the following:
/newbot
BotFather will ask for a name (the display name, e.g., "My AI Assistant") and a username (must end in bot, e.g., my_ai_assistant_bot). After entering both, BotFather provides your bot token:
1234567890:AAFabcdefghijklmnopqrstuvwxyz12345
Copy this token carefully — you'll need it in the next step.
Step 2: Configure the Token in OpenClaw
Add the Telegram token to your ~/.openclaw/openclaw.json:
{
"channels": {
"telegram": {
"enabled": true,
"token": "1234567890:AAFabcdefghijklmnopqrstuvwxyz12345",
"allowed_users": [],
"parse_mode": "Markdown"
}
}
}
Leave allowed_users empty to allow any Telegram user to message your bot. For a private agent, add your Telegram numeric user ID: "allowed_users": [123456789]. Get your ID by messaging @userinfobot.
Step 3: Start OpenClaw and Test
Restart OpenClaw to load the new configuration:
python -m openclaw start
Open Telegram, find your new bot by its username, and send /start. Your OpenClaw agent will respond.
Security: Restricting Access
For a personal agent, always configure allowed_users. If your bot is publicly discoverable on Telegram, anyone can message it — and each message consumes your LLM API credits.
"allowed_users": [YOUR_TELEGRAM_USER_ID]
Advanced: Group Chat Support
OpenClaw can be added to Telegram group chats. In a group, the agent responds only when its bot username is mentioned or a message is directed at it (configurable). To add to a group:
- Invite your bot to the group as a member
- Add the group's chat ID to
allowed_chatsin your config
nacre.sh Simplification
On nacre.sh, Telegram setup is handled through the dashboard — paste your token in the Telegram settings field, click Connect. No JSON editing required.
Frequently Asked Questions
Can my OpenClaw agent send proactive messages to me on Telegram?
Yes. Your agent can initiate conversations (for scheduled updates, alerts, etc.) by knowing your Telegram chat ID. The first time you message your bot, OpenClaw logs your chat ID in ~/.openclaw/telegram_users.json.
Is there a rate limit on Telegram bot messages?
Telegram's Bot API limits bots to 30 messages per second globally, and 1 message per second per chat. For a personal agent, you'll never hit these limits.
What Telegram message formats does OpenClaw support?
OpenClaw supports Telegram's Markdown V2 formatting, allowing your agent to send bold text, code blocks, links, and inline keyboards in responses.
nacre.sh
Run OpenClaw without the server headaches
Dedicated instance, automatic TLS, nightly backups, and 290+ LLM integrations. Live in under 90 seconds from $12/month.
Deploy your agent →