AACFlow

Telegram

Telegram is a secure, cloud-based messaging platform that enables fast and reliable communication across devices. With its powerful Bot API, Telegram provides a robust framework for automated messaging and integration.

With the Telegram integration in AACFlow.io, you can:

  • Send messages: Send text messages to Telegram chats, groups, or channels
  • Delete messages: Remove previously sent messages from a chat
  • Send photos: Share images with optional captions
  • Send videos: Share video files with optional captions
  • Send audio: Share audio files with optional captions
  • Send animations: Share GIF animations with optional captions
  • Send documents: Share files of any type with optional captions

In AACFlow.io, the Telegram integration enables your agents to send messages and rich media to Telegram chats as part of automated workflows. This is ideal for automated notifications, alerts, content distribution, and interactive bot experiences.

Learn how to create a webhook trigger in AACFlow.io that seamlessly initiates workflows from Telegram messages. This tutorial walks you through setting up a webhook, configuring it with Telegram's bot API, and triggering automated actions in real-time.

Learn how to use the Telegram Tool in AACFlow.io to seamlessly automate message delivery to any Telegram group. This tutorial walks you through integrating the tool into your workflow, configuring group messaging, and triggering automated updates in real-time.

Usage Instructions

Integrate Telegram into the workflow. Send, edit, forward, copy, pin, and delete messages; send media, locations, contacts, and polls; react to messages; show chat actions; and look up chat and member info. Can be used in trigger mode to start a workflow when a message is sent to a chat.

Actions

telegram_message

Send messages to Telegram channels or users through the Telegram Bot API. Enables direct communication and notifications with message tracking and chat confirmation.

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
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 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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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 is a block that starts a workflow when an event happens in this service.

Telegram Webhook

Trigger workflow from Telegram bot messages and events

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

On this page