Reference · Tools

Telegram

Interact with the Telegram Bot API to send messages, photos, videos, documents, manage chats, handle callbacks, and download files.

Action (binary) Communication v1 Binary data

The Telegram node drives a bot through the Bot API: sending messages and media, managing chats, handling callbacks and downloading files as binary. A typical build is a notification bot that posts alerts to a group and offers inline buttons to acknowledge them.

Node type
Action (binary)
Parameters
36
Outputs
Output, Error
Credentials
Telegram Bot API

Telegram

Send messages, media, and files via Telegram Bot API

Overview

The Telegram tool uses the Telegram Bot API to perform operations across four resource types: (1) message — send text, photos, videos, audio, documents, animations, stickers, locations, media groups, chat actions; edit and delete messages; pin/unpin messages; (2) chat — get chat info, get administrators, get member, leave, set description, set title; (3) callback — answer callback queries and inline queries from inline keyboards and inline bots; (4) file — download files by file_id with binary data output. Binary upload operations (sendPhoto, sendVideo, sendAudio, sendDocument, sendAnimation, sendSticker) use multipart form data. File downloads use the getFile API followed by binary retrieval from the Telegram file server.

Category: Communication
Tool Name: telegram
Version: 1

Appearance: Icon: si-telegram | Color: #0088CC

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Telegram Bot API credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Callbackcallback
Chatchat
Filefile
Messagemessage

Operations

OperationValueDescription
Answer Inline QueryanswerInlineQuerySend answer to callback query sent from inline bot
Answer QueryanswerQuerySend answer to callback query sent from inline keyboard
GetgetGet up to date information about a chat
Get AdministratorsadministratorsGet the administrators of a chat
Get MembermemberGet a member of a chat
LeaveleaveLeave a group, supergroup or channel
Set DescriptionsetDescriptionSet the description of a chat
Set TitlesetTitleSet the title of a chat
GetgetGet a file from Telegram (optionally download binary data)
Delete Chat MessagedeleteMessageDelete a chat message
Edit Message TexteditMessageTextEdit a text message
Pin Chat MessagepinChatMessagePin a chat message
Send AnimationsendAnimationSend an animated file
Send AudiosendAudioSend an audio file
Send Chat ActionsendChatActionSend a chat action
Send DocumentsendDocumentSend a document
Send LocationsendLocationSend a location
Send Media GroupsendMediaGroupSend group of photos or videos to album
Send MessagesendMessageSend a text message
Send PhotosendPhotoSend a photo
Send StickersendStickerSend a sticker
Send VideosendVideoSend a video
Unpin Chat MessageunpinChatMessageUnpin a chat message

answerInlineQuery and answerQuery belong to the Callback resource; administrators, member, leave, setDescription, setTitle and the first get belong to Chat; the second get is the only File operation; everything else belongs to Message.

Parameters

Callback: Answer Query

ParameterTypeRequiredDefaultDescription
Query IDstringYesUnique identifier for the query to be answered.

Callback: Answer Inline Query

ParameterTypeRequiredDefaultDescription
Query IDstringYesUnique identifier for the query to be answered.
ResultsstringYesA JSON-serialized array of results for the inline query.

Chat: Get

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel (in the format @channelusername). To find your chat ID ask @get_id_bot. Supports expressions.

Chat: Get Administrators

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.

Chat: Get Member

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
User IDstringYesUnique identifier of the target user.

Chat: Leave

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.

Chat: Set Description

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
DescriptionstringYesNew chat description, 0-255 characters.

Chat: Set Title

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
TitlestringYesNew chat title, 1-255 characters.

File: Get

ParameterTypeRequiredDefaultDescription
File IDstringYesThe ID of the file to get. Supports expressions.
DownloadbooleanNotrueWhether to download the file binary data.

Message: Send Message

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
TextstringYesText of the message to be sent. Supports expressions like {{ $json.body }}.

