Actions35
- Account Actions
- Canned Response Actions
- Contact Actions
- Conversation Actions
- Inbox Actions
- Label Actions
- Message Actions
- Team Actions
- Webhook Actions
Overview
This node interacts with the Chatwoot API to perform operations related to contacts within a specified account. The Search operation for the Contact resource allows users to find contacts by searching across multiple fields such as name, identifier, email, or phone number. It supports sorting the search results by various attributes.
Typical use cases include:
- Quickly locating a contact in a large customer database by partial or full matches on email, phone number, or name.
- Integrating contact search functionality into automated workflows, e.g., to enrich data or trigger follow-up actions based on contact information.
- Sorting search results to prioritize contacts by recent activity or alphabetically.
Example: Searching for all contacts containing "john@example.com" in their email and sorting them by name ascending.
Properties
| Name | Meaning |
|---|---|
| Account ID | The numeric ID of the Chatwoot account where the contacts reside. |
| Search Query | The search term used to find contacts by matching against name, identifier, email, or phone number. |
| Sort By | Attribute to sort the search results by. Options: Email (A-Z), Email (Z-A), Last Activity (Newest), Last Activity (Oldest), Name (A-Z), Name (Z-A), Phone Number (A-Z), Phone Number (Z-A). Default is Name (A-Z). |
| Continue on Fail | Whether to continue executing subsequent items if this operation fails (boolean). |
Output
The output is an array of JSON objects representing the contacts that match the search query. Each object corresponds to one contact and contains all the contact's details as returned by the Chatwoot API.
The structure of each contact JSON includes fields like:
id: Contact unique identifiername: Contact's full nameemail: Contact's email addressphone_number: Contact's phone numberidentifier: Unique identifier string for the contact- Other metadata fields as provided by Chatwoot
No binary data is output by this operation.
Dependencies
- Requires an active connection to the Chatwoot API via an API key credential configured in n8n.
- The node uses the base URL from the credential configuration to make HTTP requests.
- The user must provide a valid Account ID to scope the search within the correct Chatwoot account.
Troubleshooting
Common issues:
- Invalid or missing Account ID will cause the API request to fail.
- Incorrect or expired API credentials will result in authentication errors.
- Network connectivity problems can prevent successful API calls.
- Providing an empty or invalid search query may return no results or errors.
Error messages:
- Authentication errors typically indicate invalid API keys; verify and update credentials.
- 404 Not Found errors may mean the Account ID does not exist or the endpoint URL is incorrect.
- Rate limiting errors from Chatwoot API require waiting before retrying or adjusting usage patterns.
Resolution tips:
- Ensure the Account ID is correct and exists in your Chatwoot instance.
- Confirm API credentials are valid and have necessary permissions.
- Use the "Continue on Fail" option to handle errors gracefully in batch executions.