Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node integrates with Telegram via the TelePilot API, enabling automation and interaction with Telegram chats, users, messages, files, groups, and login sessions. Specifically, the Search Public Chat (by Username) operation under the Chat resource allows users to search for a public Telegram chat by its username.

Common scenarios where this node is beneficial include:

  • Automating retrieval of public chat information by username.
  • Integrating Telegram chat data into workflows for monitoring or analytics.
  • Building bots or services that interact with specific public Telegram channels or groups identified by their usernames.

For example, you can use this operation to find a public channel by its username and then fetch its details or join it automatically in subsequent steps.

Properties

Name Meaning
Chat Username The username of the public chat to search for. This should be the exact Telegram username (without '@').

Output

The output is an array of JSON objects representing the result of the searchPublicChat invocation. Each object contains detailed information about the found public chat, such as its ID, title, type, and other metadata provided by the Telegram API.

The structure typically includes fields like:

  • id: Unique identifier of the chat.
  • title: Display name of the chat.
  • username: Username of the chat.
  • Other Telegram-specific chat properties depending on the chat type.

No binary data is output by this operation.

Dependencies

  • Requires a valid Telegram API authentication credential (an API key credential) configured in n8n.
  • Depends on the TelePilot Node Connection Manager to handle Telegram client sessions and API calls.
  • The node uses the TelePilot API internally to communicate with Telegram.

Troubleshooting

  • Error: "Please login"
    This indicates that the Telegram session is not authenticated. You must first perform a login operation using the appropriate login flow (e.g., phone number and code) before using this operation.

  • Error: "Unauthorized" or session closed
    The Telegram session may have expired or been terminated. Re-authenticate by logging in again.

  • Invalid username or no results returned
    Ensure the username is correct and corresponds to a public Telegram chat. Private or invalid usernames will not return results.

  • API rate limits or network issues
    If requests fail intermittently, check your network connection and ensure you are not exceeding Telegram API rate limits.

Links and References

Discussion