Message: Send Photo

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
Binary FilebooleanYesfalseWhether the data to upload should be taken from a binary field.
Input Binary FieldstringYesdataName of the binary property that contains the data to upload. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use. (shown when Binary File is true)
FilestringNoPass a file_id to send a file that exists on the Telegram servers, or an HTTP URL for Telegram to get the file from the Internet. (shown when Binary File is false)

Message: Send Video

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
Binary FilebooleanYesfalseWhether the data to upload should be taken from a binary field.
Input Binary FieldstringYesdataName of the binary property that contains the data to upload. (shown when Binary File is true)
FilestringNoPass a file_id or an HTTP URL instead of uploading. (shown when Binary File is false)

Message: Send Audio

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
Binary FilebooleanYesfalseWhether the data to upload should be taken from a binary field.
Input Binary FieldstringYesdataName of the binary property that contains the data to upload. (shown when Binary File is true)
FilestringNoPass a file_id or an HTTP URL instead of uploading. (shown when Binary File is false)

Message: Send Document

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
Binary FilebooleanYesfalseWhether the data to upload should be taken from a binary field.
Input Binary FieldstringYesdataName of the binary property that contains the data to upload. (shown when Binary File is true)
FilestringNoPass a file_id or an HTTP URL instead of uploading. (shown when Binary File is false)

Message: Send Animation

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
Binary FilebooleanYesfalseWhether the data to upload should be taken from a binary field.
Input Binary FieldstringYesdataName of the binary property that contains the data to upload. (shown when Binary File is true)
FilestringNoPass a file_id or an HTTP URL instead of uploading. (shown when Binary File is false)

Message: Send Sticker

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
Binary FilebooleanYesfalseWhether the data to upload should be taken from a binary field.
Input Binary FieldstringYesdataName of the binary property that contains the data to upload. (shown when Binary File is true)
FilestringNoPass a file_id or an HTTP URL instead of uploading. (shown when Binary File is false)

Message: Send Media Group

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
MediafixedCollectionNo{}The media to add. Add one entry per photo or video in the album.
— TypeoptionsNophotoThe type of the media to add.
Options: photo, video
— Media FilestringNoMedia to send. Pass a file_id or HTTP URL.
— Additional FieldscollectionNo{}Per-entry caption settings.
— — CaptionstringNoCaption text to set, 0-1024 characters.
— — Parse ModeoptionsNoHTMLHow to parse the text.
Options: Markdown (legacy), MarkdownV2, HTML

Message: Send Location

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
LatitudestringNoLocation latitude (-90 to 90). Supports expressions e.g. {{ $json.latitude }}
LongitudestringNoLocation longitude (-180 to 180). Supports expressions e.g. {{ $json.longitude }}

Message: Send Chat Action

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
ActionoptionsNotypingType of action to broadcast. Choose one, depending on what the user is about to receive.
Options: find_location, record_audio, record_video, record_video_note, typing, upload_audio, upload_document, upload_photo, upload_video, upload_video_note

Message: Edit Message Text

ParameterTypeRequiredDefaultDescription
Message TypeoptionsNomessageThe type of the message to edit.
Options: inlineMessage, message
Chat IDstringYesUnique identifier for the target chat. (shown when Message Type is message)
Message IDstringYesUnique identifier of the message to edit. (shown when Message Type is message)
Inline Message IDstringYesUnique identifier of the inline message to edit. (shown when Message Type is inlineMessage)
TextstringYesText of the message to be sent. Supports expressions.

Message: Delete Chat Message

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
Message IDstringYesUnique identifier of the message. Supports expressions.

Message: Pin Chat Message

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
Message IDstringYesUnique identifier of the message. Supports expressions.

Message: Unpin Chat Message

ParameterTypeRequiredDefaultDescription
Chat IDstringYesUnique identifier for the target chat or username of the target channel. Supports expressions.
Message IDstringYesUnique identifier of the message. Supports expressions.

Reply Markup

Reply Markup is offered on sendMessage, sendPhoto, sendVideo, sendAudio, sendDocument, sendAnimation, sendSticker, sendLocation and editMessageText. On editMessageText only none and inlineKeyboard are available; the other send operations offer the full list. Choosing a value reveals the matching keyboard definition below.

