Actions34
- Chat Actions
- Contact Actions
- File Actions
- Group Actions
- Login Actions
- Message Actions
- User Actions
Message → Send Message with File
AI-generatedOverview
This node operation sends a file message to a specified Telegram chat. It allows users to provide the chat ID, the local file path of the file to be sent, an optional caption for the file, and optionally reply to a specific message in the chat. This operation is useful for automating the sending of documents, images, or other files to Telegram chats, such as sharing reports, images, or any file-based content programmatically.
Use Case Examples
- Sending a PDF report to a project group chat by specifying the chat ID and file path.
- Sharing an image with a caption to a Telegram channel automatically.
- Replying to a specific message in a chat with a file attachment.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier of the Telegram chat where the file will be sent. |
| File Path | The local filesystem path to the file that will be sent to the chat. |
| File Caption | An optional text caption to accompany the file message. |
| Reply to messageId | Optional message ID to which the file message will be a reply. |
Output
JSON
id- Identifier of the sent message.date- Timestamp when the message was sent.media- Details about the sent file media.caption- Caption text of the file message, if provided.chat_id- ID of the chat where the message was sent.
Dependencies
- Requires Telegram API credentials (API ID, API Hash, phone number) for authentication.
Troubleshooting
- Ensure the Telegram API credentials are correctly configured and the session is logged in before sending files.
- Verify the file path is correct and the file exists on the local filesystem to avoid file not found errors.
- Check that the chat ID is valid and the bot/user has permission to send messages to the chat.
- If replying to a message, ensure the reply_to_msg_id is a valid message ID in the chat.
Links
- Telegram CoPilot Login Guide - Instructions for logging in and managing Telegram sessions for this node.