Actions23
- Chat Actions
- Callback Actions
- File Actions
- Message Actions
Overview
This node interacts with the Telegram API to perform various actions related to Telegram files. Specifically, for the File - Get operation, it retrieves information about a file by its ID and optionally downloads the file content. This is useful when you want to fetch files that have been previously uploaded or shared on Telegram, such as photos, documents, or other media.
Common scenarios include:
- Downloading a file sent in a Telegram chat for further processing or storage.
- Retrieving metadata about a file stored on Telegram servers.
- Integrating Telegram file retrieval into automated workflows, e.g., saving received files to cloud storage or triggering other processes based on file content.
Example: You receive a file ID from a Telegram message and want to download the actual file data to process it in your workflow.
Properties
| Name | Meaning |
|---|---|
| File ID | The unique identifier of the file to retrieve from Telegram. |
| Download | Boolean flag indicating whether to download the file content after retrieving file info. |
| Reply Keyboard | (Not applicable for this operation) Adds a custom keyboard with reply options (UI feature). |
| Reply Keyboard Options | (Not applicable here) Options to customize the reply keyboard behavior. |
| Reply Keyboard Remove | (Not applicable here) Options to remove the custom keyboard. |
Note: The "Reply Keyboard" properties are part of the broader node but not relevant for the File Get operation.
Output
The node outputs an array of items where each item contains:
json: The JSON response from the Telegram API containing file information. For the File Get operation, this includes details like file path, size, etc.binary(optional): If the "Download" property is true, the node also outputs the actual file content in binary form under thedatabinary property. This allows subsequent nodes to access the raw file data for further processing.
Dependencies
- Requires a valid Telegram API authentication token configured in n8n credentials.
- Uses Telegram Bot API endpoints to fetch file information and download files.
- No additional external services are required beyond Telegram.
Troubleshooting
- Missing or invalid File ID: Ensure the File ID provided is correct and corresponds to an existing file on Telegram.
- Download fails or no binary data: Verify that the "Download" option is enabled and that the file exists and is accessible. Also, ensure the node has permission to download files.
- File name missing error: When downloading binary data, the node requires a file name either from the binary property metadata or manually set in the node's additional fields. Without a file name, the download will fail.
- API errors: Errors returned by Telegram API (e.g., unauthorized, file not found) will be surfaced. Check your Telegram bot permissions and validity of tokens.