Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node, named "Telegram CoPilot," provides extensive integration with the Telegram messaging platform via its API. It allows users to perform a wide range of Telegram-related operations such as retrieving chat information, sending messages (text, photo, video, audio, files), managing chats and groups, handling user data, and performing custom API requests.

The Get Chat operation under the Chat resource specifically retrieves detailed information about a particular Telegram chat by its ID. This is useful for workflows that need to fetch metadata or status about a chat, such as its type, participants, or settings.

Common scenarios:

  • Fetching chat details before sending messages or performing administrative actions.
  • Automating chat management tasks based on chat properties.
  • Integrating Telegram chat data into other systems or dashboards.

Practical example:
A workflow could trigger when a new message arrives, then use this node's Get Chat operation to retrieve the chat's info and decide whether to send an automated reply or log the chat details externally.


Properties

Name Meaning
Chat ID The unique identifier of the Telegram chat to retrieve information for. This is required.

Output

The output is a JSON object containing the full details of the requested chat as returned by the Telegram API. This typically includes fields such as chat ID, type (private, group, supergroup, channel), title, photo, permissions, and other metadata describing the chat.

No binary data output is associated with this operation.

Example output structure (simplified):

{
  "id": 123456789,
  "type": "supergroup",
  "title": "My Group Chat",
  "photo": { /* chat photo info */ },
  "permissions": { /* chat permissions */ },
  ...
}

Dependencies

  • Requires an API key credential for Telegram API access configured in n8n.
  • Depends on the internal TelePilotNodeConnectionManager to manage Telegram client sessions.
  • No external environment variables beyond the API credentials are needed.

Troubleshooting

  • Error: "Please login" or "Unauthorized"
    Indicates the Telegram session is not authenticated or expired. Resolve by running the login flow using the Login resource or ChatTrigger node as per the guide at https://telepilot.co/login-howto.

  • Error: "Session was closed or terminated"
    The client session has been closed unexpectedly. Re-authenticate to restore connection.

  • Invalid Chat ID
    Ensure the Chat ID provided is correct and accessible by the authenticated Telegram account.

  • Rate Limits or API Errors
    Telegram may throttle requests; handle errors gracefully and retry if necessary.


Links and References

Discussion