<!-- BusyBot node reference — https://busybot.net/tools/telegram/ -->

> Node: Telegram (`telegram`) · Action (binary) · v1
> Category: Communication · Credentials: Telegram Bot API (`telegramApi`)
> Updated: 2026-08-16

# 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

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **Telegram Bot API** credentials.
See the [Credentials Guide](https://busybot.net/credentials/telegram-api/) for setup instructions.

### Resources

| Resource | Value |
|----------|-------|
| Callback | `callback` |
| Chat | `chat` |
| File | `file` |
| Message | `message` |

### Operations

| Operation | Value | Description |
|-----------|-------|-------------|
| Answer Inline Query | `answerInlineQuery` | Send answer to callback query sent from inline bot |
| Answer Query | `answerQuery` | Send answer to callback query sent from inline keyboard |
| Get | `get` | Get up to date information about a chat |
| Get Administrators | `administrators` | Get the administrators of a chat |
| Get Member | `member` | Get a member of a chat |
| Leave | `leave` | Leave a group, supergroup or channel |
| Set Description | `setDescription` | Set the description of a chat |
| Set Title | `setTitle` | Set the title of a chat |
| Get | `get` | Get a file from Telegram (optionally download binary data) |
| Delete Chat Message | `deleteMessage` | Delete a chat message |
| Edit Message Text | `editMessageText` | Edit a text message |
| Pin Chat Message | `pinChatMessage` | Pin a chat message |
| Send Animation | `sendAnimation` | Send an animated file |
| Send Audio | `sendAudio` | Send an audio file |
| Send Chat Action | `sendChatAction` | Send a chat action |
| Send Document | `sendDocument` | Send a document |
| Send Location | `sendLocation` | Send a location |
| Send Media Group | `sendMediaGroup` | Send group of photos or videos to album |
| Send Message | `sendMessage` | Send a text message |
| Send Photo | `sendPhoto` | Send a photo |
| Send Sticker | `sendSticker` | Send a sticker |
| Send Video | `sendVideo` | Send a video |
| Unpin Chat Message | `unpinChatMessage` | Unpin 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

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Query ID | `string` | Yes | — | Unique identifier for the query to be answered. |

#### Callback: Answer Inline Query

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Query ID | `string` | Yes | — | Unique identifier for the query to be answered. |
| Results | `string` | Yes | — | A JSON-serialized array of results for the inline query. |

#### Chat: Get

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique 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

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |

#### Chat: Get Member

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| User ID | `string` | Yes | — | Unique identifier of the target user. |

#### Chat: Leave

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |

#### Chat: Set Description

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Description | `string` | Yes | — | New chat description, 0-255 characters. |

#### Chat: Set Title

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Title | `string` | Yes | — | New chat title, 1-255 characters. |

#### File: Get

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| File ID | `string` | Yes | — | The ID of the file to get. Supports expressions. |
| Download | `boolean` | No | `true` | Whether to download the file binary data. |

#### Message: Send Message

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Text | `string` | Yes | — | Text of the message to be sent. Supports expressions like {{ $json.body }}. |

#### Message: Send Photo

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Binary File | `boolean` | Yes | `false` | Whether the data to upload should be taken from a binary field. |
| Input Binary Field | `string` | Yes | `data` | Name 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`)_ |
| File | `string` | No | — | Pass 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

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Binary File | `boolean` | Yes | `false` | Whether the data to upload should be taken from a binary field. |
| Input Binary Field | `string` | Yes | `data` | Name of the binary property that contains the data to upload. _(shown when Binary File is `true`)_ |
| File | `string` | No | — | Pass a file_id or an HTTP URL instead of uploading. _(shown when Binary File is `false`)_ |

#### Message: Send Audio

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Binary File | `boolean` | Yes | `false` | Whether the data to upload should be taken from a binary field. |
| Input Binary Field | `string` | Yes | `data` | Name of the binary property that contains the data to upload. _(shown when Binary File is `true`)_ |
| File | `string` | No | — | Pass a file_id or an HTTP URL instead of uploading. _(shown when Binary File is `false`)_ |

#### Message: Send Document

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Binary File | `boolean` | Yes | `false` | Whether the data to upload should be taken from a binary field. |
| Input Binary Field | `string` | Yes | `data` | Name of the binary property that contains the data to upload. _(shown when Binary File is `true`)_ |
| File | `string` | No | — | Pass a file_id or an HTTP URL instead of uploading. _(shown when Binary File is `false`)_ |

#### Message: Send Animation

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Binary File | `boolean` | Yes | `false` | Whether the data to upload should be taken from a binary field. |
| Input Binary Field | `string` | Yes | `data` | Name of the binary property that contains the data to upload. _(shown when Binary File is `true`)_ |
| File | `string` | No | — | Pass a file_id or an HTTP URL instead of uploading. _(shown when Binary File is `false`)_ |

#### Message: Send Sticker

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Binary File | `boolean` | Yes | `false` | Whether the data to upload should be taken from a binary field. |
| Input Binary Field | `string` | Yes | `data` | Name of the binary property that contains the data to upload. _(shown when Binary File is `true`)_ |
| File | `string` | No | — | Pass a file_id or an HTTP URL instead of uploading. _(shown when Binary File is `false`)_ |

#### Message: Send Media Group

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Media | `fixedCollection` | No | `{}` | The media to add. Add one entry per photo or video in the album. |
| — Type | `options` | No | `photo` | The type of the media to add. |
| | | | | Options: `photo`, `video` |
| — Media File | `string` | No | — | Media to send. Pass a file_id or HTTP URL. |
| — Additional Fields | `collection` | No | `{}` | Per-entry caption settings. |
| — — Caption | `string` | No | — | Caption text to set, 0-1024 characters. |
| — — Parse Mode | `options` | No | `HTML` | How to parse the text. |
| | | | | Options: `Markdown` (legacy), `MarkdownV2`, `HTML` |

#### Message: Send Location

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Latitude | `string` | No | — | Location latitude (-90 to 90). Supports expressions e.g. {{ $json.latitude }} |
| Longitude | `string` | No | — | Location longitude (-180 to 180). Supports expressions e.g. {{ $json.longitude }} |

#### Message: Send Chat Action

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Action | `options` | No | `typing` | Type 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

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Message Type | `options` | No | `message` | The type of the message to edit. |
| | | | | Options: `inlineMessage`, `message` |
| Chat ID | `string` | Yes | — | Unique identifier for the target chat. _(shown when Message Type is `message`)_ |
| Message ID | `string` | Yes | — | Unique identifier of the message to edit. _(shown when Message Type is `message`)_ |
| Inline Message ID | `string` | Yes | — | Unique identifier of the inline message to edit. _(shown when Message Type is `inlineMessage`)_ |
| Text | `string` | Yes | — | Text of the message to be sent. Supports expressions. |

#### Message: Delete Chat Message

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Message ID | `string` | Yes | — | Unique identifier of the message. Supports expressions. |

#### Message: Pin Chat Message

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Message ID | `string` | Yes | — | Unique identifier of the message. Supports expressions. |

#### Message: Unpin Chat Message

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Chat ID | `string` | Yes | — | Unique identifier for the target chat or username of the target channel. Supports expressions. |
| Message ID | `string` | Yes | — | Unique 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.

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Reply Markup | `options` | No | `none` | Additional interface options. |
| | | | | Options: `forceReply`, `inlineKeyboard`, `none`, `replyKeyboard`, `replyKeyboardRemove` |
| Force Reply | `collection` | No | `{}` | Forces the user's client to open a reply box. _(shown when Reply Markup is `forceReply`)_ |
| — Force Reply | `boolean` | No | `false` | Whether to show reply interface to the user. |
| — Selective | `boolean` | No | `false` | Whether to force reply from specific users only. |
| Inline Keyboard | `fixedCollection` | No | `{}` | Adds an inline keyboard that appears right next to the message it belongs to. _(shown when Reply Markup is `inlineKeyboard`)_ |
| — Row | `fixedCollection` | No | `{}` | One keyboard row. Add a Row per line of buttons. |
| — — Text | `string` | No | — | Label text on the button. |
| — — Additional Fields | `collection` | No | `{}` | What the button does when pressed. |
| — — — Callback Data | `string` | No | — | Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes. |
| — — — Pay | `boolean` | No | `false` | Whether to send a Pay button. |
| — — — Switch Inline Query | `string` | No | — | If set, pressing the button will prompt the user to select one of their chats. |
| — — — Switch Inline Query Current Chat | `string` | No | — | If set, pressing the button will insert the bot username and inline query in the current chat. |
| — — — URL | `string` | No | — | HTTP or tg:// URL to be opened when button is pressed. |
| — — — Web App | `collection` | No | `{}` | Launch the Telegram Web App. |
| — — — — URL | `string` | No | — | An HTTPS URL of a Web App to be opened. |
| Reply Keyboard | `fixedCollection` | No | `{}` | Adds a custom keyboard with reply options. _(shown when Reply Markup is `replyKeyboard`)_ |
| — Row | `fixedCollection` | No | `{}` | One keyboard row. Add a Row per line of buttons. |
| — — Text | `string` | No | — | Text of the button. |
| — — Additional Fields | `collection` | No | `{}` | What the button sends when pressed. |
| — — — Request Contact | `boolean` | No | `false` | Whether the user's phone number will be sent as a contact when the button is pressed. |
| — — — Request Location | `boolean` | No | `false` | Whether the user's current location will be sent when the button is pressed. |
| — — — Web App | `collection` | No | `{}` | Launch the Telegram Web App. |
| — — — — URL | `string` | No | — | An HTTPS URL of a Web App to be opened. |
| Reply Keyboard Options | `collection` | No | `{}` | Display options for the custom keyboard. _(shown when Reply Markup is `replyKeyboard`)_ |
| — Resize Keyboard | `boolean` | No | `false` | Whether to request clients to resize the keyboard vertically for optimal fit. |
| — One Time Keyboard | `boolean` | No | `false` | Whether to request clients to hide the keyboard as soon as it's been used. |
| — Selective | `boolean` | No | `false` | Whether to show the keyboard to specific users only. |
| Reply Keyboard Remove | `collection` | No | `{}` | Removes a custom keyboard previously shown to the user. _(shown when Reply Markup is `replyKeyboardRemove`)_ |
| — Remove Keyboard | `boolean` | No | `false` | Whether to request clients to remove the custom keyboard. |
| — Selective | `boolean` | No | `false` | Whether to force reply from specific users only. |

#### Additional Fields

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

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Additional Fields | `collection` | No | `{}` | Optional Telegram Bot API fields for the selected operation. |
| — Caption | `string` | No | — | Caption text to set, 0-1024 characters. _(shown when Operation is `sendAnimation`, `sendAudio`, `sendDocument`, `sendPhoto`, `sendVideo`)_ |
| — Cache Time | `string` | No | — | The 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 Notification | `boolean` | No | `false` | Whether to send the message silently. Users will receive a notification with no sound. _(hidden when Operation is `editMessageText`, `answerQuery`, `answerInlineQuery`)_ |
| — Disable WebPage Preview | `boolean` | No | `false` | Whether to disable link previews for links in this message. _(shown when Operation is `editMessageText`, `sendMessage`)_ |
| — Duration | `string` | No | — | Duration of clip in seconds. Supports expressions e.g. {{ $json.duration }} _(shown when Operation is `sendAnimation`, `sendAudio`, `sendVideo`)_ |
| — File Name | `string` | No | — | Override the filename for binary uploads. _(shown when Operation is `sendAnimation`, `sendAudio`, `sendDocument`, `sendPhoto`, `sendVideo`, `sendSticker` and Binary File is `true`)_ |
| — Height | `string` | No | — | Height of the video. Supports expressions e.g. {{ $json.height }} _(shown when Operation is `sendAnimation`, `sendVideo`)_ |
| — MIME Type | `string` | No | — | The 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 Mode | `options` | No | `HTML` | How to parse the text. _(shown when Operation is `editMessageText`, `sendAnimation`, `sendAudio`, `sendMessage`, `sendPhoto`, `sendVideo`, `sendDocument`)_ |
| | | | | Options: `Markdown` (legacy), `MarkdownV2`, `HTML` |
| — Performer | `string` | No | — | Name of the performer. _(shown when Operation is `sendAudio`)_ |
| — Reply To Message ID | `string` | No | — | If 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 ID | `string` | No | — | The 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 Alert | `boolean` | No | `false` | Whether 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`)_ |
| — Text | `string` | No | — | Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters. _(shown when Operation is `answerQuery`, `answerInlineQuery`)_ |
| — Thumbnail | `string` | No | — | Thumbnail 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`)_ |
| — Title | `string` | No | — | Title of the track. _(shown when Operation is `sendAudio`)_ |
| — URL | `string` | No | — | URL that will be opened by the user's client. _(shown when Operation is `answerQuery`, `answerInlineQuery`)_ |
| — Width | `string` | No | — | Width of the video. Supports expressions e.g. {{ $json.width }} _(shown when Operation is `sendAnimation`, `sendVideo`)_ |

#### All Operations

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Bot Token | `string` | No | — | Telegram Bot API token from @BotFather. |
| Max Concurrency | `number` | No | `5` | Maximum 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 operations** — `get` 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:

```json
{
  "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:

```json
{
  "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:

```json
{
  "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:

```json
{
  "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:

```json
{
  "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:

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

Download a file by its file_id:

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

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

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

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes 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 management** — `editMessageText` 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.