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 accounts. Specifically, the Search Public Chats (Search in Username, Title) operation under the Chat resource allows users to search for public Telegram chats by querying usernames and chat titles.

Common scenarios where this node is beneficial include:

  • Finding relevant public Telegram groups or channels based on keywords.
  • Automating discovery of communities or topics of interest.
  • Integrating Telegram chat search into workflows that require dynamic chat selection.

For example, a user can input a search query like "technology" to retrieve a list of public chats whose usernames or titles contain that term, then use the results to join or interact with those chats programmatically.

Properties

Name Meaning
Query Text string used to search public chats by looking in their username and title. Example: "news", "sports", "music"

Output

The output is an array of JSON objects representing the search results returned from the Telegram API. Each object corresponds to a public chat matching the query, containing details such as chat ID, username, title, and other metadata provided by the Telegram API.

The node does not output binary data for this operation.

Example output structure (simplified):

[
  {
    "id": 123456789,
    "username": "examplechat",
    "title": "Example Chat Group",
    "type": "supergroup",
    "is_channel": false,
    ...
  },
  ...
]

Dependencies

  • Requires a valid Telegram API authentication credential (an API key credential) configured in n8n.
  • Uses the TelePilot Node Connection Manager internally to manage Telegram client sessions.
  • The node depends on the Telegram API being accessible and the authenticated account having permission to perform public chat searches.

Troubleshooting

  • Error: "Please login" or "Unauthorized"
    This indicates the Telegram session is not authenticated or has expired. Resolve by performing the login operation using the appropriate login flow (e.g., phone number and code) before attempting to search public chats.

  • Empty or no results returned
    Ensure the query string is correctly specified and that there are public chats matching the search terms. Also verify network connectivity and Telegram API availability.

  • Session closed or terminated errors
    If the node reports that the client session was closed, re-authenticate by logging in again. Using the ChatTrigger node together with the login operation is recommended for maintaining active sessions.

  • Rate limiting or API restrictions
    Telegram may limit the frequency of requests. If you encounter rate limit errors, implement delays or retries in your workflow.

Links and References

Discussion