Actions37
- Chat Actions
- Contact Actions
- File Actions
- Group Actions
- Login Actions
- Message Actions
- Request Actions
- User Actions
Message → Send Message with Document
AI-generatedOverview
This node operation sends a document message to a specified Telegram chat. It allows users to upload a local file as a document and optionally add a caption and reply to a specific message within the chat. This is useful for automating the sharing of documents in Telegram chats, such as sending reports, PDFs, or other file types directly from a local path.
Use Case Examples
- Automate sending monthly reports as documents to a team chat.
- Send user-uploaded documents to a customer support chat automatically.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The identifier of the Telegram chat where the document will be sent. |
| Message File (Photo, Video, Document) | The local file path of the document to be sent. |
| Caption | Optional caption text to accompany the document message. |
| Reply to messageId | Optional message ID to which this document message will reply. |
Output
JSON
_- Type of the sent message, e.g., 'sendMessage'chat_id- ID of the chat where the message was sentreply_to_message_id- ID of the message this message is replying to, if anyinput_message_content_- Type of input message content, here 'inputMessageDocument'document
*_- Indicates the document file is a local file with its path
*path- Local file path of the document sentcaption
*_- Caption text format, e.g., 'formattedText'
*text- Caption text accompanying the document message
Dependencies
- Telegram API access via an API key credential
Troubleshooting
- Ensure the Telegram API credentials are valid and the session is logged in; otherwise, the node will throw login-related errors.
- Verify the local file path is correct and accessible to avoid file not found errors.
- If the caption is empty, it is set to null to avoid sending empty captions.
- Common errors include 'Unauthorized' or 'A closed client cannot be reused' which indicate session issues requiring re-login.
Links
- TelePilot Login Guide - Instructions for logging in and managing Telegram sessions for this node.