ParameterTypeRequiredDefaultDescription
Reply MarkupoptionsNononeAdditional interface options.
Options: forceReply, inlineKeyboard, none, replyKeyboard, replyKeyboardRemove
Force ReplycollectionNo{}Forces the user’s client to open a reply box. (shown when Reply Markup is forceReply)
— Force ReplybooleanNofalseWhether to show reply interface to the user.
— SelectivebooleanNofalseWhether to force reply from specific users only.
Inline KeyboardfixedCollectionNo{}Adds an inline keyboard that appears right next to the message it belongs to. (shown when Reply Markup is inlineKeyboard)
— RowfixedCollectionNo{}One keyboard row. Add a Row per line of buttons.
— — TextstringNoLabel text on the button.
— — Additional FieldscollectionNo{}What the button does when pressed.
— — — Callback DatastringNoData to be sent in a callback query to the bot when button is pressed, 1-64 bytes.
— — — PaybooleanNofalseWhether to send a Pay button.
— — — Switch Inline QuerystringNoIf set, pressing the button will prompt the user to select one of their chats.
— — — Switch Inline Query Current ChatstringNoIf set, pressing the button will insert the bot username and inline query in the current chat.
— — — URLstringNoHTTP or tg:// URL to be opened when button is pressed.
— — — Web AppcollectionNo{}Launch the Telegram Web App.
— — — — URLstringNoAn HTTPS URL of a Web App to be opened.
Reply KeyboardfixedCollectionNo{}Adds a custom keyboard with reply options. (shown when Reply Markup is replyKeyboard)
— RowfixedCollectionNo{}One keyboard row. Add a Row per line of buttons.
— — TextstringNoText of the button.
— — Additional FieldscollectionNo{}What the button sends when pressed.
— — — Request ContactbooleanNofalseWhether the user’s phone number will be sent as a contact when the button is pressed.
— — — Request LocationbooleanNofalseWhether the user’s current location will be sent when the button is pressed.
— — — Web AppcollectionNo{}Launch the Telegram Web App.
— — — — URLstringNoAn HTTPS URL of a Web App to be opened.
Reply Keyboard OptionscollectionNo{}Display options for the custom keyboard. (shown when Reply Markup is replyKeyboard)
— Resize KeyboardbooleanNofalseWhether to request clients to resize the keyboard vertically for optimal fit.
— One Time KeyboardbooleanNofalseWhether to request clients to hide the keyboard as soon as it’s been used.
— SelectivebooleanNofalseWhether to show the keyboard to specific users only.
Reply Keyboard RemovecollectionNo{}Removes a custom keyboard previously shown to the user. (shown when Reply Markup is replyKeyboardRemove)
— Remove KeyboardbooleanNofalseWhether to request clients to remove the custom keyboard.
— SelectivebooleanNofalseWhether to force reply from specific users only.

Additional Fields

One collection shared by editMessageText, pinChatMessage, every send* operation, both callback operations and fileget. Each sub-field is only offered for the operations noted against it.

