Telegram

Full-featured Telegram Bot API integration with DMs, groups, channels, inline buttons, polls, reactions, and native streaming support.

Telegram is OpenClaw's flagship channel integration and the most popular way users interact with their AI agents. Built on the grammY framework talking to Telegram's Bot API, it supports the full spectrum of messaging features — text, images, audio, video, files, inline buttons, polls, reactions, stickers, and location sharing. OpenClaw uses Telegram's edit-in-place mechanism to deliver streaming responses, so you see the agent's reply being composed in real time rather than waiting for a complete response. The setup is remarkably simple: create a bot via @BotFather, paste the token into your OpenClaw config, and start the gateway. Long polling is the default transport (no public URL needed), with optional webhook mode for high-traffic deployments. Telegram's pairing system lets you securely approve new users before they can interact with your agent, and granular group policies control exactly who can trigger the bot in group chats. Telegram shines for personal AI assistant workflows. Its notification system is reliable across all platforms, messages support rich formatting (bold, italic, code blocks, links), and the inline button system enables interactive menus and confirmations. Forum/topic support means you can run different agent sessions in different topics within a single supergroup. The multi-account feature lets you run several Telegram bots from a single OpenClaw instance — useful for separating personal and work agents, or running different agent personalities. Combined with OpenClaw's native command menus and block streaming, Telegram delivers the most complete and polished channel experience in the OpenClaw ecosystem.

Tags: messaging, bot-api, popular, full-featured

Category: Messaging

Use Cases

  • Personal AI assistant accessible from any device via Telegram
  • Morning briefing bot that sends daily summaries, weather, and calendar
  • Team knowledge base bot in a Telegram group with mention-gated access
  • Automated notification channel for server monitoring and alerts
  • Multi-agent setup with different bots for different tasks (coding, research, scheduling)
  • Client-facing support bot with pairing-based access control

Tips

  • Use long polling (default) for simplicity — no public URL needed
  • Set dmPolicy to 'allowlist' with explicit numeric user IDs for production bots
  • Enable /setjoingroups OFF in BotFather to prevent unauthorized group additions
  • Use Forum/Topic mode in supergroups for separate agent sessions per topic
  • Run 'openclaw logs --follow' to see incoming message IDs for debugging
  • Use multi-account to separate personal and work bots on the same OpenClaw instance
  • Set requireMention: true in groups to avoid the bot responding to every message
  • Block streaming gives cleaner output for long responses — enable it in config

Known Issues & Gotchas

  • Privacy Mode is ON by default — your bot won't see group messages unless you disable it via /setprivacy or make the bot a group admin
  • After toggling Privacy Mode, you must remove and re-add the bot to each group for the change to take effect
  • Bot tokens look like '123456:ABC...' — if you only paste the numeric part, auth will fail silently
  • Telegram user IDs are numeric, not @usernames — use /getidsbot or check logs to find yours
  • Pairing codes expire after 1 hour — don't wait too long to approve
  • Group chat IDs are negative numbers (e.g. -1001234567890) — don't put these in allowFrom
  • Webhook mode requires a public HTTPS URL — use long polling (default) if you don't have one
  • The bot can't initiate conversations — users must message it first

Alternatives

  • Discord
  • WhatsApp
  • Slack
  • Signal

Community Feedback

Telegram is hands down the best platform for OpenClaw. The streaming responses via edit-in-place feel magical — like you're watching GPT think in real time.

— Reddit r/openclaw

I made a Telegram bot that sets up OpenClaw for me in 5 min. The Bot API is so clean compared to Discord's permission nightmare.

— Reddit r/AI_Agents

Been running OpenClaw on Telegram for 6 months now. Rock solid. The pairing system is smart — no one can talk to my bot without my approval.

— Reddit r/selfhosted

The only downside of Telegram is that markdown tables don't render natively. But OpenClaw handles it well by converting to text.

— Reddit r/openclaw

From Chat App to AI Powerhouse — Telegram + OpenClaw is the easiest on-ramp to a personal AI assistant that actually does things.

— Faun.pub

Frequently Asked Questions

How do I find my Telegram user ID for the allowlist?

DM your bot and run 'openclaw logs --follow' to see the from.id field. Alternatively, use @userinfobot or @getidsbot in Telegram, or call the Bot API getUpdates endpoint directly.

Can I use my personal Telegram account instead of a bot?

No. OpenClaw uses the Telegram Bot API which requires a bot token from @BotFather. You cannot connect a personal Telegram account directly. The bot acts as your agent's identity on Telegram.

Why doesn't my bot see messages in group chats?

Telegram bots have Privacy Mode enabled by default, which means they only see messages that mention them or are replies to their messages. Disable Privacy Mode via /setprivacy in @BotFather, then remove and re-add the bot to each group.

Does Telegram support streaming responses?

Yes. OpenClaw uses Telegram's edit-in-place mechanism to stream responses in real time. You see the message being composed token by token, similar to ChatGPT's interface. Block streaming is also available for cleaner output.

Can I run multiple Telegram bots on one OpenClaw instance?

Yes. Use the multi-account feature under channels.telegram.accounts to configure additional bots with their own tokens, policies, and allowlists. Each account operates independently.

Do I need a public URL or server for Telegram?

No. The default transport is long polling, which works behind NAT/firewalls without any public URL. Webhook mode is optional and only needed for high-traffic scenarios.

How do I handle rate limits on Telegram?

Telegram allows roughly 30 messages per second per bot. OpenClaw handles chunking and rate limiting automatically. For very active group bots, consider using webhook mode for better throughput.

Configuration Examples

Basic personal bot

channels:
  telegram:
    enabled: true
    botToken: "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
    dmPolicy: pairing

Locked-down allowlist

channels:
  telegram:
    enabled: true
    botToken: "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
    dmPolicy: allowlist
    allowFrom:
      - "87340628"
      - "74512345"
    groupPolicy: open
    groups:
      "*":
        requireMention: true

Multi-account setup

channels:
  telegram:
    enabled: true
    botToken: "123456:ABC-personal-token"
    dmPolicy: pairing
    accounts:
      work:
        botToken: "789012:ABC-work-token"
        dmPolicy: allowlist
        allowFrom:
          - "87340628"

Installation

Built-in (bundled with OpenClaw)