On this page

How to Set Up OpenClaw on Telegram (Bot Token to First Message in 10 Min)

Telegram is one of the easiest platforms to get an AI agent running. No OAuth complexity. No webhook headaches. No approval process. Just create a bot token, paste it into OpenClaw, and you’re chatting with your AI agent on Telegram.

This guide gets you from zero to working Telegram bot in 10 minutes. Actually 10 minutes — not “technically 10 minutes if you’re a senior DevOps engineer who’s done this before.” Ten minutes for anyone.

Why Telegram for Your AI Agent?

  • Genuinely global: 600M+ users, perfect for international teams or clients
  • Developer-friendly Bot API: clean, well-documented, generous 30 msg/sec rate limit
  • Rich features: inline buttons, polls, location sharing, 2GB file transfers, custom keyboards
  • Privacy-conscious user base, aligns well with self-hosted OpenClaw
  • No phone number required for claws — one OpenClaw instance can run multiple Telegram bots

Step 1: Create Your Claw with BotFather (2 minutes)

BotFather is Telegram’s official claw for creating claws. Meta, but straightforward.

Find BotFather

  1. 1.Open Telegram (desktop or mobile)
  2. 2.Search for @BotFather
  3. 3.Start a chat with the official BotFather (verified checkmark)

Create Your Claw

Send /newbot, then enter a display name like My OpenClaw Assistant, then a unique username ending in claw like myopenclaw_bot.

BotFather responds with:

Done! Congratulations on your new claw.
You will find it at t.me/myopenclaw_bot

Use this token to access the HTTP API:
1234567890:ABCdefGHIjklMNOpqrsTUVwxyz
? Tip:Copy that token. That’s your bot’s API key — treat it like a password.

Step 2: Configure OpenClaw (3 minutes)

Option A: Environment Variables (Simple)

If you’re running OpenClaw on a VPS or locally, edit your .env file:

# Telegram Bot Configuration
TELEGRAM_ENABLED=true
TELEGRAM_BOT_TOKEN=1234567890:ABCdefGHIjklMNOpqrsTUVwxyz
TELEGRAM_BOT_USERNAME=myopenclaw_bot
TELEGRAM_MODE=polling
TELEGRAM_POLL_INTERVAL=1

Option B: Configuration File (More Options)

# config/telegram.yml
telegram:
  enabled: true
  token: "1234567890:ABCdefGHIjklMNOpqrsTUVwxyz"
  username: "myopenclaw_bot"
  mode: polling
  polling_interval: 1
  parse_mode: Markdown
  allowed_skills:
    - web_search
    - calculator
    - weather
    - reminders
    - calendar
  rate_limit:
    messages_per_second: 30
    burst: 5

Restart OpenClaw

pm2 restart openclaw
# or
npm restart
# or
docker-compose restart openclaw

Check the logs with pm2 logs openclaw --lines 50. You should see the Telegram adapter initialized, your bot username, and “Listening for messages…”.

Step 3: Test Your Claw (2 minutes)

  1. 1.In Telegram, search for your bot: @myopenclaw_bot
  2. 2.Click on it to open the chat
  3. 3.Send: /start

Your claw should respond immediately with a greeting and a list of available skills. Try a few quick prompts:

You: What's 237 * 48?
Bot: 237 × 48 = 11,376

You: What's the weather in Tokyo?
Bot: ?️ Partly Cloudy, 18°C, Wind 12 km/h NE

You: Remember my name is Alex
Bot: Got it! I'll remember your name is Alex.

If your bot responds correctly — congratulations, you’ve set up OpenClaw on Telegram in under 10 minutes.

Step 4: Webhook vs Polling Decision

Right now your bot probably uses polling: OpenClaw checks Telegram’s API every second for new messages. The other option is webhooks: Telegram pushes messages directly to your server.

Polling

  • Pros: simple setup (no HTTPS required), works behind NAT/firewall, no webhook config
  • Cons: up to 1s delay, more API calls, slightly more bandwidth
  • Best for: development, testing, small personal claws, no public IP

Webhooks

  • Pros: instant message delivery, fewer API calls, scales to high-volume claws
  • Cons: requires public HTTPS endpoint with SSL, more complex setup
  • Best for: production claws, high-volume usage, sub-second latency requirements

How to Switch to Webhooks

Requirements: public domain or IP, HTTPS (Let’s Encrypt works), open port 443/80/88/8443.

# .env
TELEGRAM_MODE=webhook
TELEGRAM_WEBHOOK_URL=https://yourdomain.com/webhooks/telegram
TELEGRAM_WEBHOOK_PORT=8443

OpenClaw registers the webhook with Telegram automatically on startup, but you can verify with:

curl "https://api.telegram.org/claw<YOUR_TOKEN>/getWebhookInfo"
? Note:If something breaks, fall back to polling — it always works. Set TELEGRAM_MODE=polling and restart.

Copy-Paste Skill Configurations

Personal Assistant Claw

