Actions16
Overview
This node allows you to manage WhatsApp messages via a WebSocket API (WSAPI). Specifically, the Delete For Me operation deletes a message only from your own view in a chat, without removing it for other participants. This is useful when you want to clean up your chat history or hide certain messages locally without affecting others.
Practical scenarios include:
- Removing clutter or sensitive messages from your personal chat view.
- Managing message visibility on your device while preserving conversation integrity for others.
- Automating personal message management workflows in WhatsApp integrations.
Properties
| Name | Meaning |
|---|---|
| Message ID | ID of the message to delete (required) |
| Chat ID | WhatsApp ID of the chat containing the message (required) |
| Message Sender ID | WhatsApp ID of the sender of the message (required) |
| Is From Me | Boolean indicating if the message was sent by you (required) |
| Message Time | Timestamp when the message was sent (approximate acceptable) (required) |
Output
The node outputs JSON data representing the response from the WSAPI after attempting to delete the message for you. The structure typically includes confirmation of the deletion or error details if the operation failed.
No binary data output is produced by this operation.
Example output JSON snippet:
{
"status": "success",
"messageId": "0123456789ABCDEF",
"chatId": "1234567890@s.whatsapp.net"
}
Or in case of failure:
{
"error": "Message not found or cannot be deleted for me"
}
Dependencies
- Requires an active connection to the WSAPI service managing WhatsApp messaging.
- Needs an API key credential and instance identifier configured in n8n credentials for authentication.
- The node sends HTTP PUT requests to the WSAPI endpoint
/messages/{messageId}/delete/forme.
Troubleshooting
Common issues:
- Incorrect or missing Message ID, Chat ID, or Message Sender ID will cause the operation to fail.
- If
Is From Meis set incorrectly, the WSAPI might reject the request because the message does not belong to you. - The timestamp (
Message Time) should be accurate enough; otherwise, the WSAPI may not locate the message properly.
Error messages:
"Message not found or cannot be deleted for me": Verify that the message exists, belongs to you ifIs From Meis true, and that IDs are correct.- Authentication errors: Ensure the API key and instance ID credentials are valid and have proper permissions.
- Network or timeout errors: Check connectivity to the WSAPI service.
Links and References
- WhatsApp WSAPI Documentation (generic reference, replace with actual WSAPI docs if available)
- n8n documentation on HTTP Request Node for understanding underlying HTTP calls
- WhatsApp official Business API documentation for context on message operations