OpenClaw Telegram Guide: Complete Bot Setup & Configuration
Complete guide to setting up OpenClaw as a Telegram bot. Learn how to create a bot with @BotFather, configure inline commands, and use OpenClaw in group chats.
Quick Answer
Set up OpenClaw Telegram bot: Create a bot with @BotFather, get your bot token, run `openclaw integrations telegram`, enter the token, and start chatting. Supports inline commands and group chats.
Introduction
Telegram is one of the best platforms for AI bots, thanks to its robust bot API and features like inline commands, keyboards, and group chat support. OpenClaw’s Telegram integration leverages these features to provide a powerful, interactive AI assistant experience.
This guide covers everything you need to set up OpenClaw as a Telegram bot, from creating the bot to configuring advanced features.
For other chat app integrations, see our guides:
Why Telegram?
Telegram offers several advantages for AI bots:
- Official Bot API — Robust, well-documented API
- Inline Commands — Quick actions without typing
- Custom Keyboards — Interactive buttons
- Group Chat Support — Works in groups and channels
- File Support — Send/receive documents, images, audio
- Privacy — Better privacy controls than many platforms
Prerequisites
Before setting up Telegram integration:
- OpenClaw Installed — See installation guide
- OpenClaw Configured — Run
openclaw onboardto set up your AI model - Telegram Account — Active Telegram account
- Bot Token — You’ll create this in the next step
Step 1: Create a Telegram Bot
Using @BotFather
- Open Telegram and search for
@BotFather - Start a chat with @BotFather
- Send
/newbotcommand - Choose a name for your bot (e.g., “My OpenClaw Assistant”)
- Choose a username (must end in
bot, e.g., “myopenclaw_bot”) - Copy the bot token — You’ll see something like:
123456789:ABCdefGHIjklMNOpqrsTUVwxyz
Important: Keep your bot token secret! Don’t share it publicly.
Bot Settings (Optional)
Configure your bot with @BotFather:
/setdescription— Set bot description/setabouttext— Set about text/setuserpic— Set bot profile picture/setcommands— Set command list (see below)
Setting Bot Commands
Define commands users can see:
/start - Start chatting with OpenClaw
/help - Get help and commands
/email - Check your email
/calendar - View calendar
/tasks - List tasks
/weather - Get weather
/briefing - Daily briefing
Send /setcommands to @BotFather, then paste the commands above.
Step 2: Configure OpenClaw
Run Integration Setup
Start the Telegram integration:
openclaw integrations telegram
Or use the general integrations command:
openclaw integrations
# Select Telegram from the menu
Enter Bot Token
When prompted, paste your bot token:
Enter your Telegram bot token: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz
OpenClaw will verify the token and connect to Telegram.
Verify Connection
You should see:
✓ Telegram bot connected successfully!
Bot username: @myopenclaw_bot
Start chatting: https://t.me/myopenclaw_bot
Step 3: Start Chatting
Start a Conversation
- Open Telegram and search for your bot (by username)
- Tap “Start” or send
/start - Send a message like “Hello, can you help me?”
OpenClaw will respond through your bot!
Test Commands
Try these commands:
/start— Start conversation/help— Get help/email— Check email (if configured)/calendar— View calendar/tasks— List tasks
Advanced Features
Inline Commands
Telegram supports inline commands that appear as you type:
- Type
@yourbotnamein any chat - Type a query like “weather” or “email”
- Select from suggestions that appear
Configure inline commands in OpenClaw:
openclaw config set telegram.inline true
Custom Keyboards
OpenClaw can send custom keyboards with buttons:
openclaw config set telegram.keyboard true
Example keyboard layout:
[Email] [Calendar] [Tasks]
[Weather] [Briefing] [Help]
Users can tap buttons instead of typing commands.
Group Chat Support
OpenClaw works in group chats:
- Add your bot to a group
- Grant permissions (if needed)
- Mention the bot or use commands:
@myopenclaw_bot check email/email@myopenclaw_bot
Configure group behavior:
openclaw config set telegram.groups.enabled true
openclaw config set telegram.groups.requireMention true
File Handling
OpenClaw can handle files sent via Telegram:
- Images — Analyze and describe
- Documents — Read PDFs, Word docs, etc.
- Audio — Transcribe voice messages
- Video — Extract information
Send a file to your bot and ask OpenClaw to process it.
Configuration Options
Response Formatting
Configure how OpenClaw formats responses:
openclaw config set telegram.format "markdown"
Options:
markdown— Rich formatting (bold, italic, links, code)html— HTML formattingplain— Plain text
Rate Limiting
Control message rate:
openclaw config set telegram.rateLimit 30
Limits to 30 messages per minute per user.
Privacy Settings
Configure privacy:
openclaw config set telegram.privacy.privateOnly true
Only respond to direct messages, not group chats.
Notification Settings
Control notifications:
openclaw config set telegram.notifications.enabled true
openclaw config set telegram.notifications.quietHours "22:00-08:00"
Usage Tips
1. Command Shortcuts
Create shortcuts for common tasks:
/e→ Check email/c→ View calendar/t→ List tasks/w→ Weather
2. Scheduled Messages
Set up scheduled briefings:
openclaw config set telegram.schedules.dailyBriefing "08:00"
OpenClaw will send a daily briefing at 8 AM.
3. Multi-User Support
OpenClaw supports multiple users:
- Each user has separate context
- Memory is user-specific
- Responses are personalized
4. Channel Integration
Use OpenClaw in Telegram channels:
- Add bot as admin to channel
- Grant post permissions
- Configure channel behavior:
openclaw config set telegram.channels.enabled true
5. Webhook vs Polling
OpenClaw uses polling by default (checks for messages periodically). For better performance, configure webhooks:
openclaw config set telegram.webhook.enabled true
openclaw config set telegram.webhook.url "https://yourdomain.com/webhook"
Requires a publicly accessible server.
Troubleshooting
Bot Not Responding
If your bot doesn’t respond:
-
Check bot status:
openclaw status -
Verify token:
openclaw config get telegram.token -
Check logs:
openclaw logs -
Test connection:
openclaw test telegram
Token Invalid
If you see “token invalid” errors:
- Verify token — Check @BotFather for correct token
- Regenerate token — Use
/revokethen/newbotin @BotFather - Update token:
openclaw integrations telegram
Messages Not Received
If messages aren’t being received:
-
Check bot is running:
openclaw status -
Restart OpenClaw:
openclaw restart -
Check network — Ensure OpenClaw can reach Telegram API
Group Chat Issues
If bot doesn’t work in groups:
-
Check permissions — Bot needs message permissions
-
Enable group support:
openclaw config set telegram.groups.enabled true -
Require mention:
openclaw config set telegram.groups.requireMention true
Rate Limiting
If you hit rate limits:
-
Increase rate limit:
openclaw config set telegram.rateLimit 60 -
Check Telegram limits — Telegram has API rate limits
-
Use webhooks — More efficient than polling
Security Best Practices
Bot Token Security
-
Keep token secret — Never share publicly
-
Use environment variables:
export TELEGRAM_BOT_TOKEN="your-token" -
Rotate token — Regenerate if compromised:
/revoke in @BotFather
Privacy Settings
- Private mode — Only respond to direct messages
- User whitelist — Restrict to specific users:
openclaw config set telegram.allowedUsers ["user1", "user2"]
Data Privacy
- Local processing — All messages processed locally
- No cloud storage — Unless explicitly configured
- Secure storage — Data stored in
~/.openclaw
Advanced Use Cases
Team Collaboration
Use OpenClaw in team groups:
- Task management — Assign and track tasks
- Calendar coordination — Schedule meetings
- Information retrieval — Quick answers for team
Personal Productivity
Use as personal assistant:
- Email management — Check and respond to emails
- Calendar — View and manage schedule
- Tasks — Track todos and projects
Content Creation
Use for content workflows:
- Draft generation — Create drafts via Telegram
- Research — Gather information
- Editing — Review and edit content
Comparison with Other Platforms
Telegram vs WhatsApp
- Telegram — Separate bot account, more features
- WhatsApp — Uses personal account, simpler setup
See our WhatsApp guide for comparison.
Telegram vs Discord
- Telegram — Better for personal use, simpler
- Discord — Better for servers, more features
See our Discord guide for details.
Next Steps
Now that Telegram is connected:
- Explore Other Integrations — WhatsApp, Discord, Slack
- Set Up Skills — Skills Library
- Configure Email — Gmail Integration
- Read FAQ — Common Questions
Conclusion
Telegram integration provides one of the best experiences for OpenClaw, thanks to Telegram’s robust bot API and features like inline commands and custom keyboards. The setup is straightforward—create a bot with @BotFather, enter the token, and start chatting.
For more help, check our integrations page or FAQ. Happy chatting with your AI assistant on Telegram!
Need help?
Join the OpenClaw community on Discord for support, tips, and shared skills.
Join Discord →