OpenClaw Telegram Setup Guide
This guide shows you how to connect your OpenClaw agent to Telegram, enabling streaming responses and mobile access. With Telegram integration, you can interact with your agent from anywhere using you
OpenClaw Telegram Setup Guide
Overview
This guide shows you how to connect your OpenClaw agent to Telegram, enabling streaming responses and mobile access. With Telegram integration, you can interact with your agent from anywhere using your phone or desktop.
Video Reference: Watch on YouTube
Duration: ~7 minutes
Difficulty: Beginner
What You'll Get
- Streaming Responses: See your agent typing in real-time
- Mobile Access: Control your agent from your phone
- Instant Notifications: Get alerts from your agent
- File Sharing: Send documents and images for analysis
- Always Available: Access your agent 24/7 from anywhere
Prerequisites
- OpenClaw agent running (version 3.2 or later)
- Telegram account
- SSH access to your OpenClaw server (or local terminal)
Setup Instructions
Step 1: Update OpenClaw
Ensure you have the latest version with streaming support:
openclaw update
Wait for the update to complete.
Step 2: Create Telegram Bot
2.1 Open Telegram
Search for @BotFather (verified account with blue checkmark)
2.2 Start Conversation
Click "Start" or send /start
2.3 Create New Bot
Send the command:
/newbot
2.4 Name Your Bot
BotFather will ask for two names:
Display Name: Any name you like
My OpenClaw Assistant
Username: Must end with "bot"
myopenclaw_bot
2.5 Get Your Token
BotFather will provide a token like:
1234567890:ABCdefGHIjklMNOpqrsTUVwxyz
⚠️ Important: Keep this token secure! It's like a password for your bot.

Step 3: Configure OpenClaw
Method 1: Using OpenClaw Config (Recommended)
3.1 Open Config
openclaw config
3.2 Navigate to Channels
Use arrow keys to select:
- Channels
- Configure
- Telegram
3.3 Enter Bot Token
Paste your token from BotFather and press Enter.
3.4 Configure Pairing Policy
Choose "Allow DM pairing" (recommended for personal use).
3.5 Save and Exit
Select "Finished" and "Continue".
3.6 Restart Gateway
openclaw gateway restart

Method 2: Let Your Agent Do It
Alternative Approach (98% success rate):
Let's set up Telegram pairing.
Here's my bot token: [paste token]
Configure it for me.
⚠️ Warning: 2% chance your agent might break something. Use Method 1 if you want to be safe.
Step 4: Pair Your Telegram
4.1 Find Your Bot
In Telegram, search for your bot username (e.g., @myopenclaw_bot)
4.2 Start the Bot
Click "Start" or send /start
4.3 Get Pairing Code
Your bot will send a pairing code like:
Pairing code: ABC123
4.4 Pair in OpenClaw
Open your OpenClaw TUI:
openclaw tui
Paste the pairing code and press Enter.
4.5 Confirmation
Your bot will confirm:
✅ Successfully paired! You can now chat with me.

Step 5: Test Streaming
5.1 Send a Message
In Telegram, send:
Hi! Tell me a short story.
5.2 Watch Streaming
You should see your agent typing in real-time, with text appearing gradually.
Note: Streaming works best for longer responses. Short messages may appear all at once.

