Actions26
- Chat Actions
- File Actions
- Group Actions
- Message Actions
- User Actions
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 cleaning up chat histories, removing sensitive information, or managing message content programmatically.
Practical examples:
- Automatically deleting outdated notifications or reminders from a group chat.
- Removing messages containing errors or incorrect information after sending.
- Moderation bots that delete inappropriate messages based on certain triggers.
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 to delete within the specified chat. |
| Delete for All Users? | Boolean flag indicating whether the messages should be deleted for all users (true) or only for the current user (false). |
Output
The output is a JSON array containing the response from the Telegram API after attempting to delete the specified messages. The exact structure depends on the Telegram API's response but generally includes confirmation of deletion or error details if the operation failed.
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 Node Connection Manager to handle client sessions and API calls.
- The node requires proper login/authentication to Telegram before performing operations; otherwise, it will throw errors prompting re-login.
Troubleshooting
Common Issues:
- Attempting to delete messages without being logged in will result in errors instructing to log in first.
- Providing invalid or non-existent chat IDs or message IDs will cause the operation to fail.
- If the 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 session is no longer valid; re-authentication is required."Please login: https://telepilot.co/login-howto"
Means the node cannot perform the action because the Telegram account is not authenticated.- Errors related to unauthorized access typically mean the API credentials are invalid or expired.
To resolve these issues, ensure the Telegram account is properly logged in using the login flow provided by the TelePilot integration and verify that chat and message IDs are correct.
Links and References
- TelePilot Login Guide — Instructions for authenticating your Telegram account.
- Telegram Bot API Documentation (general reference): https://core.telegram.org/bots/api#deleteMessage