Actions28
- Chat Actions
- File Actions
- Group Actions
- Message Actions
- User Actions
Overview
The Delete Messages operation for the Message resource in this custom n8n node allows you to delete one or more messages from a specific Telegram chat. This is useful for automating moderation tasks, cleaning up conversations, or managing content in group chats and channels. For example, you could use this node to automatically remove spam messages, delete outdated information, or implement workflows that require message cleanup after processing.
Properties
Display Name | Type | Description |
---|---|---|
Chat ID | String | The unique identifier of the chat where the messages should be deleted. Example: 122323 . |
Message IDs | String | Comma-separated list of message identifiers to delete. Example: 123,234,345 . |
Delete for All Users? | Boolean | If set to true, the messages will be deleted for all users (not just yourself). |
Output
The output is a JSON object returned by the Telegram API's deleteMessages
method. The structure typically includes:
{
"_": "ok"
}
- If successful, the response contains an acknowledgment (e.g.,
{ "_": "ok" }
). - If there are errors, the output may include error details as provided by the Telegram API.
Dependencies
- External Service: Requires access to the Telegram API via the TelePilot integration.
- Credentials: You must configure and provide valid TelePilot API credentials (
telePilotApi
) in n8n. - n8n Configuration: No additional environment variables are required beyond the credential setup.
Troubleshooting
Common Issues:
- Invalid Chat ID or Message IDs: If the provided chat or message IDs are incorrect, the operation will fail.
- Insufficient Permissions: If your Telegram account does not have permission to delete the specified messages (e.g., not an admin in a group), the deletion will not succeed.
- Session Expired: If your session is closed or unauthorized, you may see errors prompting you to log in again.
Error Messages and Resolutions:
"Session was closed or terminated. Please login again: https://telepilot.co/login-howto"
Resolution: Re-authenticate your TelePilot credentials as instructed."Please login: https://telepilot.co/login-howto"
Resolution: Ensure you are logged in with valid credentials.- Telegram API errors (e.g., permission denied, message not found) will be passed through in the output JSON. Check the error message for guidance.
Links and References
- TelePilot Login Guide
- Telegram Bot API Documentation (for general reference; actual implementation uses TelePilot/TDLib under the hood)
This summary provides a clear understanding of how to use the Delete Messages operation within the n8n TelePilot node, what inputs are required, what output to expect, and how to resolve common issues.