Streaming Configuration
Enable Streaming
If streaming isn't working, configure it:
Change Telegram streaming setting from "partial" to "on"
Your agent will update the configuration.
Streaming Behavior
Short Messages: May appear instantly (no streaming)
Long Messages: Stream in chunks as they're generated
Model Dependent: Some models stream smoother than others
- Claude: Smooth streaming
- MiniMax: Chunky streaming
- GPT-4: Smooth streaming
Using Your Telegram Bot
Basic Commands
Chat Normally:
What's the weather like today?
Request Tasks:
Research the latest AI news and summarize it
Invoke Skills:
Create a daily presentation
File Analysis: Send a document or image, then:
Analyze this file
Advanced Usage
Long-Running Tasks:
This might take a while - notify me when done
Scheduled Notifications: Set up cron jobs to send results to Telegram.
Multi-Step Workflows:
1. Research topic X
2. Create a summary
3. Send it to my Telegram
Troubleshooting
Bot Not Responding
Problem: Bot appears online but doesn't reply
Solutions:
- Verify Pairing:
openclaw tui
Check if Telegram is listed as paired.
- Restart Gateway:
openclaw gateway restart
- Check Logs:
openclaw logs
Look for Telegram-related errors.
- Recreate Bot:
- Delete old bot in BotFather (
/deletebot) - Create new bot
- Reconfigure in OpenClaw
Streaming Not Working
Problem: Messages appear all at once, no streaming
Solutions:
- Enable Streaming:
Set Telegram streaming to "on"
- Test with Long Message:
Write me a 40-line haiku
- Check OpenClaw Version:
openclaw --version
Ensure version 3.2 or later.
- Model Compatibility: Some models don't support streaming well. Try switching models.
Pairing Code Not Working
Problem: Pairing code rejected or expired
Solutions:
Generate New Code: Send
/startto your bot again.Check Spelling: Ensure code is entered exactly as shown.
Time Limit: Pairing codes expire after a few minutes. Get a fresh one.
"Not Configured" Error
Problem: Bot says "Telegram was not configured"
Solutions:
- Reconfigure:
openclaw config
Go through Telegram setup again.
Check Config File: Verify
~/.openclaw/config.jsonhas Telegram section.Force Pairing:
Please pair my Telegram now
Agent will attempt to force the pairing.
Security Considerations
Bot Token Security
Never Share:
- Don't post in public channels
- Don't commit to GitHub
- Don't share in screenshots
If Exposed:
- Go to BotFather
- Send
/revokecommand - Select your bot
- Generate new token
- Update OpenClaw config
Pairing Policy
Allow DM Pairing: Anyone with pairing code can connect (use for personal bots)
Whitelist Only: Only specific Telegram IDs can connect (use for shared servers)
Configure Whitelist:
openclaw config
Navigate to Telegram → Pairing Policy → Whitelist
Advanced Features
Multiple Users
Allow multiple people to use your bot:
- Each user gets their own pairing code
- Each user has separate conversation history
- Configure permissions per user
Group Chats
Add your bot to Telegram groups:
- Add bot to group
- Give bot admin permissions
- Mention bot with
@botnameto interact
Notifications
Set up your agent to send proactive notifications:
Every morning at 8 AM, send me a briefing to Telegram
File Handling
Send Files to Agent:
- Documents (PDF, DOCX, TXT)
- Images (PNG, JPG)
- Code files
Agent Sends Files:
Create a report and send it to my Telegram
Comparison: Telegram vs Other Interfaces
Telegram
Pros:
- Mobile access
- Streaming responses
- File sharing
- Notifications
- Always available
Cons:
- Requires internet
- Limited formatting
- No local file access
Terminal (TUI)
Pros:
- Full control
- Local file access
- No internet required
- Better for development
Cons:
- No mobile access
- Tied to one machine
- No notifications when away
Discord
Pros:
- Rich formatting
- Server integration
- Multiple channels
- Community features
Cons:
- More complex setup
- Heavier client
- Less mobile-friendly
Best Practices
1. Use Descriptive Bot Names
Good: "MyCompany AI Assistant"
Bad: "bot123"
2. Set Bot Profile Picture
Makes it easier to find in Telegram:
- Send
/setuserpicto BotFather - Select your bot
- Upload image
3. Set Bot Description
Help users understand what your bot does:
- Send
/setdescriptionto BotFather - Select your bot
- Enter description
4. Test Regularly
Send a test message daily to ensure bot is responsive.
5. Monitor Usage
Check logs for errors or unusual activity:
openclaw logs | grep telegram
Tips for Better Experience
Optimize for Mobile
- Keep prompts concise
- Use voice messages (if supported)
- Request summaries instead of full reports
Use Markdown
Your agent can format responses:
Format your response with:
- **bold** for important points
- *italic* for emphasis
- `code` for technical terms
Set Expectations
Tell your agent how to respond:
Keep responses under 200 words when on Telegram
Create Telegram-Specific Skills
Create a skill for Telegram responses that:
- Keeps messages concise
- Uses emojis for clarity
- Formats for mobile reading
Next Steps
After setting up Telegram:
- Test All Features: Try different types of requests
- Set Up Notifications: Configure cron jobs to send to Telegram
- Create Mobile-Friendly Skills: Optimize for phone usage
- Invite Team Members: Share access with colleagues (if appropriate)
- Explore Integrations: Combine with other services
Related Resources
Getting Help
If you encounter issues:
- Check OpenClaw logs:
openclaw logs - Ask your agent: "Why isn't Telegram working?"
- Join community Discord for support
- Review official OpenClaw documentation
Final Thoughts
Telegram integration transforms your OpenClaw agent from a desktop tool into a mobile-first assistant. The streaming feature makes conversations feel natural, and the ability to access your agent from anywhere makes it truly useful for daily tasks.
Start with basic chat, then gradually explore advanced features like file sharing, notifications, and automated workflows.
Last Updated: 2026-05-06