Actions12
Overview
This node integrates with the Telegram Client API to perform various messaging and chat management operations. Specifically, the "Send File" operation allows users to send any type of file to a specified Telegram chat or channel by providing a file path or URL.
Common scenarios where this node is beneficial include:
- Automating file sharing in Telegram groups or channels.
- Sending reports, images, documents, or other files programmatically as part of workflows.
- Integrating Telegram file sending into broader automation pipelines for notifications or content distribution.
For example, you could use this node to automatically send daily generated PDF reports to a team’s Telegram channel or share media files with customers via Telegram.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The target chat or channel identifier or username (e.g., @username or -100xxxx) |
| File Path Or URL | The local path or web URL of the file to be sent |
| Options | Additional options including: • Silent: Send without notification • Caption: Text caption for the file • Parse Mode: How to parse captions (None, Markdown, HTML) |
Output
The output JSON object for the "Send File" operation includes:
success: Boolean indicating if the file was sent successfully.messageId: The unique identifier of the sent message.date: Timestamp of when the message was sent.filePath: The original file path or URL used to send the file.
This output confirms the successful delivery of the file and provides metadata about the sent message.
Dependencies
- Requires an active Telegram client session authenticated with valid API credentials (API ID and API hash).
- Needs a configured credential containing these Telegram API authentication details.
- Uses WebSocket connection to communicate with Telegram servers.
Troubleshooting
- Missing Credentials: If no credentials are provided or the session string is missing, the node will throw an error. Ensure that valid Telegram API credentials are configured.
- File Not Found or Invalid URL: If the file path or URL is incorrect or inaccessible, sending will fail. Verify the file location and accessibility.
- Unsupported Operation: Using an unsupported operation value will cause an error.
- Connection Issues: Network problems or invalid API credentials can prevent connecting to Telegram. Check network connectivity and credential validity.
- Permission Errors: The bot or user must have permission to send messages/files in the target chat/channel.