Send Media
AI-generatedSummary
Send media files—such as documents, photos, videos, audio clips, voice messages, or animations—to a specified Telegram chat using binary data, a Telegram file ID, or a public URL.
Inputs
- chatId (required) — Unique identifier for the target Telegram chat or channel.
- mediaType — The type of media to send: Document, Photo, Video, Audio, Voice, or Animation.
- mediaSource — Source location of the file: Binary Data (from n8n binary field), Telegram File ID, or URL.
- binaryPropertyName (required) — Name of the n8n binary data field containing the media file when Media Source is set to Binary Data.
- fileUrl (required) — Public HTTP(S) URL of the file to send when Media Source is set to URL.
- mediaFileId (required) — Telegram File ID of an asset existing on Telegram servers when Media Source is set to Telegram File ID.
- mediaFileName — Optional filename override when uploading binary data; defaults to the binary item's filename.
- caption — Text caption accompanying the media file (up to 1024 characters).
- mediaOptions — Collection of optional parameters: Disable Notification, Parse Mode (HTML or MarkdownV2 for caption formatting), Reply To Message ID, and Supports Streaming (for video media).
Output shape
a single record
Returns the Telegram Message object sent by the Telegram API containing details such as message_id, chat info, date, and media metadata.
Examples
Example 1: Upload a PDF document from workflow binary data
Chat ID: ={{ $json.chatId }}, Media Type: Document, Media Source: Binary Data, Input Binary Field: data, Caption: Here is your requested report
Example 2: Send an image from a URL with HTML formatting
Chat ID: 123456789, Media Type: Photo, Media Source: URL, File URL: https://example.com/image.jpg, Caption: <b>Weekly Summary</b>, Options -> Parse Mode: HTML