Actions30
- Chat Actions
- Custom Request Actions
- File Actions
- Group Actions
- Message Actions
- User Actions
Overview
This node enables interaction with Telegram through a variety of operations on different resources such as messages, chats, users, and files. 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 current user or for all users in the chat.
Common scenarios where this node is beneficial include:
- Automating message cleanup in group or private chats.
- Removing sensitive or outdated messages programmatically.
- Managing chat content dynamically based on workflow logic.
For example, you could use this node to delete a batch of messages identified by their IDs from a specific chat after processing them, ensuring the chat remains uncluttered.
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 an array of JSON objects representing the result of the delete operation. Each object corresponds to the response from the Telegram API for the deletion request. Typically, it contains confirmation details about the deleted messages.
No binary data output is produced by this operation.
Dependencies
- Requires an active Telegram API authentication token (API key credential) configured in n8n.
- Depends on the TelePilot library and its connection manager to handle Telegram client sessions.
- The node requires proper login/authentication via phone number and code before performing operations.
- No additional external services are needed beyond Telegram's API.
Troubleshooting
- "Please login" errors: Occur if the Telegram session is not authenticated or has expired. Resolve by running the login flow using the ChatTrigger node with the login commands or re-authenticating.
- Session closed or terminated: If the client session is closed unexpectedly, the node will throw an error instructing to log in again.
- Invalid message IDs: Ensure that the message IDs provided exist in the specified chat; otherwise, the Telegram API may return errors.
- Permission issues: Deleting messages for all users requires appropriate permissions. If the bot/user lacks these, the operation may fail.
- Malformed input: The
message_idsmust be a comma-separated string of valid IDs without extra spaces or invalid characters.
Links and References
- Telegram Bot API Documentation (for general understanding of message deletion)
- TelePilot Login Guide — instructions for authenticating the Telegram account used by this node