Actions113
- Accounts Actions
- Account Users Actions
- Agent Bots Actions
- Users Actions
- Inbox API Actions
- Contacts API Actions
- Conversations API Actions
- Messages API Actions
- CSAT Survey Page Actions
- Account Agent Bots Actions
- Agents Actions
- Canned Responses Actions
- Canned Response Actions
- Custom Attributes Actions
- Contacts Actions
- Contact Actions
- Automation Rule Actions
- Help Center Actions
- Conversations Actions
- Conversation Assignment Actions
- Conversation Labels Actions
- Inboxes Actions
- Messages Actions
- Integrations Actions
- Teams Actions
- Custom Filters Actions
- Webhooks Actions
- Reports Actions
Overview
This node interacts with the ChatWoot API to filter contacts within a specified account. It allows users to query contacts based on multiple attribute filters combined with logical operators. This is useful for segmenting contacts by criteria such as name, country code, or other custom attributes.
Practical examples include:
- Retrieving all contacts named "en" located in the US.
- Filtering contacts by any combination of attributes to target specific groups for messaging or analysis.
Properties
| Name | Meaning |
|---|---|
| Account Id | The numeric ID of the account whose contacts you want to filter. |
| Page | The page number of results to retrieve (for pagination). |
| Payload | A JSON array defining filter conditions. Each condition includes: |
- attribute_key: The contact attribute to filter by (e.g., "name", "country_code"). |
|
- filter_operator: The comparison operator (e.g., "equal_to"). |
|
- values: An array of values to match against the attribute. |
|
- query_operator: Logical operator ("AND"/"OR") to combine this filter with others. |
Example payload:
[
{
"attribute_key": "name",
"filter_operator": "equal_to",
"values": ["en"],
"query_operator": "AND"
},
{
"attribute_key": "country_code",
"filter_operator": "equal_to",
"values": ["us"],
"query_operator": null
}
]
Output
The node outputs JSON data representing the filtered list of contacts matching the provided criteria. The structure typically includes contact details such as IDs, names, and other attributes returned by the ChatWoot API.
No binary data output is indicated.
Dependencies
- Requires an API key credential for authenticating with the ChatWoot API.
- The base URL for the ChatWoot instance must be configured in the node credentials.
- The node uses HTTP requests to communicate with the ChatWoot REST API.
Troubleshooting
- Invalid Account Id: If the account ID does not exist or is incorrect, the API will return an error or empty results. Verify the account ID is correct.
- Malformed Payload: The payload must be valid JSON and follow the expected filter format. Invalid JSON or missing required fields can cause request failures.
- Authentication Errors: Ensure the API key credential is valid and has sufficient permissions.
- Pagination Issues: If many contacts exist, use the
Pageproperty to paginate through results. Omitting or misusing pagination may result in incomplete data.
Links and References
- ChatWoot API Documentation (for detailed API endpoints and filter syntax)
- n8n Documentation (for general usage of nodes and credentials)