Skip to main content
Telegram logo
  • Category: team chat
  • Auth: API_KEY
  • Composio-managed OAuth available? N/A
  • Tools: 18
  • Triggers: 0
  • Slug: TELEGRAM
  • Version: 20261101_00

Tools

Slug: TELEGRAM_ANSWER_CALLBACK_QUERYUse 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.

Input Parameters

string
URL that will be opened by the user’s client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game – note that this will only work if the query comes from a callback_game button.
string
Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters
integer
The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.
boolean
If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.
string
required
Unique identifier for the query to be answered Must be answered promptly after receipt; the ID expires quickly and delayed responses leave users with stuck spinners in the UI.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_DELETE_MESSAGEDelete a message, including eligible service messages. Telegram imposes time and message-type restrictions; deletion rights depend on the chat and message, and administrators with appropriate rights can delete other users’ messages.

Input Parameters

string
required
Unique identifier for the target chat or username of the target channel In linked channel/discussion group pairs, deleting in one does not remove the corresponding post in the other — issue separate deletion calls with the correct chat_id for each target.
integer
required
Identifier of the message to delete

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_EDIT_MESSAGEEdit the text of a message identified by chat and message ID or inline message ID. Telegram’s editing permissions and message restrictions apply.

Input Parameters

string
required
New text of the message, 1-4096 characters after entities parsing
string
Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel
integer
Required if inline_message_id is not specified. Identifier of the message to edit
string
Mode for parsing entities in the message text. Options: ‘Markdown’, ‘MarkdownV2’, ‘HTML’
string
JSON-serialized object for an inline keyboard
string
Required if chat_id and message_id are not specified. Identifier of the inline message
boolean
Disables link previews for links in this message

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_FORWARD_MESSAGEForward a message from one chat to another. Service messages and messages with protected content cannot be forwarded.

Input Parameters

string
required
Unique identifier for the target chat or username of the target channel
integer
required
Message identifier in the chat specified in from_chat_id
string
required
Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
boolean
Sends the message silently. Users will receive a notification with no sound.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_GET_CHATGet 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.

Input Parameters

string
required
Unique identifier for the target chat or username of the target supergroup or channel Numeric IDs for groups and channels are negative integers. Username must start with ’@’; plain names without ’@’, full URLs, or free text will not resolve. Use TELEGRAM_GET_UPDATES to obtain reliable chat_id values.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_GET_CHAT_ADMINISTRATORSGet a list of chat administrators, excluding other bots. On success, returns ChatMember objects, including the bot itself if it is an administrator.

Input Parameters

string
required
Unique identifier for the target chat or username of the target supergroup or channel

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_GET_CHAT_HISTORYPoll pending bot updates and filter the returned batch by chat ID or username; this is not complete chat history, and an empty filtered batch does not establish that the chat has no accessible messages. Polling requires no active webhook, and advancing the offset confirms earlier updates across chats.

Input Parameters

integer
Limits the number of messages to be retrieved. Values between 1-100 are accepted. Defaults to 100. To paginate beyond 100 messages, use coordinated offset or message_id values across sequential calls.
integer
Sequential number of the first message to be returned; negative values are allowed. Default is 0.
string
required
Unique identifier for the target chat or username of the target supergroup or channel. Results are filtered to only include updates from this specific chat.
integer
Identifier of a message in the chat as a starting point for getting history. If not specified, returns recent messages.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_GET_CHAT_MEMBERGet 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.

Input Parameters

string
required
Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
integer
required
Unique identifier of the target user

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_GET_CHAT_MEMBERS_COUNTGet 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.

Input Parameters

string
required
Unique identifier for the target chat or username of the target supergroup or channel Usernames must be prefixed with ’@’; plain chat names without ’@’ are invalid.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_GET_MEGet basic information about the bot using the Bot API getMe method, including its ID, name, username and available capability flags.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_GET_UPDATESReceive incoming bot updates using long polling; an outgoing webhook must be removed first, and offsets confirm earlier updates. Returned updates expose message, edited message, channel post, edited channel post and callback query fields, with limited message details.

Input Parameters

integer
Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100
integer
Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates
integer
Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only
array
A JSON-serialized list of the update types you want your bot to receive. Specify an empty list to receive all update types except chat_member

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_SEND_DOCUMENTSend a general file to a Telegram chat using the Bot API. Telegram currently supports sending documents by URL only for PDF and ZIP files.

Input Parameters

