Telegram

Use Telegram's Bot API to send messages, photos, videos, audio, animations, documents, locations, contacts, or polls. Message actions also edit, forward, copy, pin, delete, and react; chat actions retrieve chat or member details and show status indicators.

Start workflows from Telegram messages

  1. Send /newbot to BotFather in Telegram and copy the bot token.
  2. Add a Telegram trigger to your workflow and enter Bot Token.
  3. Deploy the workflow. Sim registers the generated webhook URL with Telegram.
  4. Send a message to the bot and inspect the workflow run. The trigger returns message and sender data, including the source chat ID.

Telegram registers one webhook per bot. Registering it elsewhere redirects delivery, so use a separate bot when workflows need independent webhook destinations. See the Telegram bot tutorial.

The webhook setup video also demonstrates starting a run from an incoming message.

Send messages to a Telegram group

  1. Add the bot to the group and grant the permissions needed by the action.
  2. Obtain the group's numeric chat ID from a bot message update, such as the trigger's message.raw.chat.id. Group IDs can be negative.
  3. Add a Telegram action block, select Send Message, and set Bot Token, Chat ID, and Message.
  4. Run the workflow and verify the message in the group.

The group messaging video demonstrates the block configuration. Bot privacy settings affect which group messages Telegram delivers; receiving a command addressed to the bot can help verify the trigger before changing those settings.

Use the block

Send, edit, forward, copy, pin, or delete messages; send media, locations, contacts, and polls; set reactions and chat actions; and inspect chats and members. Bot messages and events can start workflows.

Actions

Telegram Send Message

Send a text message through the Telegram Bot API. Markdown is converted to Telegram HTML before sending; the response includes the sent message and recipient chat.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
textstringYesMessage text to send

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectTelegram message data
↳ message_idnumberUnique Telegram message identifier
↳ fromobjectSender information
↳ idnumberSender user ID
↳ is_botbooleanWhether the sender is a bot
↳ first_namestringSender first name
↳ usernamestringSender username, when available
↳ chatobjectRecipient chat information
↳ idnumberRecipient chat ID
↳ first_namestringChat first name, for private chats
↳ usernamestringChat username, when available
↳ typestringChat type: private, group, supergroup, or channel
↳ datenumberUnix timestamp when message was sent
↳ textstringText content of the sent message

Telegram Delete Message

Delete messages in Telegram channels or chats through the Telegram Bot API. Requires the message ID of the message to delete.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
messageIdstringYesTelegram message ID (numeric identifier of the message to delete)

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectDelete operation result
↳ okbooleanAPI response success status
↳ deletedbooleanWhether the message was successfully deleted

Telegram Send Photo

Send photos to Telegram channels or users through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
photostringYesPhoto to send. Pass a file_id or HTTP URL
captionstringNoPhoto caption (optional)

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectTelegram message data including optional photo(s)
↳ message_idnumberUnique Telegram message identifier
↳ fromobjectChat information
↳ idnumberChat ID
↳ is_botbooleanWhether the chat is a bot or not
↳ first_namestringChat username (if available)
↳ usernamestringChat title (for groups and channels)
↳ chatobjectInformation about the bot that sent the message
↳ idnumberBot user ID
↳ first_namestringBot first name
↳ usernamestringBot username
↳ typestringChat type (private, group, supergroup, channel)
↳ datenumberUnix timestamp when message was sent
↳ textstringText content of the sent message (if applicable)
↳ photoarrayList of photos included in the message
↳ file_idstringUnique file ID of the photo
↳ file_unique_idstringUnique identifier for this file across different bots
↳ file_sizenumberSize of the photo file in bytes
↳ widthnumberPhoto width in pixels
↳ heightnumberPhoto height in pixels

Telegram Send Video

