Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

The "Open Chat" operation in the Telegram CoPilot node allows users to programmatically open a specific chat by its ID within their Telegram account session. This node interacts with the Telegram API through a client session managed internally, enabling automation of chat-related actions.

Common scenarios where this node is beneficial include:

  • Automatically opening a chat before sending messages or performing other chat operations.
  • Integrating Telegram chat management into workflows that require dynamic chat access.
  • Preparing a chat context for subsequent message retrieval or interaction.

For example, a user might use this node to open a chat by its ID and then send a message or fetch chat history as part of an automated customer support workflow.

Properties

Name Meaning
Chat ID The unique identifier of the chat to open. This is a required string input.

Output

The node outputs a JSON array containing the response from the Telegram API for the openChat request. The structure typically includes details about the chat state after opening it, such as chat metadata and status.

No binary data output is produced by this operation.

Example output JSON (simplified):

{
  "id": 123456789,
  "title": "Chat Title",
  "type": { /* chat type info */ },
  "is_open": true,
  // ... other chat properties
}

Dependencies

  • Requires a valid Telegram API authentication credential (an API key credential) configured in n8n.
  • Depends on the internal Telegram client session manager to maintain authenticated sessions.
  • The node requires prior login via the "login" resource and operation to establish a session before using chat operations.

Troubleshooting

  • Error: "Please login"
    This indicates that the Telegram session is not authenticated or has expired. Resolve by running the login operation first to authenticate your Telegram account.

  • Error: "Session was closed or terminated"
    The client session was closed unexpectedly. Re-authenticate by logging in again.

  • Invalid Chat ID
    If the provided Chat ID does not exist or is incorrect, the Telegram API may return an error or empty response. Verify the Chat ID is correct.

  • Network or API errors
    Ensure stable internet connectivity and that the Telegram API credentials are valid and have sufficient permissions.

Links and References

Discussion