ParameterTypeRequiredDefaultDescription
Additional FieldscollectionNo{}Optional Telegram Bot API fields for the selected operation.
— CaptionstringNoCaption text to set, 0-1024 characters. (shown when Operation is sendAnimation, sendAudio, sendDocument, sendPhoto, sendVideo)
— Cache TimestringNoThe maximum amount of time in seconds that the result of the callback query may be cached client-side. Supports expressions. (shown when Operation is answerQuery, answerInlineQuery)
— Disable NotificationbooleanNofalseWhether to send the message silently. Users will receive a notification with no sound. (hidden when Operation is editMessageText, answerQuery, answerInlineQuery)
— Disable WebPage PreviewbooleanNofalseWhether to disable link previews for links in this message. (shown when Operation is editMessageText, sendMessage)
— DurationstringNoDuration of clip in seconds. Supports expressions e.g. {{ $json.duration }} (shown when Operation is sendAnimation, sendAudio, sendVideo)
— File NamestringNoOverride the filename for binary uploads. (shown when Operation is sendAnimation, sendAudio, sendDocument, sendPhoto, sendVideo, sendSticker and Binary File is true)
— HeightstringNoHeight of the video. Supports expressions e.g. {{ $json.height }} (shown when Operation is sendAnimation, sendVideo)
— MIME TypestringNoThe MIME type of the file. If not specified, the MIME type will be determined by the file extension. (shown when Resource is file, Operation is get and Download is true)
— Parse ModeoptionsNoHTMLHow to parse the text. (shown when Operation is editMessageText, sendAnimation, sendAudio, sendMessage, sendPhoto, sendVideo, sendDocument)
Options: Markdown (legacy), MarkdownV2, HTML
— PerformerstringNoName of the performer. (shown when Operation is sendAudio)
— Reply To Message IDstringNoIf the message is a reply, ID of the original message. Supports expressions e.g. {{ $json.message_id }} (hidden when Operation is editMessageText, answerQuery, answerInlineQuery)
— Message Thread IDstringNoThe unique identifier of the forum topic. Supports expressions e.g. {{ $json.message_thread_id }} (shown when Operation is sendAnimation, sendAudio, sendChatAction, sendDocument, sendLocation, sendMediaGroup, sendMessage, sendPhoto, sendSticker, sendVideo)
— Show AlertbooleanNofalseWhether an alert will be shown by the client instead of a notification at the top of the chat screen. (shown when Operation is answerQuery, answerInlineQuery)
— TextstringNoText of the notification. If not specified, nothing will be shown to the user, 0-200 characters. (shown when Operation is answerQuery, answerInlineQuery)
— ThumbnailstringNoThumbnail of the file sent; can be ignored if thumbnail generation is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. (shown when Operation is sendAnimation, sendAudio, sendDocument, sendVideo)
— TitlestringNoTitle of the track. (shown when Operation is sendAudio)
— URLstringNoURL that will be opened by the user’s client. (shown when Operation is answerQuery, answerInlineQuery)
— WidthstringNoWidth of the video. Supports expressions e.g. {{ $json.width }} (shown when Operation is sendAnimation, sendVideo)

All Operations

ParameterTypeRequiredDefaultDescription
Bot TokenstringNoTelegram Bot API token from @BotFather.
Max ConcurrencynumberNo5Maximum number of items to process concurrently. Telegram limits 30 messages/second across all chats.

Output Data

One output item per input item — no operation fans out. The result object of the Telegram Bot API response is merged onto the top level of the item JSON; the rest of the item passes through unchanged.

  • Send operations — the created Message object lands on the item, so {{ $json.message_id }}, {{ $json.chat }} and {{ $json.date }} are available downstream.
  • Chat operationsget puts the Chat object on the item; member puts the ChatMember object on it; leave, setDescription and setTitle return a simple boolean result.
  • Get Administrators — Telegram answers with a list rather than an object, so the administrators arrive as numbered properties (0, 1, …) on the item rather than as a named array.
  • File: Get — the getFile response (including file_id, file_path and file_size) lands on the item. With Download on, the bytes are also fetched from the Telegram file server and attached as the data binary property, named after the remote file path and typed from its extension unless you override MIME Type. Existing binary properties on the item are preserved alongside it.

Usage Examples

  • Send a text message to a Telegram chat
  • Send a photo with caption to a Telegram channel
  • Upload a document to a Telegram group
  • Download a file from Telegram by file_id
  • Get chat administrators
  • Answer an inline keyboard callback query
  • Pin a message in a Telegram group

Example Configuration

Send a text message to a channel:

{
  "type": "telegram",
  "parameters": {
    "resource": "message",
    "operation": "sendMessage",
    "chatId": "@mychannel",
    "text": "Hello World!",
    "additionalFields": {
      "parse_mode": "HTML",
      "disable_notification": false
    }
  }
}

Send a photo from a URL with an inline keyboard:

