Telegram Integration
Give your agents the ability to message users on Telegram — plain text, inline keyboards with tappable buttons, PDFs, images, polls, and location pins. Telegram’s global reach (strong in Eastern Europe, Central Asia, parts of LATAM) makes it the right complement to WhatsApp for international voice workflows: end a call, then message the caller via whichever channel they actually use.Connecting Telegram
Telegram doesn’t use traditional OAuth for bots. thinnestAI connects via your bot token — a one-time secret you get from Telegram’s @BotFather. Composio brokers the token storage so you don’t manage it in env vars.Step 1: Create your bot with BotFather
- Open Telegram and search for @BotFather.
- Send
/newbotand follow the prompts to pick a bot name (display name) and a username (must end inbot). - BotFather returns a token that looks like
1234567890:ABCdefGHIjklMNOpqrsTUVwxyz. - Copy the token — you’ll only see it once.
Keep the token secret. Anyone with the token can control the bot. Don’t paste it into Slack / email / a shared doc. The token goes directly from the BotFather chat into thinnestAI’s secure token store.
Step 2: Connect via the config modal
- Navigate to Agents and select your agent.
- Open the Tools section and click Add Tool.
- Select Telegram.
- Paste the Bot Token from BotFather.
- Click Connect Telegram.
getMe endpoint and shows a green Connected badge with the bot’s username.
Step 3: Choose Allowed Actions
Four capability toggles control which action groups the agent can invoke:| Toggle | Default | What it unlocks |
|---|---|---|
| Send Messages | ✅ On | Plain text and messages with inline keyboards |
| Media & Files | ✅ On | Photos, documents, audio, video |
| Rich Content | ✅ On | Locations, contacts, polls, venues |
| Chat Admin | Off | Pin messages, set chat title/description, manage members |
Available Actions
Messaging (4)
| Action | Description |
|---|---|
| Send Message | Plain text message to a user or group chat by chat_id |
| Send Inline Keyboard | Message with tappable reply buttons |
| Edit Message | Update a previously-sent message’s text or keyboard |
| Delete Message | Remove a message the bot sent |
Media (4)
| Action | Description |
|---|---|
| Send Photo | Send an image by URL or file upload |
| Send Document | Send a PDF / DOC / XLSX / other file |
| Send Audio | Send an MP3 / OGG / voice note |
| Send Video | Send an MP4 video (≤50 MB) |
Rich Content (4)
| Action | Description |
|---|---|
| Send Location | Share a GPS pin |
| Send Contact | Share a contact card (name + phone) |
| Send Poll | Create a single-answer or multi-answer poll |
| Send Venue | Send a named location (e.g. “Taj Mahal”) with GPS |
Admin (3) — opt-in
| Action | Description |
|---|---|
| Pin Message | Pin an important message in a chat |
| Unpin Message | Remove a pinned message |
| Set Chat Title | Rename a group chat (agent must be admin) |
Voice-AI Use Cases
Telegram’s strengths — instant delivery, no per-message cost, global reach — make it ideal for lightweight post-call touches where WhatsApp’s template-message friction would slow you down.Post-Call Receipt / Transcript Share
International Reminder Flow
Poll for Scheduling
Example: International Scheduling Agent
Build a voice agent that handles multilingual inbound calls and follows up via Telegram for users outside WhatsApp-first markets.Agent Setup
| Field | Value |
|---|---|
| Name | Global Scheduler |
| Model | GPT-4o |
| Tools | Telegram, Google Calendar, WhatsApp |
Agent Instructions
Starting a Conversation
Unlike WhatsApp (which allows template-message cold outreach), Telegram bots can only message users who have started a chat with the bot first. The simplest flow:- During the call, give the caller the bot’s link:
t.me/yourbot - Ask them to tap Start inside Telegram — this reveals their
chat_idto your bot - thinnestAI captures the
chat_idvia webhook for future messages
chat_id is cached — no re-start needed.
Combining with Other Tools
| Combination | Use Case |
|---|---|
| Telegram + Voice | Post-call summary, transcript delivery, follow-up reminders |
| Telegram + Google Calendar | Inline-keyboard reschedule flows |
| Telegram + WhatsApp | Channel-of-choice routing by caller locale |
| Telegram + Google Sheets | Log every poll result for weekly analysis |
| Telegram + UPI/Payment | Send a payment link; poll for “Did you pay?” |
Security & Privacy
- Bot tokens are encrypted at rest. thinnestAI stores them via Composio and never logs the token value.
- Per-user scoping — Each user’s bot token is isolated. Your agent cannot send from another user’s bot.
- Revoke access — From BotFather, send
/revokeand pick the bot to invalidate the token. Then reconnect in the config modal with a fresh token. - Rate limits — Telegram enforces ~30 messages/sec to different users, 1 message/sec to a given chat. Agents that blast won’t succeed.
- No read receipts — Telegram doesn’t expose read status to bots. Don’t rely on “was it seen” unless you ask for a reply.
Troubleshooting
| Issue | Solution |
|---|---|
| ”Unauthorized” right after connect | Token was rejected by getMe. Double-check you pasted the full token from BotFather with no trailing whitespace. |
| ”chat_id not found” | The user hasn’t started a chat with the bot yet. Give them t.me/yourbot and ask them to tap Start. |
| Messages not arriving | Check if the user has blocked the bot, or if your bot hit the per-chat rate limit (1/sec). |
| ”Bad Request: message too long” | Telegram caps at 4096 chars. Break long summaries into multiple messages or send as a document. |
| Inline keyboard taps don’t come through | You need a webhook configured. For button-driven flows, enable the Voice → Telegram post-call webhook in your agent settings. |
| Media upload fails | Telegram bot API caps at 50 MB for documents, 20 MB for photos. For larger files, host elsewhere and share a link. |
Next Steps
- Voice — Pair Telegram with outbound calling for full post-call workflows.
- WhatsApp — Primary channel for India / Brazil / SEA markets.
- Google Calendar — Build reschedule flows with inline-keyboard taps.

