How to Connect Telegram to Your OpenClaw AI Assistant
Easy step-by-step guide to connecting Telegram to OpenClaw using BotFather. Create your bot, get the API token, and have your AI assistant live in minutes.
How to Connect Telegram to Your OpenClaw AI Assistant
If you are new to OpenClaw channel integrations, Telegram is the best place to start. Unlike WhatsApp, which requires business verification and Meta Developer Console setup, Telegram takes about five minutes and requires nothing more than a Telegram account. By the end of this guide, you will have a fully working Telegram AI assistant powered by OpenClaw.
Why Telegram First?
Telegram’s bot platform is open, well-documented, and imposes no business verification requirements. You create a bot with a single conversation in the BotFather interface, receive an API token, and paste it into your OpenClaw config. There’s no webhook verification dance, no approval process, and no phone number restrictions. It’s the fastest way to see OpenClaw in action.
Prerequisites
- A working OpenClaw installation running on port
18789(see the VPS install guide if you haven’t set it up yet) - A Telegram account on your phone or desktop
- Your OpenClaw configuration file accessible at
config/openclaw.yaml
Step 1: Open BotFather in Telegram
Open Telegram and search for @BotFather — the official Telegram bot for creating and managing bots. It has a blue checkmark confirming it’s the verified account.
Start a conversation with BotFather by clicking Start. You’ll see a list of available commands.
Step 2: Create Your Bot
Send the /newbot command to BotFather. It will ask you two questions:
- Name: This is the display name shown in conversations. Choose something descriptive, like “My AI Assistant” or your name.
- Username: This must end in
bot(e.g.,myaihelper_botorrustem_ai_bot). It must be unique across all of Telegram.
Once accepted, BotFather replies with a congratulations message containing your bot API token — a long string that looks like 1234567890:ABCdefGHIjklMNOpqrSTUvwxyz. Copy this token immediately and store it securely.
Step 3: Configure Your Bot (Optional but Recommended)
While still in BotFather, set a description and about text for your bot so it feels polished:
/setdescription — add a short description shown when someone opens the bot
/setabouttext — shown on the bot's profile page
/setuserpic — upload a profile photo for the bot
You can also disable the ability for strangers to add your bot to groups if you want a private assistant:
/setjoingroups → Disable
Step 4: Add the Token to OpenClaw
Open your OpenClaw configuration file:
nano /opt/openclaw/config/openclaw.yaml
Add the Telegram channel block under the channels section:
channels:
telegram:
enabled: true
bot_token: "YOUR_BOT_API_TOKEN"
Replace YOUR_BOT_API_TOKEN with the token you received from BotFather.
Step 5: Restart OpenClaw
Save the config and restart the process:
pm2 restart openclaw
Watch the logs for a moment to confirm Telegram connected successfully:
pm2 logs openclaw --lines 30
You should see a log line similar to [Telegram] Connected as @yourbotusername.
Step 6: Test Your AI Assistant
Open Telegram and search for your bot by username. Click Start to begin a conversation. Send a message — anything will do — and your OpenClaw Telegram AI assistant should respond using your configured AI provider (OpenAI, Anthropic, or whichever you set up during onboarding).
The response time depends on your AI provider’s API latency. Typically it’s 1–3 seconds for GPT-4o or Claude 3.5 Sonnet.
Tips for Getting More From the Telegram Integration
Multiple users: By default, OpenClaw responds to anyone who messages your bot. You can restrict this to specific Telegram user IDs in the config’s allowed_users array — useful if you want a truly private assistant.
Groups: You can add your bot to a Telegram group, and OpenClaw will respond to messages that mention the bot directly. This is the foundation of team use cases.
Commands: OpenClaw supports custom Telegram commands (e.g., /summarise, /translate). These can be defined in your OpenClaw plugin config — see our plugins guide for details.
Ready for More Channels?
With Telegram working, you might want to add Discord next (good for team environments) or tackle the more complex WhatsApp integration. Check out the Discord setup guide or the WhatsApp guide when you’re ready.
Prefer to skip the setup entirely? We’ll configure your OpenClaw instance and all your channels — you just start chatting.
Ready for Your Personal AI Assistant?
Free 30-minute consultation. We'll assess your setup and recommend the right OpenClaw configuration for you.
Talk to an Expert