Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

The Search Public Chats (Search in Username, Title) operation of the "Telegram CoPilot" n8n node allows users to search for public Telegram chats by matching a query string against both the username and title of available public chats. This is useful for discovering groups, channels, or supergroups relevant to a specific topic or keyword.

Common scenarios:

  • Finding public Telegram groups or channels related to a particular interest or community.
  • Automating workflows that need to look up and interact with public chats based on dynamic user input.
  • Building bots or integrations that recommend or analyze public chat spaces.

Practical example:
A user wants to find all public Telegram channels about "machine learning". By providing "machine learning" as the query, this node will return a list of matching public chats.


Properties

Display Name Type Description
Query String Query used to search public chats by looking in their username and title. Required property.

Output

The output is an array of objects, each representing a public chat that matches the search query. Each object contains details about a public chat. The exact structure depends on the Telegram API response, but typically includes fields such as:

{
  "id": <number>,
  "type": { ... },
  "title": "<string>",
  "username": "<string>",
  "photo": { ... },
  "description": "<string>",
  ...
}
  • id: Unique identifier for the chat.
  • type: Object describing the type of chat (e.g., group, channel).
  • title: The display name/title of the chat.
  • username: The public username of the chat (if available).
  • photo: Information about the chat's photo/avatar.
  • description: A description of the chat (if available).

Additional fields may be present depending on the Telegram API.


Dependencies

  • External Service: Requires access to the Telegram API via the TelePilot integration.
  • Credentials: You must configure the telePilotApi credential in n8n, which includes your Telegram API ID, API Hash, and phone number.
  • n8n Configuration: No special environment variables are required beyond standard credential setup.

Troubleshooting

Common issues:

  • Not logged in: If the Telegram account is not authenticated, the node will throw an error instructing you to log in using the ChatTrigger node and follow the login guide.
  • Invalid credentials: Incorrect or expired API credentials will prevent the node from accessing Telegram services.
  • No results: If the query does not match any public chats, the returned array will be empty.

Error messages and resolutions:

  • "Please login: https://telepilot.co/login-howto": Indicates that your session is not active. Re-authenticate using the provided guide.
  • "Session was closed or terminated. Please login again: https://telepilot.co/login-howto": Your session has expired or was closed. Re-login as above.
  • Other errors may be passed through from the Telegram API; check the error message for details.

Links and References


Discussion