Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node integrates with Telegram via the TelePilot API, enabling automation of various Telegram chat-related actions. Specifically, for the Chat resource and Open Chat operation, it opens a specified chat by its ID, which can be useful to programmatically mark a chat as active or bring it into focus within the Telegram client context.

Common scenarios include:

  • Automatically opening a chat when certain triggers occur (e.g., new message received).
  • Managing chat states in bulk workflows.
  • Preparing chats for subsequent automated messaging or interaction steps.

Example: Opening a chat before sending a message to ensure the chat is active.

Properties

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

Output

The node outputs an array of JSON objects representing the response from the Telegram API after attempting to open the chat. The structure typically includes details about the chat state or confirmation of the action.

Example output JSON snippet:

{
  "_": "chatOpened",
  "chat_id": "123456789",
  "status": "opened"
}

(Note: The exact fields depend on the Telegram API response.)

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating with the TelePilot Telegram API.
  • The node depends on the TelePilotNodeConnectionManager service to manage Telegram client sessions.
  • Proper login/authentication must be established prior to using this operation; otherwise, the node will throw errors instructing to log in first.
  • No additional environment variables are explicitly required beyond the API credentials.

Troubleshooting

  • Error: "Please login"
    Occurs if the Telegram session is not authenticated. Resolve by running the login operation with phone number authentication before using chat operations.

  • Error: "Session was closed or terminated"
    Indicates that the Telegram client session has expired or been closed. Re-login is necessary.

  • Unauthorized errors
    Usually mean invalid or expired credentials. Verify API key and re-authenticate.

  • Invalid Chat ID
    If the provided chat ID does not exist or is malformed, the Telegram API may return an error. Double-check the chat ID value.

  • Continue On Fail option can be enabled to allow workflow continuation despite errors, returning error details in the output JSON.

Links and References

Discussion