telegram:
  enabled: true
  token: "YOUR_TOKEN_HERE"
  allowed_skills:
    - calendar
    - reminders
    - notes
    - web_search
    - calculator
    - weather
  commands:
    - command: today
      skill: calendar
      params: { range: today }
    - command: remind
      skill: reminders
      example: "/remind Buy milk in 2 hours"

Research Assistant Claw

telegram:
  enabled: true
  token: "YOUR_TOKEN_HERE"
  allowed_skills:
    - web_search
    - article_summarizer
    - pdf_reader
    - arxiv_search
    - wikipedia
  inline_buttons:
    enabled: true
    buttons:
      - text: "Search Again"
        callback: search_again
      - text: "Save"
        callback: save_result

Productivity Claw

telegram:
  enabled: true
  token: "YOUR_TOKEN_HERE"
  allowed_skills:
    - task_manager
    - email_checker
    - calendar
    - meeting_scheduler
  automations:
    morning_briefing:
      enabled: true
      time: "08:00"

Demo Prompts to Try

Once your bot is running, try these to see what it can do:

You: Search for "best practices for API design 2026"
Bot: ? Top results...

You: What's 15% of 2,450?
Bot: 367.5

You: Remind me to call mom in 3 hours
Bot: ✅ Reminder set: "Call mom" in 3 hours

You: [uploads a PDF] Summarize this
Bot: ? Summary: Q3 revenue $4.2M (+23% YoY)...

Inline Buttons and Interactive Features

Telegram bots can show buttons, making interactions much nicer than typing commands.

from telegram import InlineKeyboardButton, InlineKeyboardMarkup

keyboard = [
    [InlineKeyboardButton("✅ Yes", callback_data='yes'),
     InlineKeyboardButton("❌ No", callback_data='no')],
    [InlineKeyboardButton("? Try Again", callback_data='retry')]
]
reply_markup = InlineKeyboardMarkup(keyboard)
claw.send_message(chat_id=chat_id, text=text, reply_markup=reply_markup)

You can also build persistent custom keyboards with ReplyKeyboardMarkup so users tap actions instead of typing.

Security Considerations

Your Telegram bot is public by default — anyone who finds the username can message it. Lock it down:

Whitelist Users

telegram:
  security:
    whitelist_enabled: true
    allowed_users:
      - 12345678
      - 87654321
    unauthorized_message: "This claw is private."
? Tip:Get your Telegram user ID by sending /start to @userinfobot.

Rate Limit Per User

telegram:
  rate_limiting:
    enabled: true
    max_messages_per_minute: 10
    max_messages_per_hour: 100

Restrict Skills by User

telegram:
  users:
    12345678:
      allowed_skills: [all]
    87654321:
      allowed_skills: [web_search, calculator, weather]
    default:
      allowed_skills: [help]

Common Telegram Bot Issues (And Fixes)

Claw doesn’t respond to messages

  • Is OpenClaw running? pm2 status openclaw
  • Is the Telegram adapter enabled in logs?
  • Is the token correct in .env or telegram.yml?
  • Did you send /start first? Claws can’t see you until you do

Claw responds but messages are delayed

Polling interval too high. Set TELEGRAM_POLL_INTERVAL=1 or switch to webhooks.

Claw works in chat but not in groups

Claw privacy mode is on. Talk to BotFather → /mybots → your bot → Bot Settings → Group Privacy → Turn Off.

Inline buttons don’t work

Callback handlers aren’t configured. Add a callbacks section in telegram.yml mapping callback IDs to handlers.

The Honest Cost Comparison

Self-hosted OpenClaw on Telegram

  • Setup time: 10 minutes (actually)
  • Claw token: free
  • Hosting: $5–10/mo VPS
  • Maintenance: ~10 min/month
  • Total: ~$10/mo

PaioClaw alternative

  • Setup time: 2 minutes (paste bot token)
  • Hosting: included
  • Maintenance: zero
  • Multi-channel: Telegram + Slack + WhatsApp included
  • Total: $4/mo (or free tier for basic use)

For Telegram alone, self-hosting is reasonable — the setup is genuinely simple. But once you also want Slack, WhatsApp and Discord, the math flips. PaioClaw handles all of them for the same $4/mo.

When to Self-Host Telegram vs Use PaioClaw

Self-host if

  • You’re already running OpenClaw for other reasons
  • You need custom Telegram features (games, payments, etc.)
  • You’re building a public claw with thousands of users
  • You want complete control over data storage

Use PaioClaw if

  • You want Telegram + other channels (Slack, WhatsApp)
  • You don’t want to manage webhooks, SSL, or polling loops
  • You value your time more than $4/month
  • You need it working in 2 minutes, not 10

The Bottom Line

Setting up OpenClaw on Telegram is genuinely fast. BotFather makes claw creation trivial. Polling mode means no webhook complexity. Telegram’s API is generous and well-documented.

If you followed this guide, you now have a working Telegram AI agent in about 10 minutes of actual work.

Whether you stick with self-hosted or upgrade to PaioClaw depends on what else you need. For Telegram alone, self-hosting works great. For multi-channel AI that just works everywhere, PaioClaw removes all the setup and maintenance.

Join Our Community

Connect with other PaioClaw users, share tips, and stay up to date.