Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node enables interaction with Telegram through the TelePilot API, acting as a personal assistant for managing Telegram chats and messages. Specifically, the "Delete Messages" operation under the "Message" resource allows users to delete one or more messages from a specified chat. It supports deleting messages either just for the user or for all participants in the chat.

Common scenarios where this node is beneficial include:

  • Automating cleanup of messages in group or private chats.
  • Removing sensitive or outdated messages programmatically.
  • Managing message history in bots or integrations that require message moderation.

Example: Automatically delete a batch of messages by their IDs from a specific chat after processing them.

Properties

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

Output

The node outputs an array of JSON objects representing the result of the delete operation. Typically, this includes confirmation or status information returned by the Telegram API about the deletion request.

No binary data output is involved in this operation.

Dependencies

  • Requires an active Telegram API authentication token configured in the node credentials.
  • Depends on the TelePilot Node Connection Manager to handle Telegram client sessions.
  • The Telegram account must be logged in and authorized; otherwise, the node will throw errors prompting re-login.

Troubleshooting

  • Error: "Session was closed or terminated. Please login again"
    This indicates the Telegram session has expired or been closed. Resolve by re-authenticating using the login flow described at https://telepilot.co/login-howto.

  • Error: "Please login"
    The node cannot perform operations without a valid Telegram session. Use the login commands or nodes to authenticate first.

  • Invalid Chat ID or Message IDs
    Ensure the chat ID and message IDs are correct and accessible by the authenticated Telegram account.

  • Deleting messages for all users may fail if permissions are insufficient
    Verify that the Telegram account has rights to delete messages for all participants in the chat.

Links and References

Discussion