Actions55
- Session Actions
- Message Actions
- Chat Actions
- Contact Actions
- Group Actions
- Webhook Actions
- Status Actions
Overview
The node provides automation capabilities for WhatsApp using the WAHA API, enabling management of chats, messages, sessions, contacts, groups, and webhooks. Specifically, the Archive Chat operation under the Chat resource allows users to archive a specific WhatsApp chat by its ID within a given session.
This node is beneficial in scenarios where you want to programmatically organize or clean up your WhatsApp interface by archiving chats automatically based on certain triggers or workflows. For example, after completing a customer support conversation, you might archive the chat to keep the active chat list tidy.
Properties
| Name | Meaning |
|---|---|
| Session Name | The name of the WhatsApp session to use (defaults to the credential's default session). |
| Chat ID | The unique identifier of the WhatsApp chat to archive (e.g., phone number with @c.us or group ID with @g.us). |
| Additional Fields | Optional extra parameters; for Archive Chat specifically, no additional fields are used. |
Output
- The output JSON contains the response from the WAHA API after attempting to archive the specified chat.
- The structure typically includes confirmation of the archive action or error details if the operation failed.
- No binary data is output by this operation.
Example output snippet:
{
"success": true,
"message": "Chat archived successfully",
"chatId": "5511999999999@c.us"
}
Dependencies
- Requires an active WAHA API credential with a valid base URL and API key.
- Optionally uses an additional API key credential for subscription validation via the n8n Tools API.
- The node sends HTTP requests to the WAHA API endpoints corresponding to the selected operation.
- Proper configuration of the WhatsApp session is necessary to perform chat operations.
Troubleshooting
- Invalid Credentials: If the WAHA API key or session name is incorrect, the node will fail. Verify credentials and session names.
- Unauthorized Errors: The node validates subscription via the n8n Tools API. Unauthorized errors indicate invalid or expired API keys.
- Unknown Operation or Resource: Selecting an unsupported operation or resource will throw an error. Ensure the correct combination is chosen.
- Chat Not Found: Providing an incorrect or non-existent chat ID will result in failure to archive. Confirm the chat ID format and existence.
- Network Issues: Connectivity problems to the WAHA API endpoint can cause request failures. Check network access and API availability.
Links and References
- WAHA API Documentation (replace with actual URL)
- WhatsApp Chat IDs Format
- n8n Documentation - Creating Custom Nodes