Actions85
- Instances Actions
- Client Actions
- Message Actions
- Chat Actions
- Contact Actions
- Number Actions
- Group Actions
- Channel Actions
- Label Actions
- Story Actions
Overview
This node interacts with a WhatsApp API service to clear chat messages in a specified chat. It is useful when you want to programmatically delete all messages from a particular chat instance, for example, to reset conversation history or manage storage by removing old messages.
Practical scenarios include:
- Automating chat cleanup in customer support workflows.
- Clearing group or individual chat histories on demand.
- Managing message retention policies in WhatsApp integrations.
Properties
| Name | Meaning |
|---|---|
| Id | The instance ID of the WhatsApp API session or connection to target for clearing messages. |
| Chat Id | The identifier of the chat whose messages will be cleared. Format: <countrycode><number>@c.us for individual chats or @g.us for groups. |
Output
The node outputs JSON data representing the result of the clear chat messages operation. This typically includes confirmation of success or failure and any relevant metadata returned by the WhatsApp API. There is no binary output.
Dependencies
- Requires an active connection to the WhatsApp API service (WaAPI).
- Needs an API key credential configured in n8n to authenticate requests to the WhatsApp API.
- The base URL for the API is
https://waapi.app/api/v1. - The node sends HTTP requests with JSON payloads and expects JSON responses.
Troubleshooting
- Invalid Instance ID or Chat Id: Ensure that the instance ID corresponds to a valid WhatsApp API session and the chat ID is correctly formatted.
- Authentication Errors: Verify that the API key credential is correctly set up and has sufficient permissions.
- Network Issues: Check connectivity to the WhatsApp API endpoint.
- API Rate Limits: If too many requests are sent in a short time, the API might throttle or reject requests.
- Error Responses: The node may return error messages from the API indicating issues such as "chat not found" or "operation not permitted." Review these messages to adjust inputs accordingly.
Links and References
- WhatsApp API Documentation (for detailed API usage and chat management)
- n8n Documentation (for general node usage and credential setup)