Actions55
- Session Actions
- Message Actions
- Chat Actions
- Contact Actions
- Group Actions
- Webhook Actions
- Status Actions
Overview
This node integrates with the WAHA API to manage WhatsApp chats and perform various chat-related operations. Specifically, the "Delete Chat" operation allows users to delete a specific chat by its WhatsApp Chat ID. This is useful for automating chat management tasks such as cleaning up old or unwanted conversations in WhatsApp sessions.
Practical examples include:
- Automatically deleting chats after a certain workflow completes.
- Managing group or individual chats by removing them programmatically.
- Integrating chat deletion into larger automation flows that handle customer support or messaging cleanup.
Properties
| Name | Meaning |
|---|---|
| Session Name | The name of the WhatsApp session to use. Defaults to the credential's default session name. |
| Chat ID | The unique identifier of the WhatsApp chat to delete. It can be a phone number with @c.us or a group ID with @g.us. This property is required. |
| Additional Fields | A collection of optional fields (not used directly in Delete Chat but available for other operations). |
Output
The output is a JSON object representing the response from the WAHA API after attempting to delete the specified chat. The structure depends on the API response but generally confirms whether the deletion was successful or provides error details.
No binary data is output by this operation.
Example output JSON might look like:
{
"success": true,
"message": "Chat deleted successfully"
}
or in case of failure:
{
"error": "Chat not found or already deleted"
}
Dependencies
- Requires an active WAHA API credential with a valid base URL and API key.
- Requires an API key credential for the n8n Tools API for subscription validation.
- The node uses HTTP requests to communicate with the WAHA API endpoints.
- The WhatsApp session must be active and identified by the provided session name.
Troubleshooting
- Invalid Credentials: If the n8n Tools API key or WAHA API key is invalid, the node will throw errors indicating authentication failure. Verify that the API keys are correct and have the necessary permissions.
- Chat Not Found: If the provided Chat ID does not exist or is incorrect, the API may return an error. Ensure the Chat ID is accurate and formatted correctly (e.g.,
5511999999999@c.us). - Session Issues: If the session name is incorrect or the session is not active, the operation will fail. Confirm the session exists and is connected.
- API Endpoint Errors: Network issues or API downtime can cause request failures. Check connectivity and WAHA API status.
Links and References
- WAHA API Documentation (replace with actual URL if available)
- WhatsApp Chat IDs Format
- n8n HTTP Request Node Documentation