Actions30
- Chat Actions
- Custom Request Actions
- File Actions
- Group Actions
- Message Actions
- User Actions
Overview
This node integrates with Telegram via the TelePilot API, enabling automation of various Telegram messaging and chat management tasks. Specifically, for the Message resource and Send Message with File operation, it allows sending a local file as a message attachment to a specified Telegram chat, optionally including a caption and replying to an existing message.
Common scenarios where this node is beneficial include:
- Automatically sending documents or files to Telegram groups or individual chats as part of a workflow.
- Sharing reports, images, PDFs, or other files triggered by external events.
- Adding context to sent files by including captions or replying to specific messages in a conversation.
Example use case: A business automation that sends daily sales reports (PDF files) to a Telegram group chat with a caption summarizing the report.
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 to be sent. |
| File Caption | Optional text caption to accompany the file message. |
| Reply to messageId | Optional message ID in the chat to which this file message will be a reply. |
Output
The node outputs an array of JSON objects representing the result of the send message operation. Each output item corresponds to the Telegram API response for the sent message, typically including metadata about the message such as message ID, chat ID, date, and file details.
If the operation succeeds, the output JSON contains the full Telegram message object confirming the file was sent.
Binary data is not directly output by this node; it only sends files from local paths and returns JSON metadata about the sent message.
Dependencies
- Requires a valid Telegram API authentication credential (an API key/token) configured in n8n.
- Access to the local filesystem path specified in "File Path" must be available to the n8n instance.
- Uses the TelePilot Node Connection Manager internally to handle Telegram client sessions and API calls.
Troubleshooting
- File Not Found: If the specified file path does not exist or is inaccessible, the node will fail. Ensure the file path is correct and accessible by n8n.
- Authentication Errors: If the Telegram session is not logged in or expired, errors like "Please login" or "Unauthorized" may occur. Use the login operations to authenticate before sending messages.
- Permission Issues: Sending files to certain chats may fail if the bot/user lacks permission. Error messages indicating "CHAT_WRITE_FORBIDDEN" mean you cannot send messages to that chat.
- File Size Limits: Telegram imposes size limits on files. Large files may cause errors or be rejected.
- Caption Length: Very long captions might be truncated or rejected by Telegram.
- Reply to Invalid Message: Specifying a non-existent or deleted message ID in "Reply to messageId" can cause errors.
To resolve most issues, verify credentials, file accessibility, chat permissions, and input parameters carefully.
Links and References
- Telegram Bot API Documentation
- TelePilot Official Guide — for login and session management instructions
- n8n Documentation — general guidance on using credentials and nodes