Overview
This node integrates with the Wuzapi WhatsApp API to perform various chat-related operations such as deleting messages, editing messages, downloading media, marking messages as read, reacting to messages, and setting presence indicators (typing/recording). It is useful for automating WhatsApp interactions within workflows, enabling users to manage message content and status programmatically.
For the Delete Message operation specifically, the node allows you to delete a message that you have previously sent by specifying its unique message ID. This can be beneficial in scenarios where you want to remove incorrect or sensitive messages from a chat automatically.
Practical Example
- Automatically delete a message after a certain condition is met (e.g., if it contains outdated information).
- Clean up messages in bulk by deleting specific messages identified by their IDs.
Properties
| Name | Meaning |
|---|---|
| Message ID | ID of the message to delete |
The Message ID property is required for the Delete Message operation and expects the unique identifier of the message you want to delete.
Output
The output of this node is a JSON object representing the response from the Wuzapi WhatsApp API after attempting to delete the specified message. The structure typically includes confirmation details about the deletion request.
Example output JSON structure:
{
"success": true,
"message": "Message deleted successfully",
"Id": "3EB06F9067F80BAB89FF"
}
No binary data is produced for the Delete Message operation.
Dependencies
- Requires an active connection to the Wuzapi WhatsApp API.
- Needs an API key credential configured in n8n to authenticate requests to the Wuzapi service.
- The node uses HTTP POST requests to the
/chat/deleteendpoint of the Wuzapi API.
Troubleshooting
Common Issues:
- Invalid or missing Message ID: Ensure the Message ID provided is correct and corresponds to a message sent by the authenticated user.
- Authentication errors: Verify that the API key credential is correctly set up and has sufficient permissions.
- Network or API downtime: Check connectivity and Wuzapi service status.
Error Messages:
"Message not found": The specified Message ID does not exist or is not accessible; verify the ID."Unauthorized"or"Authentication failed": The API key may be invalid or expired; reconfigure credentials."Failed to delete message": General failure; check API limits or message state (e.g., already deleted).
Resolving these usually involves verifying input parameters, checking credentials, and ensuring the Wuzapi API is operational.
Links and References
- Wuzapi WhatsApp API Documentation (for detailed API endpoints and usage)
- n8n Documentation on Creating Custom Nodes