Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

The Telegram CoPilot node's "File" resource with the "Get Remote File" operation allows you to retrieve metadata and information about a file stored remotely on Telegram servers, using its unique identifier. This is useful when you have a remote_file_id (for example, obtained from a previous message or operation) and want to fetch details about that file—such as its status, size, or other attributes—without downloading the actual file content.

Common scenarios:

  • Checking if a remote file is still available before attempting a download.
  • Retrieving file metadata for logging, auditing, or further processing in your workflow.
  • Integrating with other Telegram-based automations where file references are passed between steps.

Example:
You receive a remote_file_id from a message event and want to look up its details before deciding whether to download or forward it.


Properties

Display Name Type Description
File ID String Identifier of the Remote file to download (required).
  • File ID: The unique identifier (remote_file_id) of the remote file you wish to query. This must be provided and can typically be obtained from previous Telegram API responses or events.

Output

The output will be a JSON object containing the metadata and information about the requested remote file. The structure depends on Telegram's API response for the getRemoteFile method, but commonly includes fields such as:

{
  "id": "string",                // Unique file identifier
  "unique_id": "string",         // Persistent unique file ID
  "size": 12345,                 // File size in bytes (if available)
  "expected_size": 12345,        // Expected file size (if available)
  "local": { ... },              // Local file info (if applicable)
  "remote": { ... },             // Remote file info (including remote_file_id)
  // ...other Telegram file properties
}
  • The exact fields may vary depending on the file and Telegram's API version.
  • No binary data is returned by this operation; only metadata is provided.

Dependencies

  • External Service: Requires access to the Telegram API via the TelePilot integration.
  • Credentials: You must configure valid telePilotApi credentials in n8n, including apiId, apiHash, and phoneNumber.
  • n8n Configuration: Ensure the TelePilot node is properly installed and configured in your n8n instance.

Troubleshooting

Common Issues:

  • Invalid File ID: If the provided File ID does not exist or is incorrect, the node may return an error or an empty result.
  • Session Not Logged In: If your Telegram session is not authenticated, you may see errors prompting you to log in again.
  • API Errors: Network issues or Telegram-side problems may cause failures.

Error Messages & Resolutions:

  • "Please login: https://telepilot.co/login-howto"
    Resolution: Re-authenticate your Telegram account using the instructions provided.
  • "Session was closed or terminated. Please login again: https://telepilot.co/login-howto"
    Resolution: Your session expired; follow the login process again.
  • Other errors: Check the error message for clues (e.g., invalid credentials, network issues) and verify your input parameters.

Links and References


Discussion