Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

The node provides integration with Telegram via the TelePilot API, enabling various Telegram-related operations programmatically. Specifically, for the File resource and Get Remote File operation, it allows users to download a remote file from Telegram by specifying its unique remote file identifier.

This node is beneficial in scenarios where automated workflows need to retrieve files shared or stored on Telegram without manual intervention. For example, a user might want to automatically fetch images, documents, or other media sent in Telegram chats and process or archive them elsewhere.

Practical example:

  • Automatically download a remote file from Telegram when triggered by a new message event.
  • Use the downloaded file in subsequent workflow steps such as uploading to cloud storage or processing with other tools.

Properties

Name Meaning
File ID Identifier of the remote file to download from Telegram. This is a required string input.

Output

The node outputs an array of JSON objects representing the result of the getRemoteFile invocation. The structure corresponds to the Telegram file object returned by the TelePilot API, which typically includes metadata about the file such as file size, path, and identifiers needed for further processing or downloading.

If the node supports binary data output (not explicitly shown in this operation), it would represent the actual file content downloaded from Telegram. However, for the "Get Remote File" operation, the output is primarily JSON metadata describing the remote file.

Dependencies

  • Requires an active Telegram API authentication credential (an API key/token) configured in n8n.
  • Depends on the TelePilot Node Connection Manager to handle Telegram client sessions and API calls.
  • The node requires proper login/authentication to Telegram via phone number and code before file operations can be performed.
  • Network access to Telegram servers is necessary.

Troubleshooting

  • Common issues:

    • Attempting to get a remote file without being logged in will cause errors.
    • Using an invalid or expired remote file ID will likely result in failure or empty responses.
    • Session expiration or closure requires re-authentication via the login flow.
  • Error messages:

    • "Session was closed or terminated. Please login again": Indicates the Telegram session is no longer valid; re-login is required.
    • "Please login": The node detected no active authenticated session; follow the login instructions.
    • "Unauthorized": Authentication failed; check credentials and re-authenticate.
  • Resolution:

    • Follow the login procedure using the ChatTrigger node and login commands as described in https://telepilot.co/login-howto.
    • Ensure the remote file ID is correct and accessible.
    • Reconnect or refresh credentials if sessions expire.

Links and References

Discussion