Actions100
- 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
Overview
The Contact Search operation in the Contacts resource allows you to search for contacts within a specified account using various criteria such as name, identifier, email, or phone number. This node is useful when you need to retrieve and filter contact information from your ChatWoot instance, for example:
- Finding a contact by their email address or phone number.
- Listing all contacts that match a specific search term.
- Paginating through large sets of contacts with sorting options.
Practical examples:
- Automate lead lookups by searching for contacts based on incoming data.
- Build workflows that trigger actions when a contact matching certain criteria is found.
Properties
| Display Name | Type | Description |
|---|---|---|
| Account Id | Number | The numeric ID of the account. This is required to specify which account's contacts to search. |
| Q | String | Search term used to match contact name, identifier, email, or phone number. |
| Sort | Options | Attribute by which the results should be sorted. Options include Name, Email, Phone Number, Last Activity At (ascending/descending). |
| Page | Number | The page number for paginated results. Default is 1. |
Output
The output will be a JSON object containing the list of contacts that match the search criteria. Each item in the output array represents a contact and typically includes fields such as:
{
"id": 123,
"name": "John Doe",
"email": "john@example.com",
"phone_number": "+1234567890",
"identifier": "unique-id",
"last_activity_at": "2024-06-01T12:34:56Z",
// ...other contact fields
}
Note: The exact structure may vary depending on the ChatWoot API response.
Dependencies
- External Service: Requires access to a ChatWoot instance with API enabled.
- API Key/Credentials: You must configure n8n credentials named
chatwootApiwith the appropriate API key and base URL (url). - n8n Configuration: Ensure the node has access to the internet and can reach your ChatWoot server.
Troubleshooting
Common Issues:
- Invalid Credentials: If the API key or URL is incorrect, authentication errors will occur. Double-check your
chatwootApicredentials in n8n. - Missing Required Fields: The
Account Idproperty is required. Omitting it will result in an error. - No Results Found: If the search query does not match any contacts, the output will be an empty array.
- Pagination Issues: If the
Pagevalue exceeds available pages, the output may be empty.
Error Messages:
"401 Unauthorized": Check your API key and permissions."404 Not Found": Verify the account ID and endpoint URL."400 Bad Request": Ensure all required parameters are provided and valid.