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, messages, users, groups, files, and login sessions. Specifically, the "Mark Chat as Unread" operation allows users to toggle whether a particular chat is marked as unread in their Telegram account.

Common scenarios for this node include:

  • Automating message management by marking important chats as unread to revisit later.
  • Managing chat states programmatically in workflows that monitor or respond to Telegram activity.
  • Integrating Telegram chat status updates into broader automation pipelines.

For example, a user could build a workflow that marks certain chats as unread based on keywords detected in incoming messages, ensuring they get notified or reminded to check those conversations.

Properties

Name Meaning
Chat ID The unique identifier of the Telegram chat to operate on.
Mark as Unread? Boolean option to mark the chat as unread (true) or read (false).

Output

The node outputs an array of JSON objects representing the result of the invoked Telegram API method. For the "Mark Chat as Unread" operation, the output JSON contains the response from the Telegram API indicating the success or failure of toggling the unread state of the specified chat.

No binary data output is produced by this operation.

Dependencies

  • Requires an active Telegram API credential (an API key and authentication token) configured in n8n.
  • Depends on the TelePilotNodeConnectionManager class to manage Telegram client sessions and invoke Telegram API methods.
  • The node requires a valid logged-in Telegram session; otherwise, it will throw errors prompting the user to log in using the provided login instructions.

Troubleshooting

  • Session Not Logged In: If the Telegram session is not logged in or has expired, the node throws errors instructing to log in again. Users should follow the login guide at https://telepilot.co/login-howto.
  • Closed Client Error: If the client session was closed unexpectedly, the node suggests re-login to restore the session.
  • Unauthorized Errors: These indicate invalid or expired credentials; re-authentication is required.
  • Invalid Chat ID: Providing an incorrect or non-existent chat ID may cause the operation to fail silently or return an error from Telegram.
  • Ensure the "Chat ID" property is correctly set and corresponds to a chat accessible by the authenticated Telegram account.

Links and References

Discussion