Actions101
- Bot Actions
- Chat Actions
- Get Chat
- Get Chat Administrators
- Get Chat Member Count
- Get Chat Member
- Ban Chat Member
- Unban Chat Member
- Restrict Chat Member
- Promote Chat Member
- Set Chat Administrator Custom Title
- Set Chat Permissions
- Export Chat Invite Link
- Create Chat Invite Link
- Edit Chat Invite Link
- Revoke Chat Invite Link
- Approve Chat Join Request
- Decline Chat Join Request
- Set Chat Photo
- Delete Chat Photo
- Set Chat Title
- Set Chat Description
- Pin Chat Message
- Unpin Chat Message
- Unpin All Chat Messages
- Leave Chat
- Set Chat Menu Button
- Get Chat Menu Button
- Set Chat Sticker Set
- Delete Chat Sticker Set
- File Actions
- Forum Actions
- Game Actions
- Inline Actions
- Message Actions
- Send Message
- Forward Message
- Copy Message
- Send Photo
- Send Audio
- Send Document
- Send Video
- Send Animation
- Send Voice
- Send Video Note
- Send Media Group
- Send Location
- Send Venue
- Send Contact
- Send Poll
- Send Dice
- Send Chat Action
- Edit Message Text
- Edit Message Caption
- Edit Message Media
- Edit Message Reply Markup
- Edit Message Live Location
- Stop Message Live Location
- Stop Poll
- Delete Message
- Delete Messages
- Payment Actions
- Sticker Actions
- Update Actions
- Webhook Actions
Message → Send Document
AI-generatedSummary
Uploads and sends a file to a specified Telegram chat as a document.
Inputs
- chat_id (required) — Unique identifier for the target chat or username (@channelusername).
- fileSource — How to provide the file (fileId, url, or binary).
- fileId — File ID of the file to send (required if fileSource is fileId).
- fileUrl — URL of the file to send (required if fileSource is url).
- binaryPropertyName — Name of the binary property containing the file (required if fileSource is binary).
- caption — Caption for the file.
- parse_mode — How to parse the caption (none, Markdown, MarkdownV2, or HTML).
- reply_markup — Inline keyboard, reply keyboard, or other reply markup as JSON.
- additionalFields — Additional message parameters such as disable_notification, protect_content, reply_to_message_id, message_thread_id, disable_web_page_preview, and allow_sending_without_reply.
Output shape
A single record containing the sent message object (chat_id, message_id, date, from, chat).
The operation returns the API response for the sent message, which includes the unique message ID. If multiple items are processed, the output is a list of these records.
Examples
Example 1: Send a PDF document from a File ID to a channel.
File Source: File ID; Chat ID: @mychannel; Caption: 'Monthly Report'.
Example 2: Upload a file from a URL to a personal chat.
File Source: URL; File URL: https://example.com/document.pdf; Chat ID: 123456789.
Example 3: Send a document without creating a notification.
File Source: Binary; Binary Property: data; Additional Fields: disable_notification = true.