Actions148
- Chats Actions
- Chat Contacts Actions
- Chat Messages Actions
- Chat Files Actions
- Files Actions
- Team Actions
- Labels Actions
- Departments Actions
- Quick replies Actions
- Queue Actions
- WhatsApp session Actions
- WhatsApp profile Actions
- Business catalog Actions
- Campaigns Actions
- Meeting Links Actions
- User Status Actions
- Webhooks Actions
- Other Actions
- Send messages Actions
- Outbound Messages Actions
- WhatsApp Numbers Actions
- Groups Actions
- Channels Actions
Overview
This node enables deleting WhatsApp chat messages via the SparkBot WhatsApp API integration. It is useful for automating message management tasks such as removing unwanted or sensitive messages from a chat, either locally or for all participants.
Common scenarios include:
- Automatically cleaning up messages after a certain event or time.
- Revoking sent messages within the allowed timeframe to prevent recipients from seeing them.
- Removing system-generated deletion info boxes from chats to keep conversations tidy.
For example, you could use this node to revoke a mistakenly sent message within 60 minutes or force-delete a message locally even if it cannot be revoked on the receiver's side.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the WhatsApp number (device) from which the message will be deleted. |
| Message ID | The unique WhatsApp hexadecimal ID of the message to delete. |
| Options | Additional options controlling how the message is deleted: |
| - Clean Message Box | Delete the message deletion information box from the chat list. |
| - Force Delete Locally | Force message deletion locally even if it cannot be revoked on the receiver side. |
| - Revoke for Everyone | Revoke and delete the message for everyone (only works within 60 minutes of sending). |
Output
The node outputs JSON data representing the result of the delete operation. This typically includes confirmation of successful deletion or details about any errors encountered.
No binary data output is involved.
Dependencies
- Requires an active connection to the SparkBot WhatsApp API service.
- Needs an API key credential configured in n8n for authenticating requests.
- The node depends on internal methods that handle communication with the WhatsApp API through SparkBot.
Troubleshooting
- Message Not Found: If the provided Message ID does not exist or is incorrect, the node may return an error indicating the message was not found. Verify the Message ID carefully.
- Revocation Time Limit: Attempting to revoke a message for everyone beyond 60 minutes of sending will fail. Use the "Force Delete Locally" option if revocation is not possible.
- Permission Issues: Deleting messages may require appropriate permissions on the WhatsApp number/device. Ensure the API key has sufficient rights.
- API Connectivity: Network issues or invalid API credentials can cause failures. Check your API key and network connectivity.
- Continue On Fail: If enabled, the node will continue processing other items even if one fails, returning error details in the output JSON.
Links and References
- SparkBot WhatsApp API Documentation
- WhatsApp Message Deletion Guidelines
- n8n Documentation on Creating Custom Nodes