How to Set Up an OpenClaw Telegram Bot
Telegram bots are one of the easiest ways to make OpenClaw accessible to your team or customers. This beginner-friendly guide walks you through creating a bot with BotFather, configuring OpenClaw for Telegram, and setting up webhooks, commands, and group support.
Why This Is Hard to Do Yourself
These are the common pitfalls that trip people up.
BotFather workflow
Creating a Telegram bot requires specific commands in a specific order through BotFather
Webhook vs polling
Two different methods with different tradeoffs. Webhooks need HTTPS, polling is simpler but slower.
Group vs DM behavior
Bots behave differently in groups vs direct messages. Privacy mode, command parsing, and mention detection all vary.
Step-by-Step Guide
Create a bot with BotFather
# Open Telegram and message @BotFather
# Send: /newbot
# Follow prompts to set name and username
# Save the API token: 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11Warning: Never share your bot token publicly. Anyone with the token can control your bot.
Configure OpenClaw for Telegram
# In config/channels/telegram.yaml:
telegram:
enabled: true
bot_token: "YOUR_BOT_TOKEN"
mode: webhook # or "polling" for development
webhook_url: "https://your-domain.com/webhooks/telegram"
allowed_users: [] # Empty = allow all, or list Telegram user IDsSet up the webhook
# Register webhook with Telegram:
curl -X POST "https://api.telegram.org/botYOUR_TOKEN/setWebhook" \
-H "Content-Type: application/json" \
-d '{"url": "https://your-domain.com/webhooks/telegram"}'Configure bot commands
# Set bot commands via BotFather:
# /setcommands
# Select your bot, then send:
start - Start a conversation
help - Show available commands
reset - Clear conversation history
status - Check bot statusTest the bot
# Message your bot on Telegram
# Check OpenClaw logs:
tail -f ~/.openclaw/logs/channels.log | grep telegramWant a Polished Telegram Bot?
Our integration experts set up Telegram bots with custom commands, group support, inline mode, and error handling. Get a production-ready bot, not a bare-bones setup.
Get matched with a specialist who can help.
Sign Up for Expert Help โ