string
Document caption (may also be used when resending documents by file_id), 0-1024 characters after entities parsing
string
required
Unique identifier for the target chat or username of the target channel
string
required
File to send. Pass a file_id as String to send a file that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new file using multipart/form-data. More info on Sending Files: https://core.telegram.org/bots/api#sending-files
string
Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side
string
Mode for parsing entities in the document caption. Options: ‘Markdown’, ‘MarkdownV2’, ‘HTML’
string
JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user
integer
If the message is a reply, ID of the original message
boolean
Sends the message silently. Users will receive a notification with no sound.
boolean
Disables automatic server-side content type detection for files uploaded using multipart/form-data

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_SEND_LOCATIONSend point on the map location to a Telegram chat using the Bot API.

Input Parameters

string
required
Unique identifier for the target chat or username of the target channel
integer
For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
number
required
Latitude of the location
number
required
Longitude of the location
integer
Period in seconds for which the location will be updated (see Live Locations), should be between 60 and 86400
string
JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user
number
The radius of uncertainty for the location, measured in meters; 0-1500
integer
If the message is a reply, ID of the original message
boolean
Sends the message silently. Users will receive a notification with no sound.
integer
For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_SEND_MESSAGESend a text message to a Telegram chat using the Bot API. Sending is subject to Telegram’s chat permissions and flood controls.

Input Parameters

string
required
Text of the message to be sent, 1-4096 characters after entities parsing Content exceeding 4096 characters must be split across multiple calls.
string
required
Unique identifier for the target chat or username of the target channel (in the format @channelusername) Bots cannot initiate private chats with users who haven’t messaged the bot first, and cannot message other bots. Verify accessibility via TELEGRAM_GET_UPDATES or TELEGRAM_GET_CHAT before sending.
string ("Markdown" | "MarkdownV2" | "HTML")
Mode for parsing entities in the message text. Accepted values: ‘MarkdownV2’, ‘Markdown’, ‘HTML’. All special characters must be properly escaped; unescaped or unmatched characters return 400 ‘can’t parse entities’. Use plain text (omit parse_mode) if parsing fails.
string
JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
integer
If the message is a reply, ID of the original message
boolean
Sends the message silently. Users will receive a notification with no sound.
boolean
Disables link previews for links in this message

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_SEND_PHOTOSend a photo to a Telegram chat using the Bot API. Each call sends one photo rather than an album.

Input Parameters

string
required
Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data URL must be a publicly reachable HTTPS URL (no authentication, no expiring/signed links); non-reachable URLs return 400 ‘failed to get HTTP URL content’. Base64-encoded data and inline bytes are not accepted — extract a public URL from image-generating tools instead.
string
Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing
string
required
Unique identifier for the target chat or username of the target channel Derive from TELEGRAM_GET_CHAT or TELEGRAM_GET_UPDATES; unverified IDs return 400 ‘chat not found’.
string
Mode for parsing entities in the photo caption. Options: ‘Markdown’, ‘MarkdownV2’, ‘HTML’ Unmatched or unescaped special characters (e.g., *, _) trigger 400 ‘can’t parse entities’ — escape all special characters before sending.
string
JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user
integer
If the message is a reply, ID of the original message
boolean
Sends the message silently. Users will receive a notification with no sound.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_SEND_POLLSend a native poll to a Telegram chat using the Bot API, with a question and answer options. On success, Telegram returns the sent message containing the poll.

Input Parameters

string ("regular" | "quiz")
Poll type, defaults to ‘regular’.
string
required
Unique identifier for the target chat or username of the target channel
array
required
A list of answer options, 2-10 strings 1-100 characters each
string
required
Poll question, 1-300 characters
boolean
Pass True, if the poll needs to be immediately closed. This can be useful for poll preview.
integer
Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future. Can’t be used together with open_period.
string
Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters with at most 2 line feeds after entities parsing
integer
Amount of time in seconds the poll will be active after creation, 5-600. Can’t be used together with close_date.
boolean
True, if the poll needs to be anonymous, defaults to True
string
JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user
integer
0-based identifier of the correct answer option, required for polls in quiz mode
integer
If the message is a reply, ID of the original message
boolean
Sends the message silently. Users will receive a notification with no sound.
string ("Markdown" | "MarkdownV2" | "HTML")
Mode for parsing entities in the explanation.
boolean
True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: TELEGRAM_SET_MY_COMMANDSUse this method to change the list of the bot’s commands. See https://core.telegram.org/bots#commands for more details about bot commands.

Input Parameters

string
JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault. Scoped commands override the global default only for matching users/chats; omitting scope sets the global list.
array
required
A list of bot commands to be set as the list of the bot’s commands. At most 100 commands can be specified. Each command name must be 1–32 characters (lowercase letters and underscores only); each command description must be 1–256 characters.
string
A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not