Actions148
- Send messages Actions
- Outbound Messages Actions
- WhatsApp Numbers Actions
- Groups Actions
- Channels Actions
- Chats Actions
- Chat Contacts Actions
- Chat Messages Actions
- Chat Files Actions
- Team Actions
- Labels Actions
- Departments Actions
- Files 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
Chats → Delete Chat
AI-generatedOverview
This node interacts with the WaliChat WhatsApp API to manage chats associated with WhatsApp numbers. Specifically, the Delete Chat operation under the Chats resource allows users to delete a chat either locally within the system or also on the WhatsApp app itself.
Common scenarios where this node is beneficial include:
- Automating cleanup of chat histories for specific WhatsApp numbers.
- Managing chat lifecycle by removing obsolete or unwanted conversations.
- Integrating chat deletion into broader workflows such as customer support ticket closure or data retention policies.
For example, a user might configure this node to delete a chat from a particular WhatsApp number after a support case is resolved, optionally removing it from the WhatsApp device as well.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the WhatsApp number (device) from which the chat will be deleted. |
| Chat ID | The unique identifier of the chat to delete. Examples: 447362053576@c.us for a user chat, or 44736205357600000000@g.us for a group chat. |
| Delete from WhatsApp | Boolean flag indicating whether to delete the chat on the WhatsApp app/device as well. |
| Force Delete | Boolean flag that forces marking the chat as removed even if deletion on WhatsApp fails. Only applicable if "Delete from WhatsApp" is true. |
Output
The node outputs JSON data representing the result of the delete chat operation. This typically includes confirmation of successful deletion or error details if the operation failed.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the WaliChat WhatsApp API via an API key credential configured in n8n.
- The node depends on the WaliChat API's ability to identify WhatsApp numbers and chat IDs correctly.
- Proper permissions and valid identifiers are necessary to perform deletions.
Troubleshooting
Common Issues:
- Invalid or missing WhatsApp number or chat ID parameters can cause failures.
- Attempting to delete a chat that does not exist or has already been deleted.
- Network or authentication errors with the WaliChat API.
- If "Delete from WhatsApp" is enabled but deletion fails on the WhatsApp side, the "Force Delete" option can be used to mark the chat as removed locally.
Error Messages:
- Errors related to invalid chat IDs usually indicate incorrect formatting or non-existent chats.
- Authentication errors suggest issues with the API key credential setup.
- Failure to delete on WhatsApp may return specific API error messages; enabling "Force Delete" helps bypass this.
Links and References
- WaliChat API Documentation (hypothetical link)
- n8n Documentation on Creating Custom Nodes
- WhatsApp Chat Identifiers format explanation: User chats end with
@c.us, group chats end with@g.us.