Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Message → Delete Messages

AI-generated

Overview

This node operation deletes specified messages from a Telegram chat. It is useful for managing and cleaning up chat histories by removing unwanted or outdated messages. For example, a user can delete multiple messages in a group chat or personal chat by providing their message IDs and the chat ID.

Use Case Examples

  1. Deleting spam messages from a group chat by specifying their message IDs.
  2. Removing outdated notifications from a personal chat.

Properties

Name Meaning
Chat ID The identifier of the chat from which messages will be deleted.
Message IDs Comma-separated list of message identifiers to be deleted from the chat.
Delete for All Users? Boolean flag indicating whether the messages should be deleted for all users (revoke) or just for the current user.

Output

JSON

  • message_ids - List of message IDs that were deleted.
  • revoke - Indicates if the messages were deleted for all users.

Dependencies

  • Requires an API key credential for Telegram via the telePilotApi credential.

Troubleshooting

  • Common errors include 'A closed client cannot be reused, create a new Client' which indicates the Telegram session was closed and requires re-login.
  • 'Unauthorized' error means the session is not authenticated and the user must log in again.
  • If the node fails, enabling 'Continue On Fail' allows the workflow to proceed while capturing error details in the output.

Links

Discussion