OpenClaw Telegram Setup: Full Tutorial (2026)
Connect your OpenClaw agent to Telegram and message your AI from anywhere in the world โ on your phone, tablet, or desktop. Full step-by-step guide including multi-bot setup.
Why Telegram Is the Best Channel for OpenClaw
Telegram isn't just a messaging app โ it has a robust, free bot API that makes it the perfect interface for your AI agent.
Works everywhere
iOS, Android, desktop, web. Message your agent from any device.
Rich formatting
Markdown support, inline buttons, file sending, voice messages.
Free bot API
No rate limits for normal usage, no API costs for the channel itself.
Fast notifications
Instant push notifications when your agent completes tasks.
Groups & channels
Add your agent to a group to collaborate with a team.
Always accessible
Telegram is already on every device you own. No new apps needed.
Step 1: Create Your Telegram Bot via BotFather
Every Telegram bot needs to be registered with @BotFather, Telegram's official bot creation service. This takes about 2 minutes.
Open Telegram and find @BotFather
Search for "@BotFather" in Telegram. It's the official verified account (blue checkmark). Open a chat with it.
Start the bot creation process
Send the command /newbot to BotFather. It will ask for a name and username.
Choose a name and username
Name: displayed to users (e.g., "My AI Agent"). Username: must end in "bot" (e.g., @myagent_bot). Usernames are permanent.
Copy your bot token
BotFather will give you a token like 1234567890:AAFqV1WAoDxZP9dAt8wMp4BWaWi5s-MUrIs. Save this โ you'll need it next.
Keep Your Token Secret
Your bot token is like a password. Anyone with it can control your bot. Never post it publicly, never commit it to Git.
Optional: Customize Your Bot
# Set a description /setdescription โ select your bot โ enter description # Set a profile picture /setuserpic โ select your bot โ send a photo # Set commands (shows up as "/" menu in Telegram) /setcommands โ select your bot โ paste: help - Show available commands status - Check agent status cancel - Cancel current task
Step 2: Connect Your Bot to OpenClaw
Method A: Interactive Setup (Recommended)
openclaw channel add telegram
OpenClaw will prompt you for your bot token. Paste it and press Enter. That's it.
Method B: Direct Config Edit
{
"plugins": {
"telegram": {
"enabled": true,
"token": "1234567890:AAFqV1WAoDxZP9dAt8wMp4BWaWi5s-MUrIs",
"allowedUserIds": [],
"adminUserIds": [],
"reactions": "minimal",
"parseMode": "Markdown"
}
}
}allowedUserIds vs adminUserIds
Leave allowedUserIds empty to allow anyone. Fill it with your Telegram user ID to restrict to just you. adminUserIds get extra privileges like running shell commands.
Finding Your Telegram User ID
# Method 1: Message @userinfobot on Telegram # It replies with your user ID instantly # Method 2: Message @RawDataBot # Look for "id" field in the "from" object
Restart the Gateway
openclaw gateway restart
Step 3: Test the Connection
Open Telegram, find your bot by username, and start a chat. Send: /start
You should receive a welcome message from your agent. Then try a real message:
"What's today's date?" "What's the weather in London?" "Summarize this URL: https://example.com"
# Watch live logs openclaw logs --follow --channel telegram # Check overall status openclaw status
Step 4: Secure Your Bot
A Telegram bot connected to your AI agent is a powerful interface. Lock it down properly.
{
"plugins": {
"telegram": {
"token": "YOUR_TOKEN",
"allowedUserIds": [YOUR_TELEGRAM_ID],
"adminUserIds": [YOUR_TELEGRAM_ID],
"rejectUnauthorized": true,
"silentReject": true
}
}
}silentReject: true means unauthorized users don't even get a "you're not allowed" message โ the bot simply ignores them. This prevents bot enumeration.
Advanced: Multiple Bots & Notification Setup
Running Two Bots (Personal + Notifications)
A common pattern: one bot for conversation, one for push notifications.
{
"plugins": {
"telegram": {
"enabled": true,
"token": "MAIN_BOT_TOKEN",
"allowedUserIds": [YOUR_ID]
},
"telegram-notify": {
"enabled": true,
"token": "NOTIFICATION_BOT_TOKEN",
"defaultChatId": YOUR_CHAT_ID,
"notificationsOnly": true
}
}
}Scheduled Telegram Notifications
{
"schedule": "0 9 * * *",
"message": "Send me a daily briefing via Telegram: check my calendar for today's events, summarize the top 3 tech news stories, and remind me of any tasks from MEMORY.md due today.",
"channel": "telegram"
}Troubleshooting
Bot Not Responding
- 1
Check gateway is running: openclaw gateway status - 2
Verify the token is correct in config - 3
Check logs: openclaw logs --follow - 4
Make sure your user ID is in allowedUserIds (or it's empty)
"Conflict: terminated by other getUpdates request"
- 1
This means OpenClaw is running twice - 2
Kill all processes: openclaw gateway stop && pkill -f openclaw - 3
Restart fresh: openclaw gateway start
Now Set Up Your First Automation
Telegram is connected. Next step: set up automations that run while you sleep.
5 Automations to Set Up Today