OpenClaw + Telegram Integration Guide

Connect your AI agent to Telegram in 15 minutes — DMs, group chats, and multi-bot support

⏱ 15 minutes📊 Beginner📅 Updated Feb 2026

Why Telegram + OpenClaw?

Quick Answer: The OpenClaw Telegram integration connects your AI agent to Telegram in under 15 minutes. It supports DMs, group chats (up to 200K members), inline keyboards, and multi-bot configurations on a single server. OpenClaw handles persistent memory across conversations, tool access (web search, file operations, APIs), and unified context across all your messaging channels. The integration is free — you only pay for VPS hosting ($5-12/month) and AI API usage.

Telegram is one of the best platforms for AI agents. Unlike WhatsApp or iMessage, Telegram has a fully open Bot API with no approval process, no message limits, and support for rich formatting, inline keyboards, and group chats. Combined with OpenClaw's multi-agent architecture, you can build anything from a personal assistant to a customer support bot serving thousands of users.

Here's what makes this combination powerful:

Prerequisites

Don't have a server yet? Check our VPS comparison guide — a $6/month Vultr instance is more than enough.

Step 1: Create a Telegram Bot with BotFather

Open Telegram and search for @BotFather. This is Telegram's official bot for creating and managing bots.

  1. Send /newbot to BotFather
  2. Choose a display name (e.g., "My AI Assistant")
  3. Choose a username ending in "bot" (e.g., my_ai_assistant_bot)
  4. BotFather will give you an API token like: 7123456789:AAH...
⚠️ Keep your bot token secret. Anyone with this token can control your bot. If it's ever leaked, use /revoke in BotFather to generate a new one.

Optional but recommended — set these with BotFather:

Step 2: Configure OpenClaw

Add the Telegram channel to your OpenClaw configuration. Run:

openclaw config.patch channels.telegram.token "YOUR_BOT_TOKEN_HERE"
openclaw config.patch channels.telegram.enabled true

That's the minimum config. Your bot is now connected. But let's make it smarter with a few more settings:

# Allow the bot to work in group chats (optional)
openclaw config.patch channels.telegram.chatTypes '["direct","group"]'

# Set which agent handles Telegram messages
openclaw config.patch channels.telegram.agent "main"

Full Configuration Reference

SettingDescriptionDefault
tokenBot API token from BotFatherrequired
enabledEnable/disable the channelfalse
chatTypesArray: "direct", "group", or both["direct"]
agentWhich agent handles messages"main"
allowListArray of allowed Telegram user IDs[] (all allowed)

Step 3: Define Your Agent's Personality

The magic of OpenClaw is in the SOUL.md file. This markdown file defines who your agent is, how it behaves, and what it knows. Here's a real example for a Telegram assistant:

# SOUL.md — Telegram AI Assistant

You are Alex, a helpful AI assistant on Telegram.

## Personality
- Friendly and concise — Telegram messages should be short
- Use emoji sparingly but naturally 👋
- Break long responses into multiple short paragraphs
- Use Telegram markdown formatting (bold, code blocks)

## Capabilities
- Answer questions about our product/service
- Help with technical troubleshooting
- Schedule reminders and follow-ups
- Search the web for current information

## Rules
- Never share internal company data
- Escalate billing issues to human support
- Keep responses under 500 words unless asked for detail
- Always respond in the user's language
💡 Pro tip: Telegram users expect fast, short replies. Keep your SOUL.md focused on concise communication. The SOUL.md Mega Pack ($5) includes Telegram-optimized templates for customer support, sales, community management, and more.

Step 4: Test Your Bot

Restart OpenClaw to pick up the new config:

openclaw gateway restart

Now open Telegram, find your bot by its username, and send a message. You should get a response within a few seconds.

If something's not working, check:

  1. openclaw gateway status — Is the gateway running?
  2. openclaw doctor — Run diagnostics
  3. Check that your bot token is correct (no extra spaces)
  4. Make sure your VPS firewall allows outbound HTTPS (port 443)

Advanced: Group Chat Setup

Running your bot in Telegram groups requires a few extra steps:

Enable Group Privacy Mode

By default, Telegram bots in groups only see messages that mention them or start with a command. To let your bot see all messages:

  1. Open BotFather
  2. Send /setprivacy
  3. Select your bot
  4. Choose Disable (this enables the bot to see all group messages)

Configure Group Behavior

You probably don't want your bot responding to every message in a group. Configure trigger patterns:

# Only respond when mentioned by name or with @
openclaw config.patch channels.telegram.groupTrigger "mention"

Options for groupTrigger:

Real-World Use Cases

1. Customer Support Bot

Set up a Telegram bot that answers product questions 24/7. Connect it to your knowledge base and let it handle the first line of support. Escalate complex issues to human agents automatically.

2. Team Assistant in Group Chats

Add your bot to your team's Telegram group. It can summarize long threads, answer technical questions, set reminders, and pull data from connected tools like Jira or Notion.

3. Personal AI Assistant

Use OpenClaw as your personal Telegram assistant. It remembers your preferences, manages your schedule, searches the web, and even controls smart home devices through integrations.

4. Community Management

For Telegram communities, your bot can welcome new members, answer FAQs, moderate content, and provide automated onboarding flows.

5. Sales & Lead Qualification

Build a sales agent that qualifies leads through Telegram conversations. It can ask qualifying questions, share product info, and hand off hot leads to your sales team.

Telegram vs Other Channels

FeatureTelegramWhatsAppSlackDiscord
Bot API✅ Free, open⚠️ Paid, approval needed✅ Free✅ Free
Group chats✅ Up to 200K members✅ Up to 1024✅ Channels✅ Channels
Rich formatting✅ Markdown + HTML⚠️ Limited✅ Blocks✅ Embeds
File sharing✅ Up to 2GB✅ Up to 100MB✅ Varies✅ Up to 25MB
Setup time5 minDays-weeks10 min10 min
Best forPersonal, communitiesBusiness, customersTeamsCommunities

Want to connect multiple channels? OpenClaw supports all of them simultaneously. Check our integration guides for Slack, Discord, and WhatsApp.

Troubleshooting

Bot doesn't respond

Bot responds slowly

Bot doesn't work in groups

Frequently Asked Questions

Can OpenClaw handle Telegram group chats?

Yes. Set chatTypes to include "group" in your config. The agent responds when mentioned by name or when messages match trigger patterns you define.

Does OpenClaw support Telegram inline keyboards and buttons?

OpenClaw supports sending messages with Telegram's native formatting. For interactive buttons and inline keyboards, you can use the message tool with Telegram-specific parameters.

How many Telegram conversations can OpenClaw handle simultaneously?

There's no hard limit. Each conversation runs in its own session. A typical VPS with 2GB RAM can handle hundreds of concurrent Telegram conversations.

Can I use OpenClaw with multiple Telegram bots?

Yes. You can configure multiple agents in OpenClaw, each with its own Telegram bot token and personality. They run independently on the same server.

Is the Telegram integration free?

The Telegram Bot API is free. OpenClaw is open source and free. You only pay for the VPS ($5-12/month) and AI API costs (varies by usage).

Next Steps

Your Telegram bot is running. Here's what to do next:

🔥 Ready to Build Your AI Agent?

Get 100 ready-to-use SOUL.md templates for any industry — only $9.90

Get SOUL.md Mega Pack →

Or start free: Download 5 Free Templates