Actions39
- Chatbot Actions
- Contact Actions
- Message Actions
- Panel Actions
- Sequence Actions
- Session Actions
Overview
This node integrates with the WTS Chat API to manage contacts, messages, sessions, panels, sequences, and chatbots. Specifically, for the Contact resource with the Get By Phone operation, it retrieves contact information based on a provided phone number. It can optionally include additional details such as tags and custom fields associated with the contact.
This node is useful in scenarios where you want to look up contact details dynamically by phone number within an automation workflow. For example, when receiving a phone number from a form submission or another system, you can fetch the corresponding contact record to personalize communications or trigger further actions.
Practical examples:
- Fetching a contact's profile and tags before sending a targeted message.
- Retrieving custom fields of a contact to enrich CRM data.
- Validating if a phone number exists in the contact database before creating a new contact.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The phone number string used to find the contact. |
| Include Details | Optional array to specify which additional contact details to include in the response. Possible values: Tags, CustomFields. |
Output
The node outputs JSON data representing the contact found by the given phone number. The structure includes standard contact fields plus any requested additional details (tags, custom fields) if specified.
Example output JSON structure:
{
"id": "contact-id",
"name": "Contact Name",
"email": "contact@example.com",
"phonenumber": "+1234567890",
"tags": [ /* array of tag objects if requested */ ],
"customFields": { /* key-value pairs of custom fields if requested */ },
// other contact properties...
}
If no contact matches the phone number, the node will throw an error.
The node does not output binary data for this operation.
Dependencies
- Requires an API key credential for authenticating with the WTS Chat API.
- The node uses the WTS Core Service internally to perform the contact lookup by phone.
- Network access to
https://api.wts.chatis required.
Troubleshooting
Error: Contact not found or empty response
Ensure the phone number is correctly formatted and exists in the WTS Chat system.Invalid API Key or Authentication Errors
Verify that the API key credential is set up correctly and has sufficient permissions.Empty Phone Number Parameter
The phone number input must be provided; otherwise, the node will fail.Include Details Options Not Working
If requesting tags or custom fields returns empty arrays, verify that the contact actually has those details assigned in the source system.
Links and References
- WTS Chat API Documentation (general reference for API endpoints)
- n8n documentation on Creating Custom Nodes
- Best practices for Handling API Credentials in n8n
This summary focuses exclusively on the Contact resource and the Get By Phone operation as requested.