Skip to Content
ResourcesIntegrationsSocial & CommunicationTelegram

Telegram

Service domainMESSAGING
Telegram icon
Arcade Optimized

Arcade.dev LLM tools for Telegram

Author:Arcade
Version:1.1.2
Auth:No authentication required
7tools
7require secrets

Arcade's Telegram toolkit lets bots send messages, poll for replies, stream audio, and inspect chats via the Telegram Bot API. It is designed for LLM-driven workflows where an agent needs to interact with users over Telegram in real time.

Capabilities

  • Chat & bot introspection — retrieve metadata (type, title, description, member count) for any chat the bot has joined, and fetch the bot's own identity and capabilities.
  • Messaging — send text messages to private chats, groups, or channels; attach inline buttons to prompt structured user choices and receive the selected option automatically.
  • Polling for input — long-poll for new private-chat messages or inline-button taps, with cursor-based (next_offset) resumption after timeouts; handles backlog-skipping on first call.
  • Audio / TTS — convert text to speech via OpenAI TTS and deliver the MP3 as a Telegram audio message.
  • Update management — fetch unacknowledged private-chat updates with offset-based acknowledgment; has_more and next_offset cursors give fine-grained control over the update stream.

Note: All polling tools (GetMessages, WaitForNewMessage, WaitForButtonPress) are incompatible with an active Telegram webhook; getUpdates and webhooks are mutually exclusive.

Secrets

This toolkit requires no OAuth flow — all credentials are supplied as secrets.

  • TELEGRAM_BOT_TOKEN — The HTTP API token that authenticates your bot with Telegram. Obtain it by messaging @BotFather on Telegram, using the /newbot command (or /token for an existing bot), and copying the token it returns. The token is in the form 123456789:AAF…. Keep it private; anyone with it can send and receive messages as your bot. See Telegram's bot documentation for full instructions.

  • OPENAI_API_KEY — An OpenAI API key used to call the TTS endpoint (Telegram.SendTtsAudio). Create one in the OpenAI Platform dashboard under API keys → Create new secret key. The key requires access to the tts-1 (or tts-1-hd) audio models; a paid-tier account is needed because free-tier keys do not have audio model access. Store only the key value shown at creation time — OpenAI does not display it again.

For guidance on registering secrets with Arcade, see Create Tool Secrets. You can manage your secrets at https://api.arcade.dev/dashboard/auth/secrets.

Available tools(7)

7 of 7 tools
Operations
Behavior
Tool nameDescriptionSecrets
Get metadata about a Telegram chat, group, or channel. Returns information including the chat type, title, description, and member count. The bot must be a member of the chat to retrieve its information.
1
Get recent private-chat messages sent to the bot via Telegram's getUpdates API. Returns messages from private (1:1) chats only. Group and channel messages are excluded for security — any group member could inject content into the response. Only pending (unacknowledged) updates are returned. The limit parameter controls how many raw Telegram updates are fetched, not how many messages are returned. After filtering to private-chat messages for the requested chat_id, the result may contain fewer items. has_more indicates whether more updates exist on the server, not whether more messages exist for this chat. Note: This retrieves updates delivered to the bot, not the full history of a chat. Passing a non-zero offset permanently confirms all earlier updates — they cannot be retrieved again. Returns newest messages last.
1
Send a text message to a Telegram chat, group, or channel. The bot must be a member of the target chat or have permission to send messages to the specified channel. When the message asks the recipient a question, prefer attaching the possible answers as inline `buttons` rather than asking in free text. With buttons and wait_for_response (the default), this call waits for the user to tap one and returns it as `selected_option` — the toolkit collapses the keyboard to the choice automatically, so you do not react to the tap yourself. If no tap arrives in the wait window, `timed_out` is true and `next_offset` lets you resume waiting without re-sending. Reserve a plain (button-less) message for statements or genuinely open-ended questions.
1
Convert text to speech using OpenAI TTS and send it as an audio message on Telegram. Generates an MP3 audio file from the provided text using OpenAI's text-to-speech API, then sends it to the specified Telegram chat.
2
Resume waiting for an inline-button tap on a message that was already sent with buttons. Use this only to keep waiting after an earlier attempt's wait window elapsed without a tap — it does NOT send anything. It is a bounded long-poll on Telegram's getUpdates: it waits a short window for a tap on the given message, and when one happens the toolkit acknowledges it and collapses the keyboard to the chosen option (no agent round-trip), returning the choice as selected_option. If the window elapses with no tap, it returns timed_out=true with a next_offset cursor to resume from again. Cannot be used while the bot has an active webhook, because getUpdates and webhooks are mutually exclusive.
1
Wait for the next new message in a Telegram private chat, returning as soon as one arrives. This is a bounded long-poll built on Telegram's getUpdates: it waits up to timeout_seconds for a new message in the given chat. If one or more arrive, they are returned immediately with timed_out set to false. If the budget elapses with nothing, it returns an empty message list with timed_out set to true and a next_offset cursor, so you can call again with that next_offset to keep waiting. On the first call, leave offset at 0: the tool skips any already-pending backlog and waits for messages that arrive after the call begins. To read pending messages without waiting, retrieve the chat's recent messages instead. Returns messages from private (1:1) chats only — group and channel messages are excluded for security, since any group member could inject content. This tool cannot be used while the bot has an active webhook, because getUpdates and webhooks are mutually exclusive.
1
Get information about the Telegram bot. Returns the bot's identity including its ID, username, and capabilities.
1
Last updated on