Telegram
connector.telegram · connector.telegram_trigger · communication
Send messages and files as a Telegram bot, manage chats and messages, answer callback queries, download files, and start workflows from bot updates.
Vendor API documentation: https://core.telegram.org/bots/api
Authentication
| Method | Credential kind | Auth kind | Fields | Test request |
|---|---|---|---|---|
| Bot token | telegram/bot_token | api_key | token (secret), base_url | yes |
Actions
Node type connector.telegram. Choose a resource and an operation; each operation has its own parameters.
Message
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Send a text message | message.send_text | writes | 4 | |
| Send a photo | message.send_photo | writes | 2 | |
| Send a document | message.send_document | writes | 2 | |
| Send an audio file | message.send_audio | writes | 1 | |
| Send a video | message.send_video | writes | 1 | |
| Send an animation (GIF or silent video) | message.send_animation | writes | 1 | |
| Send a voice message | message.send_voice | writes | 1 | |
| Send a sticker | message.send_sticker | writes | 1 | |
| Send an album | message.send_media_group | writes | 1 | |
| Send a location | message.send_location | writes | 1 | |
| Edit a message text | message.edit_text | writes | 2 | |
| Delete a message | message.delete | writes | 1 | |
| Forward a message | message.forward | writes | 1 | |
| Copy a message | message.copy | writes | 1 | |
| Pin a message | message.pin | writes | 1 | |
| Unpin a message | message.unpin | writes | 1 |
Send a text message
Operation message.send_text.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | Chat ID, or @username of a public channel or group. | ||
text | string | yes | 1 to 4096 characters after entity parsing. | ||
parse_mode | options | One of HTML, MarkdownV2, Markdown. | |||
disable_web_page_preview | boolean | false | |||
message_thread_id | number | Forum topic to post in. | |||
disable_notification | boolean | false | |||
protect_content | boolean | false | |||
reply_to_message_id | number | ||||
reply_markup | json | Inline keyboard, custom reply keyboard, keyboard removal or force-reply object. |
Send a photo
Operation message.send_photo.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | Chat ID, or @username of a public channel or group. | ||
binary_data | boolean | false | Upload the file from a binary property instead of sending a file_id or URL. | ||
binary_property | binary_property | "data" | binary_data = true | ||
file | string | binary_data = false | file_id of a file already on Telegram’s servers, or an HTTP URL for Telegram to fetch. | ||
caption | string | ||||
parse_mode | options | One of HTML, MarkdownV2, Markdown. | |||
has_spoiler | boolean | false | |||
message_thread_id | number | Forum topic to post in. | |||
disable_notification | boolean | false | |||
protect_content | boolean | false | |||
reply_to_message_id | number | ||||
reply_markup | json | Inline keyboard, custom reply keyboard, keyboard removal or force-reply object. |
Send a document
Operation message.send_document.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | Chat ID, or @username of a public channel or group. | ||
binary_data | boolean | false | Upload the file from a binary property instead of sending a file_id or URL. | ||
binary_property | binary_property | "data" | binary_data = true | ||
file | string | binary_data = false | file_id of a file already on Telegram’s servers, or an HTTP URL for Telegram to fetch. | ||
caption | string | ||||
parse_mode | options | One of HTML, MarkdownV2, Markdown. | |||
disable_content_type_detection | boolean | false | |||
message_thread_id | number | Forum topic to post in. | |||
disable_notification | boolean | false | |||
protect_content | boolean | false | |||
reply_to_message_id | number | ||||
reply_markup | json | Inline keyboard, custom reply keyboard, keyboard removal or force-reply object. |
Send an audio file
Operation message.send_audio.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | Chat ID, or @username of a public channel or group. | ||
binary_data | boolean | false | Upload the file from a binary property instead of sending a file_id or URL. | ||
binary_property | binary_property | "data" | binary_data = true | ||
file | string | binary_data = false | file_id of a file already on Telegram’s servers, or an HTTP URL for Telegram to fetch. | ||
caption | string | ||||
parse_mode | options | One of HTML, MarkdownV2, Markdown. | |||
duration | number | ||||
performer | string | ||||
title | string | ||||
message_thread_id | number | Forum topic to post in. | |||
disable_notification | boolean | false | |||
protect_content | boolean | false | |||
reply_to_message_id | number | ||||
reply_markup | json | Inline keyboard, custom reply keyboard, keyboard removal or force-reply object. |
Send a video
Operation message.send_video.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | Chat ID, or @username of a public channel or group. | ||
binary_data | boolean | false | Upload the file from a binary property instead of sending a file_id or URL. | ||
binary_property | binary_property | "data" | binary_data = true | ||
file | string | binary_data = false | file_id of a file already on Telegram’s servers, or an HTTP URL for Telegram to fetch. | ||
caption | string | ||||
parse_mode | options | One of HTML, MarkdownV2, Markdown. | |||
duration | number | ||||
width | number | ||||
height | number | ||||
supports_streaming | boolean | false | |||
has_spoiler | boolean | false | |||
message_thread_id | number | Forum topic to post in. | |||
disable_notification | boolean | false | |||
protect_content | boolean | false | |||
reply_to_message_id | number | ||||
reply_markup | json | Inline keyboard, custom reply keyboard, keyboard removal or force-reply object. |
Send an animation (GIF or silent video)
Operation message.send_animation.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | Chat ID, or @username of a public channel or group. | ||
binary_data | boolean | false | Upload the file from a binary property instead of sending a file_id or URL. | ||
binary_property | binary_property | "data" | binary_data = true | ||
file | string | binary_data = false | file_id of a file already on Telegram’s servers, or an HTTP URL for Telegram to fetch. | ||
caption | string | ||||
parse_mode | options | One of HTML, MarkdownV2, Markdown. | |||
duration | number | ||||
width | number | ||||
height | number | ||||
message_thread_id | number | Forum topic to post in. | |||
disable_notification | boolean | false | |||
protect_content | boolean | false | |||
reply_to_message_id | number | ||||
reply_markup | json | Inline keyboard, custom reply keyboard, keyboard removal or force-reply object. |
Send a voice message
Operation message.send_voice.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | Chat ID, or @username of a public channel or group. | ||
binary_data | boolean | false | Upload the file from a binary property instead of sending a file_id or URL. | ||
binary_property | binary_property | "data" | binary_data = true | ||
file | string | binary_data = false | file_id of a file already on Telegram’s servers, or an HTTP URL for Telegram to fetch. | ||
caption | string | ||||
parse_mode | options | One of HTML, MarkdownV2, Markdown. | |||
duration | number | ||||
message_thread_id | number | Forum topic to post in. | |||
disable_notification | boolean | false | |||
protect_content | boolean | false | |||
reply_to_message_id | number | ||||
reply_markup | json | Inline keyboard, custom reply keyboard, keyboard removal or force-reply object. |
Send a sticker
Operation message.send_sticker.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | Chat ID, or @username of a public channel or group. | ||
binary_data | boolean | false | Upload the file from a binary property instead of sending a file_id or URL. | ||
binary_property | binary_property | "data" | binary_data = true | ||
file | string | binary_data = false | file_id of a file already on Telegram’s servers, or an HTTP URL for Telegram to fetch. | ||
emoji | string | Emoji associated with a newly uploaded sticker. | |||
message_thread_id | number | Forum topic to post in. | |||
disable_notification | boolean | false | |||
protect_content | boolean | false | |||
reply_to_message_id | number | ||||
reply_markup | json | Inline keyboard, custom reply keyboard, keyboard removal or force-reply object. |
Send an album
Operation message.send_media_group. Sends 2 to 10 photos, videos, documents or audio files as one album, referenced by file_id or URL.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | |||
media | json | yes | Array of InputMedia objects, for example [{“type”: “photo”, “media”: “https://…”, “caption”: “…”}]. | ||
message_thread_id | number | ||||
disable_notification | boolean | false | |||
protect_content | boolean | false | |||
reply_to_message_id | number |
Send a location
Operation message.send_location.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | |||
latitude | number | yes | |||
longitude | number | yes | |||
horizontal_accuracy | number | Radius of uncertainty in meters (0-1500). | |||
live_period | number | Seconds the location stays live (60-86400). | |||
message_thread_id | number | ||||
disable_notification | boolean | false | |||
reply_to_message_id | number | ||||
reply_markup | json |
Edit a message text
Operation message.edit_text.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
message_type | options | "message" | One of message, inline_message. | ||
chat_id | string | message_type = message | |||
message_id | number | message_type = message | |||
inline_message_id | string | message_type = inline_message | |||
text | string | yes | |||
parse_mode | options | One of HTML, MarkdownV2, Markdown. | |||
disable_web_page_preview | boolean | false | |||
reply_markup | json | Inline keyboard to show under the message. |
Delete a message
Operation message.delete.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | |||
message_id | number | yes |
Forward a message
Operation message.forward.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | Target chat. | ||
from_chat_id | string | yes | Chat the message is in. | ||
message_id | number | yes | |||
message_thread_id | number | ||||
disable_notification | boolean | false | |||
protect_content | boolean | false |
Copy a message
Operation message.copy. Sends a copy of a message without the link to the original.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | |||
from_chat_id | string | yes | |||
message_id | number | yes | |||
caption | string | New caption for media (keeps the original when empty). | |||
parse_mode | options | One of HTML, MarkdownV2, Markdown. | |||
message_thread_id | number | ||||
disable_notification | boolean | false | |||
reply_markup | json |
Pin a message
Operation message.pin.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | |||
message_id | number | yes | |||
disable_notification | boolean | false |
Unpin a message
Operation message.unpin.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | |||
message_id | number | Leave empty to unpin the most recent pinned message. |
Chat
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Get a chat | chat.get | reads | 1 | |
| List chat administrators | chat.get_administrators | reads | 1 | |
| Get a chat member | chat.get_member | reads | 1 | |
| Count chat members | chat.get_member_count | reads | 1 | |
| Leave a chat | chat.leave | writes | 1 | |
| Set the chat title | chat.set_title | writes | 1 | |
| Set the chat description | chat.set_description | writes | 1 | |
| Show a chat action | chat.send_action | writes | 1 |
Get a chat
Operation chat.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes |
List chat administrators
Operation chat.get_administrators.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes |
Get a chat member
Operation chat.get_member.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | |||
user_id | number | yes |
Count chat members
Operation chat.get_member_count.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes |
Leave a chat
Operation chat.leave.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes |
Set the chat title
Operation chat.set_title.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | |||
title | string | yes |
Set the chat description
Operation chat.set_description.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | |||
description | string | 0 to 255 characters; empty removes the description. |
Show a chat action
Operation chat.send_action. Shows a status such as “typing…” for up to 5 seconds.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
chat_id | string | yes | |||
action | options | "typing" | yes | One of typing, upload_photo, record_video, upload_video, record_voice, upload_voice, upload_document, choose_sticker, find_location, record_video_note, upload_video_note. | |
message_thread_id | number |
Callback
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Answer a callback query | callback.answer_query | writes | 1 | |
| Answer an inline query | callback.answer_inline_query | writes | 1 |
Answer a callback query
Operation callback.answer_query. Acknowledges an inline keyboard button press, optionally showing a notification or alert.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
query_id | string | yes | callback_query.id from the update. | ||
text | string | Notification text (0-200 characters). | |||
show_alert | boolean | false | |||
url | string | URL to open (game or t.me deep link). | |||
cache_time | number |
Answer an inline query
Operation callback.answer_inline_query.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
query_id | string | yes | inline_query.id from the update. | ||
results | json | yes | Array of InlineQueryResult objects (at most 50). | ||
cache_time | number | ||||
is_personal | boolean | false | |||
next_offset | string |
File
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Get file details | file.get | reads | 1 | |
| Download a file | file.download | reads | 1 |
Get file details
Operation file.get. Returns the file path and size; the download link is valid for at least one hour.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
file_id | string | yes |
Download a file
Operation file.download. Downloads a file (up to 20 MB on the public Bot API server) into a binary property.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
file_id | string | yes | |||
binary_property | string | "data" |
Bot
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Get bot details | bot.get_me | reads | 1 | |
| Get webhook status | bot.get_webhook_info | reads | 1 |
Get bot details
Operation bot.get_me.
This node has no parameters.
Get webhook status
Operation bot.get_webhook_info. Shows the registered webhook URL, pending updates and the last delivery error.
This node has no parameters.
Triggers
Node type connector.telegram_trigger.
| Trigger | ID | Kind | Deduplication key | Signature | Webhook registration | Cassette tests |
|---|---|---|---|---|---|---|
| Bot update | updates | webhook | token | automatic | 0 | |
| Bot update (polling) | new_update | poll | {{ item.update_id }} | 0 |
Trigger: Bot update
Registers the node’s webhook URL with Telegram (setWebhook) when the workflow is activated and removes it on deactivation. Each request is checked against a secret token sent in X-Telegram-Bot-Api-Secret-Token. A bot can have only one webhook, so only one active workflow per bot can use this trigger.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
updates | multi_options | ["*"] | Update types to receive. “All” asks for every type Telegram sends by default. 16 values, listed below. | ||
chat_ids | string | Comma-separated chat IDs to accept. Leave empty for all chats. | |||
user_ids | string | Comma-separated sender user IDs to accept. Leave empty for everyone. | |||
drop_pending_updates | boolean | false | Discard updates that queued up while no webhook was registered. |
Values of updates
| Value | Label |
|---|---|
* | All |
message | Message |
edited_message | Edited message |
channel_post | Channel post |
edited_channel_post | Edited channel post |
inline_query | Inline query |
chosen_inline_result | Chosen inline result |
callback_query | Callback query |
shipping_query | Shipping query |
pre_checkout_query | Pre-checkout query |
poll | Poll |
poll_answer | Poll answer |
my_chat_member | Bot membership changed |
chat_member | Chat member changed |
chat_join_request | Join request |
message_reaction | Reaction changed |
Trigger: Bot update (polling)
Fetches new updates with getUpdates on the poll schedule; no public URL needed. Telegram refuses getUpdates while a webhook is registered for the bot.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
updates | multi_options | ["*"] | 14 values, listed below. |
Values of updates
| Value | Label |
|---|---|
* | |
message | |
edited_message | |
channel_post | |
edited_channel_post | |
inline_query | |
chosen_inline_result | |
callback_query | |
poll | |
poll_answer | |
my_chat_member | |
chat_member | |
chat_join_request | |
message_reaction |
Import
Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.
| Source type | Version range | Status | Fixtures |
|---|---|---|---|
n8n-nodes-base.telegram | >=1 <2 | unverified | |
n8n-nodes-base.telegramTrigger | >=1 <2 | unverified |
Provenance
Written from the vendor’s documentation:
- https://core.telegram.org/bots/api
- https://core.telegram.org/bots/api#making-requests
- https://core.telegram.org/bots/api#setwebhook
- https://core.telegram.org/bots/api#getupdates
- https://core.telegram.org/bots/api#sending-files
- https://core.telegram.org/bots/api#getfile
- https://core.telegram.org/bots/api#available-methods
- https://core.telegram.org/bots/api#updating-messages
- https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this
- https://core.telegram.org/bots/webhooks
- https://core.telegram.org/bots/features#botfather