Download Image
Downloads an image from a Telegram message to a specified directory.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Client Id - The unique identifier of the Telegram client to use for this operation.
- Chat Id - The unique identifier of the chat containing the message with the image.
- Message Id - The unique identifier of the message containing the image to download.
- Download Directory - The local directory path where the image should be saved.
Output
- Image Path - The full path to the downloaded image file.
How It Works
The Download Image node downloads an image from a specified Telegram message. When executed, the node:
- Validates the provided inputs (Client Id, Chat Id, Message Id, and Download Directory)
- Retrieves the specified message from the Telegram chat
- Checks if the message contains a photo
- Downloads the image to the specified directory
- Returns the full path to the downloaded image file
Requirements
- A valid Telegram client session with appropriate permissions
- Valid Chat Id and Message Id of a message containing an image
- Valid local directory path for downloading the image
- Client Id must match an existing Telegram client session
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Client Id
- Empty or invalid Chat Id
- Empty or invalid Message Id
- Empty or invalid Download Directory
- Download Directory is not a valid directory path
- Message does not contain an image
Usage Notes
- The Chat Id and Message Id can be obtained from other Telegram nodes that retrieve messages
- The Download Directory must be a valid existing directory path
- The output Image Path can be used in other nodes that process files
- The Client Id must correspond to an active Telegram client session