# Telegram AI integration on Definable

> Telegram is a cloud-based messaging app with a focus on security and speed.

## What this connects

Telegram is a cloud-based messaging app with a focus on security and speed. Build bots to send messages, manage chats, and interact with users.

Vendor: https://telegram.org/

## Tools available

**18** tools available. First 12:

- `TELEGRAM_ANSWER_CALLBACK_QUERY` — Answer Callback Query — Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.
- `TELEGRAM_CREATE_CHAT_INVITE_LINK` — Export Chat Invite Link — Generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.
- `TELEGRAM_DELETE_MESSAGE` — Delete Message — Delete a message, including service messages. Limitations: cannot delete messages older than 48 hours in groups, forwarded messages, or content in protected chats (returns 400 'message can’t be deleted'). Bot must have delete/manage rights in the target chat; works reliably only on bot-authored messages in groups. Verify permissions via TELEGRAM_GET_CHAT or TELEGRAM_GET_CHAT_ADMINISTRATORS before calling. On flood control, Telegram returns HTTP 429 with a retry_after field; honor that backoff value.
- `TELEGRAM_EDIT_MESSAGE` — Edit Message — Edit text messages sent by the bot. Only bot-authored messages can be edited; editing messages from other users will fail. In groups, the bot must have edit permissions.
- `TELEGRAM_FORWARD_MESSAGE` — Forward Message — Forward messages of any kind. Service messages can't be forwarded.
- `TELEGRAM_GET_CHAT` — Get Chat Info — Get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). The bot must be a member of or have access to the target chat; calls fail if the bot was never added, was removed, or is blocked.
- `TELEGRAM_GET_CHAT_ADMINISTRATORS` — Get Chat Administrators — Get a list of administrators in a chat. On success, returns an Array of ChatMember objects containing information about all chat administrators except other bots. Only meaningful for supergroups and channels; private chats yield no useful data. The bot must be a member of the chat; if the bot has admin rights, its own entry will appear in the result, useful for verifying its permissions before moderation actions.
- `TELEGRAM_GET_CHAT_HISTORY` — Get Chat History — Get chat history messages via the getUpdates polling method, filtered by chat_id. Returns only updates from the specified chat. Bot can only retrieve messages sent after it joined the chat; missing older messages is expected. Requires no active webhook — a webhook causes HTTP 409 conflict; delete it before using this tool. Empty result arrays (ok=true) indicate no accessible messages, not a failure. Returned message dates are Unix timestamps in UTC seconds.
- `TELEGRAM_GET_CHAT_MEMBER` — Get Chat Member — Get a chat member's status/role (including the bot itself) to preflight permissions and troubleshoot 403/empty-history issues. Use before sending messages to verify bot membership and permissions.
- `TELEGRAM_GET_CHAT_MEMBERS_COUNT` — Get Chat Members Count — Get the number of members in a chat. The bot must be an administrator in the chat for this to work. Insufficient admin permissions surface as authorization errors, not as a zero or empty count.
- `TELEGRAM_GET_ME` — Get Bot Info — Get basic information about the bot using the Bot API getMe method. Returns fields like id, username, first_name, and capabilities. If the response returns ok=false, the bot token is invalid or revoked and must be replaced before any other API calls. Bot name, bio, and profile description are read-only via the Bot API; modify them via BotFather.
- `TELEGRAM_GET_UPDATES` — Get Updates — Use this method to receive incoming updates using long polling. An Array of Update objects is returned. IMPORTANT: This method will not work if an outgoing webhook is set up. Webhooks and getUpdates are mutually exclusive — call deleteWebhook first to switch modes (409 Conflict otherwise). Notes: - Only one method (webhook or polling) can be active at a time - Updates available for up to 24 hours if unclaimed - Recalculate offset after each response to avoid duplicates - Empty result array (ok=true) is valid, meaning no new updates - On HTTP 429, honor the retry_after value; keep polling to ~1 request/second - Only chats with updates since the bot joined or last offset appear in results - Update objects vary by type; always check update.message and update.message.text exist before accessing

## Auth

Auth schemes: `API_KEY`.

## How agents use Telegram

Inside a Definable workflow, Telegram is one of the tools the **Distributor specialist** can call. Example coordination patterns:

- **Researcher → Telegram** — the Researcher (GPT-5.5) pulls context from Telegram (records, threads, documents), synthesises findings, and briefs the rest of the team.
- **Writer → Distributor → Telegram** — the Writer (Claude Opus 4.7) drafts copy in brand voice, the Verifier passes it, then the Distributor writes the result into Telegram (create record, post message, draft email).
- **Designer / Engineer → Distributor → Telegram** — the Designer ships an asset or the Engineer ships a code change, the Distributor delivers it via Telegram (attach file, open PR comment, post status).

The Verifier checks every Telegram call. On rate limit, schema drift, or auth refresh it self-heals and retries — the workflow completes without manual intervention.

## Categories

- team chat — https://definable.ai/apps/category/team-chat/
- notifications — https://definable.ai/apps/category/notifications/

## Related

- HTML page: https://definable.ai/apps/telegram/
- Same category (team chat): https://definable.ai/apps/category/team-chat/
- All integrations: https://definable.ai/apps/
- Workflow (multi-agent loop): https://definable.ai/workflow/
- Apps llms.txt index: https://definable.ai/llms-apps.txt
