Tutorial

OpenClaw + Telegram Integration Guide

February 14, 20268 min readUpdated September 11, 2026By OpenClawBlog Team
March 17, 2026 8 min read

Telegram is one of the easiest platforms to integrate with OpenClaw thanks to its excellent Bot API. This guide walks you through creating an AI-powered Telegram bot in minutes.

Prerequisites

Before starting, ensure you have:

  • OpenClaw installed and configured
  • A Telegram account
  • Your chosen LLM API key (Anthropic Claude or OpenAI)

Step 1: Create Your Telegram Bot

Telegram bots are created through the official BotFather bot:

  1. Open Telegram and search for @BotFather
  2. Start a chat with BotFather
  3. Send the command /newbot
  4. Follow the prompts to name your bot
  5. Choose a username (must end in 'bot')
  6. Save the API token BotFather provides
BotFather will output something like: 1234567890:ABCdefGHIjklMNOpqrsTUVwxyz
Keep your token secret! Anyone with your bot token can control your bot. Treat it like a password.

Step 2: Configure OpenClaw

Edit your OpenClaw configuration to add the Telegram integration:

# ~/.config/openclaw/config.yaml integrations: telegram: enabled: true botToken: "YOUR_BOT_TOKEN_HERE" webhookUrl: "https://your-domain.com/webhook/telegram"

Step 3: Configure Polling or Webhook

OpenClaw supports two methods for receiving Telegram updates:

Option A: Polling (Easiest)

Polling is simpler to set up and works great for development:

# config.yaml integrations: telegram: enabled: true botToken: "YOUR_BOT_TOKEN" mode: "polling" # Default, easiest setup

Option B: Webhook (Production)

Webhooks are more efficient for production deployments:

# config.yaml integrations: telegram: enabled: true botToken: "YOUR_BOT_TOKEN" mode: "webhook" webhookUrl: "https://your-domain.com/webhook/telegram"
Tip: For testing webhooks locally, use ngrok to expose your local OpenClaw instance to the internet.

Step 4: Start OpenClaw

With configuration complete, start the OpenClaw daemon:

# Start the daemon openclaw daemon start # Check logs to verify Telegram connection openclaw daemon logs --follow

Step 5: Test Your Bot

In Telegram, find your bot by username and start a chat:

  • Send /start to initialize
  • Send a message like "Hello!"
  • Your bot should respond with AI-generated text

Advanced Configuration

Custom Commands

Define custom slash commands for your bot:

# config.yaml integrations: telegram: commands: - command: "help" description: "Show available commands" response: "I'm an AI assistant! Ask me anything." - command: "status" description: "Check bot status" action: "status_check"

Group Chat Support

let your bot in group chats:

# config.yaml integrations: telegram: groupChats: enabled: true mentionTrigger: true # Only respond when mentioned allGroups: false allowedGroups: - "My Group Chat" - "AI Testing"

Multi-Agent Routing

Route different groups to different agents:

# config.yaml routing: telegram: - match: type: "group" name: "coding-chat" agent: "coding-assistant" - match: type: "group" name: "writing-group" agent: "writer-assistant"

Bot Features Available

OpenClaw's Telegram integration supports:

  • Private messages: One-on-one AI conversations
  • Group chats: AI assistance in group discussions
  • Inline queries: AI suggestions as you type
  • File uploads: Process documents and images
  • Voice messages: Transcribe and respond to audio
  • Rich formatting: Markdown responses with links, bold, etc.

Troubleshooting

Bot Not Responding

  • Check daemon is running: openclaw daemon status
  • Verify bot token is correct in config
  • Check logs for errors: openclaw daemon logs
  • Ensure LLM API key is valid

Webhook Verification Fails

  • Verify webhook URL is publicly accessible
  • Check SSL certificate is valid
  • Ensure firewall allows incoming connections

Use Cases

OpenClaw on Telegram is perfect for:

  • Personal Assistant: Quick AI help from your phone
  • Group Helper: AI that assists your community
  • Study Groups: Get answers without leaving the chat
  • Language Practice: AI conversation partner

What's Next?


References

  1. OpenClaw Official Documentation - https://docs.openclaw.ai/ - Accessed February 2026
  2. OpenClaw GitHub Repository - https://github.com/openclaw/openclaw - Accessed February 2026
  3. Telegram Bot API Documentation - https://core.telegram.org/bots/api - Accessed February 2026
  4. Telegram BotFather Guide - Creating a New Bot - Accessed February 2026

Build your AI bot today

Create an intelligent Telegram bot with OpenClaw in just a few minutes.

Get Started

Reference Trail

Sources and further reading

  1. https://docs.openclaw.ai/docs.openclaw.ai
  2. https://github.com/openclaw/openclawgithub.com
  3. https://core.telegram.org/bots/apicore.telegram.org
  4. Creating a New Botcore.telegram.org
Back to ArchiveMore: TutorialsNext: OpenClaw Architecture Deep Dive