Telegram integration hub
How to use AI tools with Telegram: native OpenClaw support vs a custom bot.
Comparison
Choose an approach based on whether you want one local gateway (OpenClaw) or a minimal custom bot (Claude/OpenAI API).
| Approach | When to use | Playground |
|---|---|---|
| OpenClaw | One gateway for Telegram (and WhatsApp, Discord, etc.); everything local; one config | playgrounds/openclaw-telegram/ |
| Custom bot | Minimal logic: Telegram → Claude or OpenAI API → reply; you own the code | playgrounds/telegram-ai-bot/ |
OpenClaw (native)
-
OpenClaw supports Telegram and other channels out of the box. All processing runs on your machine; no cloud required.
-
Setup — Follow OpenClaw Telegram setup or our OpenClaw tool page. Roughly 15 minutes with Node.js 22+ and an API key.
-
Playground —
playgrounds/openclaw-telegram/has minimal config and one custom skill example.
Custom bot (skeleton)
-
Stack — Python 3.10+ with
python-telegram-bot; message in → Claude (or OpenAI) API → reply in Telegram. Optional: file handling, SQLite for conversation persistence. -
Security — Use env vars for API keys. Add rate limiting and optional user whitelist for production.
-
Playground —
playgrounds/telegram-ai-bot/is the canonical skeleton. See its README for one-command run after settingTELEGRAM_BOT_TOKENandANTHROPIC_API_KEY.
Links
- OpenClaw + Telegram →
playgrounds/openclaw-telegram/ - Claude API + Telegram →
playgrounds/telegram-ai-bot/