Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node integrates with Telegram via the TelePilot API, enabling automation of various Telegram actions. Specifically, for the Message resource and Delete Messages operation, it allows users to delete one or more messages from a specified chat. This can be useful in scenarios such as moderating group chats, cleaning up message histories, or automating message management workflows.

For example, you might use this node to automatically delete spam messages identified by another process or to remove outdated notifications from a chat.

Properties

Name Meaning
Chat ID The identifier of the chat where the messages to be deleted are located.
Message IDs Comma-separated list of message identifiers that should be deleted.
Delete for All Users? Boolean flag indicating whether the messages should be deleted for all users (true) or only locally (false).

Output

The output is a JSON array containing the result of the delete operation returned by the TelePilot client. Typically, this will include confirmation details about the deletion status of the specified messages.

No binary data output is produced by this operation.

Dependencies

  • Requires an active Telegram API session authenticated via an API key credential.
  • Depends on the TelePilot Node Connection Manager to manage Telegram client sessions.
  • The node requires proper credentials configured in n8n to authenticate with the Telegram API.
  • The Telegram account must be logged in and authorized; otherwise, the node will throw errors prompting re-login.

Troubleshooting

  • Common Issues:

    • Attempting to delete messages without a valid Telegram session will cause errors.
    • Providing invalid or non-existent chat or message IDs will likely result in failure or no action.
    • If the Telegram session has been closed or terminated, the node will prompt to log in again.
  • Error Messages:

    • "Session was closed or terminated. Please login again: https://telepilot.co/login-howto"
      Indicates the Telegram client session is no longer valid. Resolve by re-authenticating using the login flow.
    • "Please login: https://telepilot.co/login-howto"
      Means the node cannot perform the operation because the Telegram account is not logged in. Follow the linked guide to authenticate.
    • Errors related to unauthorized access typically mean the API credentials are invalid or expired.

Links and References

Discussion