Send videos to Telegram channels or users through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
videostringYesVideo to send. Pass a file_id or HTTP URL
captionstringNoVideo caption (optional)

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectTelegram message data including optional media
↳ message_idnumberUnique Telegram message identifier
↳ fromobjectInformation about the sender
↳ idnumberSender ID
↳ is_botbooleanWhether the chat is a bot or not
↳ first_namestringSender's first name (if available)
↳ usernamestringSender's username (if available)
↳ chatobjectInformation about the chat where message was sent
↳ idnumberChat ID
↳ first_namestringChat first name (if private chat)
↳ usernamestringChat username (for private or channels)
↳ typestringType of chat (private, group, supergroup, or channel)
↳ datenumberUnix timestamp when the message was sent
↳ textstringText content of the sent message (if applicable)
↳ formatobjectMedia format information (for videos, GIFs, etc.)
↳ file_namestringMedia file name
↳ mime_typestringMedia MIME type
↳ durationnumberDuration of media in seconds
↳ widthnumberMedia width in pixels
↳ heightnumberMedia height in pixels
↳ thumbnailobjectThumbnail image details
↳ file_idstringThumbnail file ID
↳ file_unique_idstringUnique thumbnail file identifier
↳ file_sizenumberThumbnail file size in bytes
↳ widthnumberThumbnail width in pixels
↳ heightnumberThumbnail height in pixels
↳ thumbobjectSecondary thumbnail details (duplicate of thumbnail)
↳ file_idstringThumbnail file ID
↳ file_unique_idstringUnique thumbnail file identifier
↳ file_sizenumberThumbnail file size in bytes
↳ widthnumberThumbnail width in pixels
↳ heightnumberThumbnail height in pixels
↳ file_idstringMedia file ID
↳ file_unique_idstringUnique media file identifier
↳ file_sizenumberSize of media file in bytes
↳ documentobjectDocument file details if the message contains a document
↳ file_namestringDocument file name
↳ mime_typestringDocument MIME type
↳ thumbnailobjectDocument thumbnail information
↳ file_idstringThumbnail file ID
↳ file_unique_idstringUnique thumbnail file identifier
↳ file_sizenumberThumbnail file size in bytes
↳ widthnumberThumbnail width in pixels
↳ heightnumberThumbnail height in pixels
↳ thumbobjectDuplicate thumbnail info (used for compatibility)
↳ file_idstringThumbnail file ID
↳ file_unique_idstringUnique thumbnail file identifier
↳ file_sizenumberThumbnail file size in bytes
↳ widthnumberThumbnail width in pixels
↳ heightnumberThumbnail height in pixels
↳ file_idstringDocument file ID
↳ file_unique_idstringUnique document file identifier
↳ file_sizenumberSize of document file in bytes

Telegram Send Audio

Send audio files to Telegram channels or users through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
audiostringYesAudio file to send. Pass a file_id or HTTP URL
captionstringNoAudio caption (optional)

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectTelegram message data including voice/audio information
↳ message_idnumberUnique Telegram message identifier
↳ fromobjectInformation about the sender
↳ idnumberSender ID
↳ is_botbooleanWhether the chat is a bot or not
↳ first_namestringSender's first name (if available)
↳ usernamestringSender's username (if available)
↳ chatobjectInformation about the chat where the message was sent
↳ idnumberChat ID
↳ first_namestringChat first name (if private chat)
↳ usernamestringChat username (for private or channels)
↳ typestringType of chat (private, group, supergroup, or channel)
↳ datenumberUnix timestamp when the message was sent
↳ textstringText content of the sent message (if applicable)
↳ audioobjectAudio file details
↳ durationnumberDuration of the audio in seconds
↳ performerstringPerformer of the audio
↳ titlestringTitle of the audio
↳ file_namestringOriginal filename of the audio
↳ mime_typestringMIME type of the audio file
↳ file_idstringUnique file identifier for this audio
↳ file_unique_idstringUnique identifier across different bots for this file
↳ file_sizenumberSize of the audio file in bytes

Telegram Send Animation

Send animations (GIFs) to Telegram channels or users through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
animationstringYesAnimation to send. Pass a file_id or HTTP URL
captionstringNoAnimation caption (optional)

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectTelegram message data including optional media
↳ message_idnumberUnique Telegram message identifier
↳ fromobjectInformation about the sender
↳ idnumberSender ID
↳ is_botbooleanWhether the chat is a bot or not
↳ first_namestringSender's first name (if available)
↳ usernamestringSender's username (if available)
↳ chatobjectInformation about the chat where message was sent
↳ idnumberChat ID
↳ first_namestringChat first name (if private chat)
↳ usernamestringChat username (for private or channels)
↳ typestringType of chat (private, group, supergroup, or channel)
↳ datenumberUnix timestamp when the message was sent
↳ textstringText content of the sent message (if applicable)
↳ formatobjectMedia format information (for videos, GIFs, etc.)
↳ file_namestringMedia file name
↳ mime_typestringMedia MIME type
↳ durationnumberDuration of media in seconds
↳ widthnumberMedia width in pixels
↳ heightnumberMedia height in pixels
↳ thumbnailobjectThumbnail image details
↳ file_idstringThumbnail file ID
↳ file_unique_idstringUnique thumbnail file identifier
↳ file_sizenumberThumbnail file size in bytes
↳ widthnumberThumbnail width in pixels
↳ heightnumberThumbnail height in pixels
↳ thumbobjectSecondary thumbnail details (duplicate of thumbnail)
↳ file_idstringThumbnail file ID
↳ file_unique_idstringUnique thumbnail file identifier
↳ file_sizenumberThumbnail file size in bytes
↳ widthnumberThumbnail width in pixels
↳ heightnumberThumbnail height in pixels
↳ file_idstringMedia file ID
↳ file_unique_idstringUnique media file identifier
↳ file_sizenumberSize of media file in bytes
↳ documentobjectDocument file details if the message contains a document
↳ file_namestringDocument file name
↳ mime_typestringDocument MIME type
↳ thumbnailobjectDocument thumbnail information
↳ file_idstringThumbnail file ID
↳ file_unique_idstringUnique thumbnail file identifier
↳ file_sizenumberThumbnail file size in bytes
↳ widthnumberThumbnail width in pixels
↳ heightnumberThumbnail height in pixels
↳ thumbobjectDuplicate thumbnail info (used for compatibility)
↳ file_idstringThumbnail file ID
↳ file_unique_idstringUnique thumbnail file identifier
↳ file_sizenumberThumbnail file size in bytes
↳ widthnumberThumbnail width in pixels
↳ heightnumberThumbnail height in pixels
↳ file_idstringDocument file ID
↳ file_unique_idstringUnique document file identifier
↳ file_sizenumberSize of document file in bytes

