Actions29
- Chat Actions
- Group Actions
- Instance Actions
- Message Actions
- Webhook Actions
Overview
This node operation allows you to delete a specific WhatsApp message that was sent by your own WhatsApp instance. It targets messages where the sender is "fromMe" (i.e., messages sent by your account). The deletion requires identifying the message precisely using a message key object and the message timestamp.
This operation is useful when you want to programmatically remove messages you have sent, for example:
- Correcting mistakes by deleting an erroneous message.
- Removing sensitive information sent by mistake.
- Managing chat history cleanup automatically.
Properties
| Name | Meaning |
|---|---|
| To (Contact) | The WhatsApp contact identifier where the message should be deleted. Format must be phone_number@s.whatsapp.net (e.g., 551199999999@s.whatsapp.net). |
| Key (JSON) | A JSON object representing the message key used to identify the message to delete. It must include: remoteJid (the chat/contact ID), fromMe (must be true), and id (the unique message ID). |
| Message Timestamp | The Unix timestamp (in seconds) of the message to delete. This helps pinpoint the exact message in case of multiple similar messages. |
| Information | A notice explaining that this operation deletes a specific message sent by your instance using the message key and timestamp. It emphasizes that only messages sent by your instance (fromMe: true) can be deleted here. |
Output
The output of this operation is a JSON object indicating the result of the delete action. Typically, it will confirm whether the deletion was successful or provide error details if it failed.
If the node supports binary data output for other operations, this particular operation does not output binary data; it focuses on JSON responses related to message deletion status.
Dependencies
- Requires an active connection to the MegaAPI WhatsApp service.
- Needs valid API credentials configured in n8n with appropriate host and token for authorization.
- The node uses the MegaAPI backend to perform WhatsApp message deletions.
Troubleshooting
Common issues:
- Incorrect format of the "To (Contact)" property may cause failures. Ensure the contact string matches the required pattern.
- Providing an incorrect or incomplete message key JSON object will prevent the node from locating the message.
- Using a timestamp that does not match the message's actual sending time may cause the deletion to fail.
- Attempting to delete messages not sent by your instance (
fromMemust be true) will not work with this operation.
Error messages:
"Unknown chat operation: deleteMessageFromMe": Indicates the operation name might be misspelled or unsupported.- Errors related to authorization usually mean the API token or host configuration is invalid or expired.
- If the message cannot be found, the API may return an error indicating the message key or timestamp is incorrect.
Resolution tips:
- Double-check all input fields for correct formatting.
- Verify API credentials and connectivity.
- Confirm the message key and timestamp correspond exactly to the message you intend to delete.
- Use the node’s error output to debug and adjust inputs accordingly.
Links and References
- WhatsApp Message Deletion Concepts
- MegaAPI WhatsApp Service Documentation (generic reference, replace with actual if available)
- n8n Documentation on Custom Nodes