Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node, named "Telegram CoPilot," integrates with the Telegram API to perform various Telegram-related actions programmatically. Specifically for the User resource and the Create Private Chat operation, it allows creating a private chat with a specified user by their user ID. This can be useful in automation workflows where initiating direct conversations with users is required, such as customer support bots, notification systems, or personal assistants that interact with Telegram users.

Practical example: Automatically create a private chat with a new user who signs up on your platform to send them a welcome message or onboarding instructions.

Properties

Name Meaning
User ID The unique identifier of the Telegram user with whom to create the private chat.
Force Boolean flag indicating whether the creation of the private chat should be forced (true) or not (false).

Output

The node outputs an array of JSON objects representing the result of the invoked Telegram API method. For the "Create Private Chat" operation, the output JSON contains details about the newly created private chat, such as chat identifiers and metadata returned by Telegram.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authenticating with the Telegram API.
  • Uses an internal connection manager to handle Telegram client sessions.
  • Requires proper login/authentication via phone number and code before performing operations.
  • The node depends on the external Telegram API and the TelePilot library for communication.

Troubleshooting

  • Common issues:

    • Attempting to create a private chat without being logged in will cause errors. Users must complete the login process first.
    • If the session is closed or terminated, the node throws an error instructing to log in again.
    • Unauthorized errors indicate invalid or expired credentials requiring re-authentication.
  • Error messages:

    • "Session was closed or terminated. Please login again: https://telepilot.co/login-howto": Indicates the Telegram client session is no longer valid; re-login is needed.
    • "Please login: https://telepilot.co/login-howto": Authentication is missing or failed; follow the login guide.

Following the provided login guide URL (https://telepilot.co/login-howto) helps resolve authentication and session management issues.

Links and References

Discussion