Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node enables interaction with Telegram through the TelePilot API, focusing on managing messages within chats. 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 information programmatically.
  • Managing message history as part of larger Telegram bot workflows.

For example, you can specify a chat ID and a list of message IDs to delete those messages from the chat, optionally revoking them for all users so they disappear everywhere.

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 output is a JSON array containing the response from the Telegram API after attempting to delete the specified messages. This typically includes confirmation of deletion status or error details if the operation failed.

No binary data output is produced by this operation.

Dependencies

  • Requires an active Telegram API authentication credential (an API key and associated login).
  • Depends on the TelePilot Node Connection Manager to handle client sessions and API calls.
  • The node expects the Telegram account to be logged in and authorized; otherwise, it will prompt for login or throw errors.
  • No additional external services are required beyond Telegram's API.

Troubleshooting

  • Common Issues:

    • Attempting to delete messages without proper authorization or when the session is not logged in will cause errors.
    • Providing invalid chat IDs or message IDs may result in failure or no action.
    • Deleting messages for all users requires appropriate permissions; otherwise, the operation might fail.
  • Error Messages:

    • "Please login": Indicates the Telegram session is not authenticated. Resolve by performing login via the related login operations.
    • "Session was closed or terminated. Please login again": The client session has expired or been closed; re-login is necessary.
    • Errors related to invalid message or chat IDs usually indicate incorrect input parameters.
    • If the node continues on fail, errors are returned in the JSON output for inspection.

Links and References

Discussion