Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node, named "Telegram CoPilot," provides a comprehensive interface to interact with the Telegram API through various resources and operations. Specifically for the User resource and the Create New Secret Chat operation, it allows creating a new secret chat with a specified user by their user ID.

Common scenarios where this node is beneficial include automating Telegram interactions such as managing users, chats, messages, and files programmatically within workflows. For example, you can automate starting secret chats with users, retrieving user information, or sending messages without manual intervention.

Practical example:

  • Automatically create a new secret chat with a user when a certain event occurs in your system (e.g., a customer support ticket is created), enabling secure private communication.

Properties

Name Meaning
User ID The unique identifier of the user to create a new secret chat with. This is a required string input. Example: "122323"

Output

The output is a JSON array containing the result of the invoked Telegram API method corresponding to the operation. For the Create New Secret Chat operation, the output JSON will contain details about the newly created secret chat object returned by Telegram.

The structure typically includes fields describing the secret chat's properties such as its ID, participants, encryption keys, and other metadata as defined by Telegram's API.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active Telegram API authentication credential (an API key credential) configured in n8n.
  • Depends on the internal TelePilotNodeConnectionManager to manage Telegram client sessions and invoke Telegram API methods.
  • Requires network access to Telegram servers.
  • The node uses the Telegram TDLib under the hood for API calls.

Troubleshooting

  • Session Not Logged In: If the Telegram account session is not logged in or has expired, errors like "Please login: https://telepilot.co/login-howto" may occur. Resolve by performing the login process using the node's login operations.
  • Closed Client Error: Errors stating "A closed client cannot be reused, create a new Client" indicate that the session was closed or terminated. Re-login is required.
  • Unauthorized Error: Indicates invalid or expired credentials; re-authentication is necessary.
  • Invalid User ID: Providing an incorrect or non-existent user ID may cause the operation to fail. Ensure the user ID is valid and accessible.
  • Network Issues: Connectivity problems with Telegram servers can cause timeouts or failures.

Links and References

Discussion