Actions37
- Message Actions
- Media Actions
- Contact Actions
- Group Actions
- Instance Actions
- Webhook Actions
Overview
This node integrates with the Uazapi WhatsApp API to manage and interact with a WhatsApp instance. Specifically, the Instance - Get Chats operation retrieves all active chats from the connected WhatsApp instance. This is useful for scenarios where you want to monitor or analyze ongoing conversations, automate responses based on chat activity, or synchronize chat data with other systems.
Practical examples include:
- Fetching all current chats to display in a dashboard.
- Triggering workflows based on active chat sessions.
- Archiving chat metadata for reporting purposes.
Properties
| Name | Meaning |
|---|---|
| Additional Fields | Optional extra parameters: • Reply to Message ID (string): ID of message to reply to. • Delay (seconds) (number): Delay before sending message. • Disable Link Preview (boolean): Disable link previews in messages. • Mention Users (string): Comma-separated phone numbers to mention. |
Note: For the Get Chats operation under the Instance resource, no specific input properties beyond "Additional Fields" are required.
Output
The output is a JSON object containing the response from the Uazapi endpoint /v1/chats. It represents all active chats associated with the WhatsApp instance. The exact structure depends on the API but typically includes details such as chat IDs, participants, last message timestamps, and chat statuses.
No binary data is returned by this operation.
Example output snippet (conceptual):
{
"chats": [
{
"id": "chat-id-123",
"name": "Contact or Group Name",
"lastMessage": "Last message text or metadata",
"unreadCount": 2,
"participants": ["5511999999999", "5511888888888"]
},
...
]
}
Dependencies
- Requires an active Uazapi WhatsApp API account with valid credentials including:
- An API key credential.
- API URL.
- API token.
- Instance ID.
- The node uses these credentials to authenticate requests to the Uazapi service.
- No additional environment variables are needed beyond the configured credentials in n8n.
Troubleshooting
Common issues:
- Invalid or expired API token or instance ID may cause authentication failures.
- Network connectivity problems can prevent reaching the Uazapi endpoints.
- Insufficient permissions on the WhatsApp instance might restrict access to chat data.
Error messages:
- Authentication errors usually indicate invalid credentials; verify and update your API key and tokens.
- Timeout or connection errors suggest network issues; check your internet connection and firewall settings.
- If the response is empty or missing expected fields, ensure the WhatsApp instance is active and has existing chats.
To handle errors gracefully, enable the "Continue On Fail" option in the node to avoid workflow interruption.
Links and References
- Uazapi Official Documentation (for detailed API reference)
- WhatsApp Business API Overview
- n8n Documentation for general node usage and credential setup guidance