Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node integrates with Telegram via the TelePilot API, enabling automation of various Telegram operations. Specifically, for the File resource and Download File operation, it allows downloading a file from Telegram by its identifier. This is useful in scenarios where you want to programmatically retrieve files shared or stored in Telegram chats, such as images, documents, or other media.

Practical examples include:

  • Automatically downloading files sent to a Telegram bot or channel for further processing.
  • Archiving Telegram files into external storage or databases.
  • Triggering workflows based on downloaded content from Telegram.

Properties

Name Meaning
File ID Identifier of the file to download

The "File ID" property is required and specifies the unique identifier of the Telegram file you want to download.

Output

The node outputs an array of JSON objects representing the result of the download operation. The main output contains the metadata and details about the downloaded file as returned by the TelePilot API.

If the file is successfully downloaded, the output JSON will include information such as file path, size, and other relevant attributes provided by the Telegram API.

The node does not explicitly handle binary data output in this operation; it returns JSON metadata about the downloaded file.

Dependencies

  • Requires an active Telegram API authentication credential (an API key/token) configured in n8n.
  • Depends on the TelePilotNodeConnectionManager internal service to manage Telegram client sessions.
  • The node expects the Telegram session to be logged in and active; otherwise, it prompts for login via a separate login flow.
  • Uses the typedi library for dependency injection and debug for logging internally.

Troubleshooting

  • Error: Please login
    Occurs if the Telegram session is not authenticated. Resolve by using the login operation with phone number and code before attempting file downloads.

  • Session was closed or terminated
    Indicates that the Telegram client session has expired or been closed. Re-login is required.

  • Unauthorized
    The API credentials are invalid or expired. Verify your Telegram API credentials and re-authenticate.

  • File not found or invalid File ID
    If the file ID is incorrect or the file no longer exists, the node may fail to download. Double-check the file ID input.

  • General API errors
    Network issues or Telegram API limitations might cause failures. Check network connectivity and Telegram API status.

Links and References

Discussion