Telegram Advance icon

Telegram Advance

Send Telegram messages and media, download files, or wait for an in-chat response

Send Media

AI-generated

Summary

Sends media (document, photo, video, audio, voice, or animation) to a Telegram chat.

Inputs

  • chatId (required) — Target Telegram chat ID; can be set via expression {{ $json.message?.chat?.id || $json.chatId }}
  • mediaType (required) — Type of media to send (animation, audio, document, photo, video, voice). Default: document
  • mediaSource (required) — Where the media comes from (binary, url, fileId). Default: binary
  • binaryPropertyName (required) — Name of the input binary field containing the media file (when mediaSource is binary). Default: data
  • mediaFileName — Optional filename override; otherwise the binary filename is used (when mediaSource is binary)
  • fileUrl (required) — Public HTTP(S) URL that Telegram can download (when mediaSource is url)
  • mediaFileId (required) — ID of a file already stored by Telegram (when mediaSource is fileId)
  • caption — Optional caption for the media, up to 1024 characters
  • mediaOptions.disableNotification — Whether to send the media silently. Default: false
  • mediaOptions.parseMode — How Telegram should parse formatting in the caption (none, HTML, MarkdownV2). Default: none
  • mediaOptions.replyToMessageId — If set, the media is sent as a reply to this message ID. Default: 0
  • mediaOptions.supportsStreaming — Whether the uploaded video is suitable for streaming (only applies when mediaType is video). Default: false

Output shape

Array of items each containing json (Telegram API response with sent message object) and pairedItem metadata linking to the input item

On error the node returns an error object in json if continueOnFail is enabled; otherwise it throws.

Links

Discussion