Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

The node acts as a Telegram client interface, enabling interaction with Telegram chats and messages programmatically. Specifically, the "Open Chat" operation opens a specified chat by its ID, making it active or accessible for further actions within Telegram.

This node is beneficial in automation workflows where you need to programmatically manage Telegram chats, such as opening a chat before sending messages, retrieving chat history, or performing other chat-related operations.

Practical example:

  • Automatically open a chat by its ID when triggered, then send a welcome message or retrieve recent messages for processing.

Properties

Name Meaning
Chat ID The unique identifier of the Telegram chat to open. This is required to specify which chat to open.

Output

The output is a JSON array containing the response from the Telegram API after attempting to open the chat. The structure typically includes details about the chat's state or confirmation that the chat was successfully opened.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating with the Telegram service.
  • Depends on the TelePilotNodeConnectionManager class to manage Telegram client sessions and invoke Telegram API methods.
  • Requires proper login/authentication via phone number and code before performing chat operations.
  • The node uses the Telegram TDLib (Telegram Database Library) under the hood, managed through the connection manager.

Troubleshooting

  • Common issues:

    • Attempting to open a chat without being logged in will result in errors prompting the user to log in first.
    • If the session is closed or terminated, the node throws an error instructing to re-login.
    • Invalid or missing Chat ID will cause the operation to fail.
  • Error messages:

    • "Session was closed or terminated. Please login again: https://telepilot.co/login-howto"
      Indicates the Telegram client session has ended; re-authentication is needed.
    • "Please login: https://telepilot.co/login-howto"
      Means the node is not authenticated; user must perform login steps.
    • "Unauthorized"
      Authentication failed or expired; requires re-login.

Links and References

Discussion