Telegram Send Document

Send documents (PDF, ZIP, DOC, etc.) to Telegram channels or users through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
filesfile[]NoDocument file to send (PDF, ZIP, DOC, etc.). Max size: 50MB
captionstringNoDocument caption (optional)

Output

ParameterTypeDescription
messagestringSuccess or error message
filesfile[]Files attached to the message
dataobjectTelegram message data including document
↳ message_idnumberUnique Telegram message identifier
↳ fromobjectInformation about the sender
↳ idnumberSender ID
↳ is_botbooleanWhether the chat is a bot or not
↳ first_namestringSender's first name (if available)
↳ usernamestringSender's username (if available)
↳ chatobjectInformation about the chat where message was sent
↳ idnumberChat ID
↳ first_namestringChat first name (if private chat)
↳ usernamestringChat username (for private or channels)
↳ typestringType of chat (private, group, supergroup, or channel)
↳ datenumberUnix timestamp when the message was sent
↳ documentobjectDocument file details
↳ file_namestringDocument file name
↳ mime_typestringDocument MIME type
↳ file_idstringDocument file ID
↳ file_unique_idstringUnique document file identifier
↳ file_sizenumberSize of document file in bytes

Telegram Edit Message Text

Edit the text of an existing message in a Telegram chat or channel through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
messageIdnumberYesIdentifier of the message to edit
textstringYesNew text of the message

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectEdited Telegram message data
↳ message_idnumberUnique Telegram message identifier
↳ datenumberUnix timestamp when message was sent
↳ textstringText content of the edited message

Telegram Forward Message

Forward a message from one Telegram chat to another through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesDestination chat ID (numeric, can be negative for groups)
fromChatIdstringYesSource chat ID the original message belongs to
messageIdnumberYesIdentifier of the message to forward in the source chat

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectForwarded Telegram message data
↳ message_idnumberIdentifier of the forwarded message
↳ datenumberUnix timestamp when message was sent
↳ textstringText content of the forwarded message

Telegram Copy Message

Copy a message to another Telegram chat without a forward header through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesDestination chat ID (numeric, can be negative for groups)
fromChatIdstringYesSource chat ID the original message belongs to
messageIdnumberYesIdentifier of the message to copy in the source chat
captionstringNoNew caption for the copied media (keeps the original if omitted)

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectCopied message identifier
↳ message_idnumberIdentifier of the new copied message

Telegram Send Location

Send a point on the map to a Telegram chat through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
latitudenumberYesLatitude of the location
longitudenumberYesLongitude of the location

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectTelegram message data for the sent location
↳ message_idnumberUnique Telegram message identifier
↳ datenumberUnix timestamp when message was sent

Telegram Send Contact

Send a phone contact to a Telegram chat through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
phoneNumberstringYesContact's phone number
firstNamestringYesContact's first name
lastNamestringNoContact's last name
vcardstringNoAdditional data about the contact in the form of a vCard

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectTelegram message data for the sent contact
↳ message_idnumberUnique Telegram message identifier
↳ datenumberUnix timestamp when message was sent

Telegram Send Poll

Send a native poll to a Telegram chat through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
questionstringYesPoll question (1-300 characters)
optionsjsonYesList of 2-10 answer options as text strings
isAnonymousbooleanNoWhether the poll needs to be anonymous (defaults to true)
allowsMultipleAnswersbooleanNoWhether the poll allows multiple answers

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectTelegram message data for the sent poll
↳ message_idnumberUnique Telegram message identifier
↳ datenumberUnix timestamp when message was sent