{
  "type": "telegram",
  "parameters": {
    "resource": "message",
    "operation": "sendPhoto",
    "chatId": "123456789",
    "binaryData": false,
    "file": "https://example.com/photo.jpg",
    "replyMarkup": "inlineKeyboard",
    "inlineKeyboard": {
      "rows": [
        {
          "row": {
            "buttons": [
              { "text": "Visit Website", "additionalFields": { "url": "https://example.com" } },
              { "text": "Callback Button", "additionalFields": { "callback_data": "button_clicked" } }
            ]
          }
        }
      ]
    },
    "additionalFields": {
      "caption": "Check out this photo!",
      "parse_mode": "HTML"
    }
  }
}

Send an album of two photos:

{
  "type": "telegram",
  "parameters": {
    "resource": "message",
    "operation": "sendMediaGroup",
    "chatId": "123456789",
    "media": {
      "media": [
        { "type": "photo", "media": "photo_file_id_1", "additionalFields": { "caption": "First photo" } },
        { "type": "photo", "media": "photo_file_id_2", "additionalFields": { "caption": "Second photo" } }
      ]
    }
  }
}

Edit a message that was already sent:

{
  "type": "telegram",
  "parameters": {
    "resource": "message",
    "operation": "editMessageText",
    "messageType": "message",
    "chatId": "123456789",
    "messageId": "{{ $json.message_id }}",
    "text": "Updated message text",
    "replyMarkup": "inlineKeyboard",
    "inlineKeyboard": {
      "rows": [
        {
          "row": {
            "buttons": [
              { "text": "Updated Button", "additionalFields": { "callback_data": "updated_callback" } }
            ]
          }
        }
      ]
    }
  }
}

Acknowledge a button press:

{
  "type": "telegram",
  "parameters": {
    "resource": "callback",
    "operation": "answerQuery",
    "queryId": "{{ $json.callback_query_id }}",
    "additionalFields": {
      "text": "Button clicked!",
      "show_alert": true
    }
  }
}

Send a location taken from the item:

{
  "type": "telegram",
  "parameters": {
    "resource": "message",
    "operation": "sendLocation",
    "chatId": "123456789",
    "latitude": "{{ $json.latitude }}",
    "longitude": "{{ $json.longitude }}"
  }
}

Download a file by its file_id:

{
  "type": "telegram",
  "parameters": {
    "resource": "file",
    "operation": "get",
    "fileId": "{{ $json.document.file_id }}",
    "download": true
  }
}

Upload a document from an upstream node’s binary data:

{
  "type": "telegram",
  "parameters": {
    "resource": "message",
    "operation": "sendDocument",
    "chatId": "123456789",
    "binaryData": true,
    "binaryPropertyName": "documentData",
    "additionalFields": {
      "fileName": "document.pdf",
      "caption": "Here's your document"
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Send messages, photos, videos, documents via Telegram Bot API; manage chats and callbacks; download files as binary data.

Common Patterns

Basic message sending — use Resource message with Operation sendMessage for text. Always specify Chat ID and Text.

Media sending — for media operations, choose between Binary File on (upload from workflow data) and Binary File off (send an existing file_id or a public URL).

Keyboards

  • Use Inline Keyboard for buttons that trigger callbacks
  • Use Reply Keyboard for buttons that send text responses
  • Use Force Reply to make the user reply to a specific message

Message managementeditMessageText modifies an existing message, pinChatMessage/unpinChatMessage manage the pinned message, and deleteMessage removes one.

Callback handling — use Resource callback to respond to button presses and inline queries.

File operations — use Resource file to retrieve file information and pull the file’s bytes off the Telegram servers.

Frequently asked questions

How do I send a simple message?

Use the message resource with the sendMessage operation, always specifying Chat ID and Text.

How do I choose between uploading and referencing media?

Binary File on uploads from workflow data; Binary File off sends an existing file_id or a public URL. Referencing an existing file_id is much faster when Telegram already holds the file.

Can it download files users send?

Yes — files can be downloaded as binary data, which is how you get an attachment out of a Telegram conversation and into the rest of the workflow.

How do I react to incoming messages?

Use the Telegram Trigger, which receives bot updates over webhook.

Build with the Telegram node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Telegram Bot API credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.