You’re at your desk at 11 PM, and you want to ask your AI assistant a quick question — but your laptop is across the room. Your phone’s already in your hand. You type into Telegram and… nothing. The assistant only lives in a browser tab you have to open, log into, and navigate.
That specific frustration is exactly why we connected OpenClaw to Telegram. Now, any message sent to a Telegram bot triggers a full AI response — with memory, tool access, scheduled tasks, and everything else OpenClaw can do. It’s on every device we own, automatically.
This guide is the exact setup we used. Commands included. No fluff.
What You’re Building
By the end of this guide, you’ll have a Telegram bot that:
- Responds to your messages using OpenClaw’s full AI capabilities (not a dumbed-down chatbot)
- Maintains conversation memory across sessions
- Can execute tasks — web searches, file operations, code execution — directly from a Telegram message
- Supports multiple AI models (Claude, GPT, Gemini) behind a single bot interface
- Works on your phone, tablet, desktop — wherever Telegram runs
Think of it like wiring a remote control to an engine that was already running. OpenClaw is the engine. Telegram is the remote. The integration makes both dramatically more useful.
Prerequisites
Before starting, make sure you have:
- OpenClaw installed and running — If you haven’t set it up yet, our OpenClaw review and setup guide covers the full installation process
- A Telegram account — Free at telegram.org
- The OpenClaw Gateway service running — This is the bridge between external channels and OpenClaw’s core
- Basic command line comfort — You’ll run a handful of commands; nothing exotic
That’s genuinely it. No cloud hosting required, no complex OAuth flows, no webhook servers to maintain. OpenClaw handles the networking layer.
Step 1: Create Your Telegram Bot with BotFather
Telegram’s bot creation process is one of the most elegant developer experiences in tech. You literally chat with a bot to make a bot.
Open Telegram and search for @BotFather. Start a conversation and send:
/newbot
BotFather will ask for two things:
- A display name — This is what shows up in Telegram. We used “My AI Assistant” but you can name it anything.
- A username — Must end in “bot” (e.g.,
myaiassistant_bot). This has to be globally unique on Telegram.
Once created, BotFather hands you an API token that looks like this:
7841293847:AAHzxKqPm8vXYjNwT3fLd9GcBuE5iOvRkQs
Copy it. Store it somewhere safe. This is the credential that connects Telegram to OpenClaw.
One thing other guides skip: BotFather also lets you set bot commands, a description, and a profile photo — all optional, but they make your bot feel like a real tool rather than a test experiment. We used /setdescription and /setuserpic to polish ours. Took two minutes.
Step 2: Get Your Telegram User ID
OpenClaw’s Telegram integration uses your personal user ID as an access control filter. This means your bot will only respond to you (or whoever you authorize) — important if you’re storing sensitive API keys or running commands that affect your actual systems.
To get your user ID, message @userinfobot on Telegram. It immediately replies with your numeric user ID. It looks like: 429817364
Write this down alongside your bot token.
Step 3: Configure OpenClaw’s Telegram Channel
OpenClaw uses a config.json file (or environment variables) to manage channel integrations. The Telegram integration lives under the channels key.
Open your OpenClaw config — typically at ~/.openclaw/config.json on Mac/Linux or %APPDATA%\openclaw\config.json on Windows:
{
"channels": {
"telegram": {
"enabled": true,
"botToken": "YOUR_BOT_TOKEN_HERE",
"allowedUsers": [429817364],
"defaultModel": "claude-opus-4-6"
}
}
}
Replace YOUR_BOT_TOKEN_HERE with the token BotFather gave you, and replace the number in allowedUsers with your actual user ID.
The defaultModel setting controls which AI model handles your Telegram messages. We run claude-opus-4-6 because we want full reasoning capability on every message — but if you’re watching costs, claude-sonnet-4-6 is faster and handles most everyday queries perfectly well.
If you prefer environment variables over JSON config, OpenClaw also accepts:
OPENCLAW_TELEGRAM_BOT_TOKEN=your_token_here
OPENCLAW_TELEGRAM_ALLOWED_USERS=429817364
Step 4: Start the OpenClaw Gateway
The Gateway is OpenClaw’s external-facing service. It’s what listens for incoming Telegram messages and routes them to the AI engine.
openclaw gateway start
You should see output confirming the Telegram channel connected:
[Gateway] Telegram channel initialized
[Gateway] Bot @myaiassistant_bot connected
[Gateway] Listening for messages...
If you see an error about the bot token, double-check there are no extra spaces in your config file. Token parsing is case-sensitive and whitespace-sensitive.
To verify the Gateway is running:
openclaw gateway status
We run the Gateway as a persistent system service so it survives reboots. On Linux/Mac:
openclaw gateway install-service
openclaw gateway enable
On Windows, OpenClaw registers a Windows Service automatically when you run the install command as Administrator.
Step 5: Send Your First Message
Open Telegram, find your bot by its username, and send anything. Start simple:
Hello
You should get a response within a few seconds. The latency depends on your internet connection and whichever AI model you’re routing through — Claude typically responds in 2-5 seconds for a simple greeting.
Now try something that actually uses OpenClaw’s capabilities:
Search the web for the latest OpenClaw updates
If web search is configured in your OpenClaw setup, you’ll see it execute the search and return results. This is the moment it stops feeling like a chatbot and starts feeling like an AI assistant with actual capabilities.
Advanced Configuration: Multiple Users
If you want to share your bot with trusted collaborators, add their user IDs to the allowedUsers array:
"allowedUsers": [429817364, 538291047, 612847293]
Each user gets their own conversation thread and memory context. OpenClaw tracks sessions by user ID, so your conversations don’t bleed into each other.
For team setups, you can also configure role-based access — some users get read-only queries, others get full tool access including file operations and code execution. This lives in the permissions block of the channel config. Check the OpenClaw documentation for the full permissions schema.
Advanced Configuration: Bot Commands
One of our favorite quality-of-life improvements: registering slash commands so Telegram shows an autocomplete menu when users type /.
You can do this through BotFather:
/setcommands
Then paste a command list. Ours looks like:
status - Check system status and active tasks
tasks - List pending and running tasks
clear - Clear conversation memory
model - Switch AI model for this session
help - Show available commands
In your OpenClaw config, you can then wire these commands to specific behaviors:
"commands": {
"/status": "system_status",
"/tasks": "list_tasks",
"/clear": "clear_memory",
"/model": "switch_model"
}
The /clear command is genuinely useful. Sometimes you want to start a fresh conversation without the AI carrying context from three hours ago. Hit /clear and you get a clean slate — same assistant, same capabilities, no memory of the previous thread.
Advanced Configuration: Notifications and Proactive Messages
This is where Telegram integration gets genuinely powerful — and where most guides stop writing before the interesting stuff.
OpenClaw can send messages TO your Telegram bot, not just respond to them. This means you can set up proactive notifications: cron jobs that send you a morning briefing, alerts when a website goes down, notifications when a long-running task completes.
In your OpenClaw scripts or cron tasks, you can trigger outbound Telegram messages programmatically. Our OpenClaw cron jobs guide covers the full automation setup, but here’s the core pattern:
// In an OpenClaw cron task
await message({
action: "send",
target: "your_telegram_chat_id",
message: "Morning briefing: BTC is at $94,200 (+2.1%). 3 new AI tools launched overnight."
})
We get a daily 9 AM briefing to Telegram every morning — BTC price, overnight AI news, any pending tasks. It took about 20 minutes to set up and has genuinely changed how we start the day. The information finds us instead of us hunting for it.
Troubleshooting Common Issues
Bot doesn’t respond to messages
The most common cause: the Gateway isn’t running. Check with openclaw gateway status. If it’s stopped, restart it with openclaw gateway start.
Second most common cause: your user ID isn’t in the allowedUsers list. OpenClaw silently drops messages from unauthorized users (by design — you don’t want to advertise which messages are being ignored). Verify your user ID is correct with @userinfobot again.
“Unauthorized” errors in logs
This almost always means the bot token has a typo or extra whitespace. Copy it fresh from BotFather with /mybots → select your bot → API Token → copy.
High latency responses
If responses are consistently slow (10+ seconds), check which model you’re routing through. Claude Opus is the most capable but also the slowest for simple queries. Switch to Claude Sonnet for conversational messages and reserve Opus for complex research or coding tasks. You can even set this up to switch automatically based on message content length or complexity signals.
Memory not persisting between conversations
OpenClaw’s memory system requires the memory plugin to be active. Run openclaw status and check that the memory module shows as enabled. If it’s not, enable it in your plugin configuration and restart the Gateway.
How We Actually Use This Setup
We run this exact configuration as part of our AI content operation for computertech.co. Here’s what a typical day looks like from the Telegram side:
Morning: The assistant sends an unprompted briefing — AI news from overnight, any site errors detected, the day’s publishing queue. We didn’t ask. It just does it.
During the day: Quick queries from the phone while away from the desk. “What’s the traffic on our Cursor review this week?” “Draft a tweet about the new Grok update.” “Check if the homepage is returning 200.” Every one of these would normally require sitting down at a computer.
Longer work: Complex tasks get handed off (“Research the top 5 competitors to OpenClaw and summarize their feature gaps”) — the assistant runs them in the background and messages back when done, often 5-10 minutes later with a complete analysis.
The honest truth: this setup has saved us an embarrassing amount of time on tasks that felt small but added up. The friction reduction of being able to dispatch AI tasks from a phone message is more impactful than it sounds when you’re in the middle of something else.
OpenClaw vs Dedicated Telegram AI Bots
If you’ve considered services like BotFather-based ChatGPT wrappers, FlowXO, or ManyChat for building Telegram AI bots, here’s the meaningful difference:
Those tools give you a Telegram interface connected to a constrained, stateless API call. You get a chatbot. You don’t get a tool-using agent with memory, file access, cron jobs, and the ability to actually execute tasks on your systems.
OpenClaw’s Telegram integration is more like giving a full AI workstation a phone number. The comparison that comes closest: it’s the difference between texting a virtual assistant who can only reply versus texting someone who has your entire computer in front of them and can actually do things on it.
For most users, the extra capability is exactly what makes it worth the slightly more involved setup. A bot that can tell you the weather is a toy. A bot that can check your site uptime, draft content, run analysis, and send you the results while you’re having lunch — that’s a tool.
If you want to see how OpenClaw stacks up against dedicated agent platforms, we’ve covered Lindy AI (which also has Telegram integration) and Toku Agency (a multi-agent marketplace) as alternatives worth knowing about.
Security Considerations
Running an AI assistant that can execute commands and access your systems via Telegram is genuinely powerful — and genuinely worth thinking about from a security standpoint.
Three things we recommend:
1. Keep your bot private. Don’t share the bot username publicly. The allowedUsers whitelist is your primary defense, but a bot with a public username gets constant spam probes.
2. Scope your tool permissions. OpenClaw lets you configure which tools are available per channel. For Telegram, consider restricting destructive operations (file deletion, system commands) to require a confirmation step. You don’t want a mistyped mobile message deleting something.
3. Rotate your bot token periodically. If you ever accidentally share your config file, revoke the old token via BotFather (/revoke) and issue a new one. Update the config and restart the Gateway. Takes two minutes.
What’s Next After Setup
With Telegram connected, the natural next step is building out the automation layer. Our cron jobs guide covers scheduling tasks that proactively send you information rather than waiting for you to ask.
Beyond that:
- Website monitoring: Set up a 5-minute uptime check that Telegrams you if your site goes down
- Content pipeline: Have OpenClaw draft articles autonomously and Telegram you the drafts for review
- Research automation: Send a research request from your phone, get a full analysis back in 10 minutes
- Affiliate tracking: Morning message with yesterday’s click counts and revenue across your affiliate programs
The full picture of what’s possible is covered in our OpenClaw review, but the Telegram integration is genuinely the piece that makes the assistant feel always-available rather than something you visit occasionally in a browser tab.
Running OpenClaw on a Server for 24/7 Telegram Access
The most common follow-up question after setting this up: “What happens when my laptop is closed?”
Fair. If OpenClaw runs on your personal machine, your Telegram bot goes dark whenever that machine is off or sleeping. For most people, this is fine — you’re sleeping too. But if you want true 24/7 availability (say, so a team member in another timezone can use the bot, or so your monitoring alerts arrive at 3 AM even when your laptop isn’t on), you need to run OpenClaw on a server.
We use a Digital Ocean droplet — the $6/month basic tier handles OpenClaw comfortably for personal use. Setup is identical to local installation: install OpenClaw, configure the Telegram channel, start the Gateway as a system service, and done. The bot stays live indefinitely.
One practical note: if you’re running OpenClaw on a remote server, use environment variables for your bot token rather than a config file. It’s easier to manage across SSH sessions and less likely to end up in version control by accident.
SSH into your droplet and run:
export OPENCLAW_TELEGRAM_BOT_TOKEN="your_token_here"
export OPENCLAW_TELEGRAM_ALLOWED_USERS="429817364"
openclaw gateway start --daemon
The --daemon flag runs the Gateway as a background process that persists after you close your SSH session. For production use, set it up as a systemd service so it restarts automatically on server reboot.
Integrating with Other AI Tools in Your Stack
OpenClaw’s Telegram integration doesn’t exist in isolation. It’s one channel in a broader ecosystem of tools we use at computertech.co. Here’s how it fits:
Content research: We message the bot from the phone — “What AI tools launched this week?” — and it runs a web search and returns a structured summary. That summary feeds directly into our editorial calendar decisions. No laptop needed; the decision is made from the home screen.
Site health: Monitoring scripts post to Telegram when anomalies are detected. 404 spike? Telegram message. Server load climbing? Telegram message. The alerts reach us on whatever device is in hand, not buried in an email inbox.
Long-running tasks: When we kick off a multi-step research task — competitor analysis, keyword gap identification — the assistant works in the background and messages us when it’s done. We can close the laptop and the work continues.
If you’re running other AI tools alongside OpenClaw, the Telegram channel becomes the unified interface. Instead of checking five different dashboards, one bot conversation shows you what’s happening across your stack.
For teams using AI tools like ClickUp AI for project management or Notion AI for documentation, OpenClaw can serve as the conversational layer that pulls information from multiple sources into a single Telegram thread — though this requires some custom tool configuration to set up the integrations.
The Honest Assessment: Limitations You Should Know
We promised practical and honest. So here’s what the Telegram integration doesn’t do well:
Voice messages: OpenClaw’s Telegram integration processes text. Telegram voice messages sent to the bot won’t be transcribed or processed (unless you specifically configure a speech-to-text step in the tool chain). If you want to dictate queries, you’ll need to use Telegram’s built-in speech-to-text keyboard feature to convert before sending.
Image understanding: You can send images to the bot, but processing them requires a vision-capable model configured in your OpenClaw setup. By default, not all model configurations support image input from Telegram. If you need to send screenshots for the AI to analyze, confirm your model config supports multimodal input first.
Inline responses in groups: The Telegram channel works best in direct message conversations with the bot. Group chat integration is possible but requires additional configuration and careful permission scoping — you probably don’t want your AI assistant responding to every message in a shared group chat by default.
Rate limits: Telegram’s Bot API has rate limits. For high-volume use cases — hundreds of messages per hour — you may need to implement queuing. This is an edge case for most personal or small-team setups, but worth knowing if you’re building something more ambitious.
None of these are dealbreakers. They’re just the honest boundaries of what the current integration supports. The core use case — conversational AI agent accessible from any Telegram-connected device — works exactly as described.
Frequently Asked Questions
Does the OpenClaw Telegram integration work on all devices?
Yes. Because the integration runs server-side (through the OpenClaw Gateway on your machine), your Telegram bot works on any device where you’re logged into Telegram — phone, tablet, desktop, web browser. The AI processing happens on your machine; Telegram is just the interface.
Is there a cost to connecting OpenClaw to Telegram?
Telegram’s bot API is completely free. The only costs involved are the AI model API calls that OpenClaw makes when it processes your messages — the same API costs you’d pay for any OpenClaw usage. If you’re already running OpenClaw, adding Telegram adds no new subscription fees.
Can multiple people use the same OpenClaw Telegram bot?
Yes. Add multiple user IDs to the allowedUsers array. Each user gets their own conversation context and memory thread. OpenClaw tracks sessions by Telegram user ID, so conversations don’t mix between users.
What happens if my computer is off — will the bot still respond?
No. OpenClaw runs locally on your machine. If the computer is off or the Gateway service has stopped, the bot won’t respond. For always-on availability, you’d need to run OpenClaw on a server (a Digital Ocean droplet, for example) rather than a personal computer. That’s a more advanced setup, but it’s entirely supported.
Can I use OpenClaw’s Telegram bot for team collaboration?
Yes, with some caveats. You can add team member user IDs to allowedUsers and configure different permission levels per user. However, OpenClaw is primarily designed as a personal AI assistant — it’s not a multi-tenant SaaS platform. Team use works well for small groups (2-5 people) with clear role separation.
How is this different from just using a ChatGPT Telegram bot?
A ChatGPT Telegram bot typically gives you a stateless chat interface to GPT-4. OpenClaw’s Telegram integration gives you access to a full AI agent with persistent memory, tool use (web search, file operations, code execution), cron job scheduling, and the ability to take actions on your actual systems. It’s a qualitatively different capability level, not just a different AI model behind the same interface.
What AI models can I use through the Telegram integration?
Any model configured in your OpenClaw installation. By default, this includes Claude (Anthropic), GPT models (OpenAI), and Gemini (Google). You can switch models mid-conversation using the /model command or by configuring a default in your channel settings.