Telegram Pin Message

Pin a message in a Telegram chat through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
messageIdnumberYesIdentifier of the message to pin
disableNotificationbooleanNoPass true to pin silently without notifying chat members

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectPin operation result
↳ okbooleanAPI response success status
↳ resultbooleanWhether the message was pinned

Telegram Unpin Message

Unpin a pinned message in a Telegram chat through the Telegram Bot API. Unpins the most recent pinned message when no message ID is given.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
messageIdnumberNoIdentifier of the message to unpin (omit to unpin the most recent one)

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectUnpin operation result
↳ okbooleanAPI response success status
↳ resultbooleanWhether the message was unpinned

Telegram Set Message Reaction

Set or remove an emoji reaction on a message in a Telegram chat through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
messageIdnumberYesIdentifier of the target message
reactionstringNoEmoji to react with (leave empty to remove the reaction)
isBigbooleanNoPass true to show the reaction with a big animation

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectReaction operation result
↳ okbooleanAPI response success status
↳ resultbooleanWhether the reaction was set

Telegram Send Chat Action

Show a status action such as a typing indicator in a Telegram chat through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID (numeric, can be negative for groups)
actionstringYesType of action to broadcast (e.g. typing, upload_photo, record_video, upload_document, find_location)

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectChat action result
↳ okbooleanAPI response success status
↳ resultbooleanWhether the action was broadcast

Telegram Get Chat

Get up-to-date information about a Telegram chat through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID or @username (numeric, can be negative for groups)

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectTelegram chat information
↳ idnumberUnique chat identifier
↳ typestringChat type (private, group, supergroup, channel)
↳ titlestringChat title for groups and channels
↳ usernamestringChat username, if available
↳ first_namestringFirst name for private chats
↳ last_namestringLast name for private chats
↳ descriptionstringChat description
↳ biostringBio of the other party in a private chat
↳ invite_linkstringPrimary invite link for the chat
↳ linked_chat_idnumberLinked discussion or channel chat ID

Telegram Get Chat Member

Get information about a member of a Telegram chat through the Telegram Bot API.

Inputs and outputs

Input

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot API Token
chatIdstringYesTelegram chat ID or @username (numeric, can be negative for groups)
userIdnumberYesUnique identifier of the target user

Output

ParameterTypeDescription
messagestringSuccess or error message
dataobjectTelegram chat member information
↳ statusstringMember's status (creator, administrator, member, restricted, left, kicked)
↳ userobjectInformation about the user
↳ idnumberUnique user identifier
↳ is_botbooleanWhether the user is a bot
↳ first_namestringUser's first name
↳ last_namestringUser's last name
↳ usernamestringUser's username

Triggers

A trigger starts a workflow when a supported event occurs in this service.

Telegram Webhook

Trigger workflow from Telegram bot messages and events

Configuration and outputs

Configuration

ParameterTypeRequiredDescription
botTokenstringYesYour Telegram Bot Token from BotFather

Output

ParameterTypeDescription
messageobjectTelegram message data
↳ idnumberTelegram message ID
↳ textstringMessage text content (if present)
↳ datenumberDate the message was sent (Unix timestamp)
↳ messageTypestringDetected content type: text, photo, document, audio, video, voice, sticker, location, contact, poll
↳ rawobjectRaw Telegram message object
↳ message_idnumberOriginal Telegram message_id
↳ datenumberOriginal Telegram message date (Unix timestamp)
↳ textstringOriginal Telegram text (if present)
↳ captionstringOriginal Telegram caption (if present)
↳ chatobjectChat information
↳ idnumberChat identifier
↳ usernamestringChat username (if available)
↳ first_namestringFirst name (for private chats)
↳ last_namestringLast name (for private chats)
↳ titlestringChat title (for groups/channels)
↳ fromobjectSender information
↳ idnumberSender user ID
↳ is_botbooleanWhether the sender is a bot
↳ first_namestringSender first name
↳ last_namestringSender last name
↳ usernamestringSender username
↳ language_codestringSender language code (if available)
↳ reply_to_messageobjectOriginal message being replied to
↳ entitiesarrayMessage entities (mentions, hashtags, URLs, etc.)
senderobjectSender information
↳ idnumberSender user ID
↳ usernamestringSender username (if available)
↳ firstNamestringSender first name
↳ lastNamestringSender last name
↳ languageCodestringSender language code (if available)
↳ isBotbooleanWhether the sender is a bot
updateIdnumberUpdate ID for this webhook delivery
updateTypestringType of update: message, edited_message, channel_post, edited_channel_post, unknown