Actions38
- Chatbot Actions
- Contact Actions
- Message Actions
- Panel Actions
- Sequence Actions
- Session Actions
Overview
This node interacts with the WTS Chat API to retrieve contact information based on a phone number. Specifically, the "Get By Phone" operation under the "Contact" resource fetches details of a contact using their phone number. This is useful in scenarios where you have a phone number and want to obtain associated contact data from the WTS system, such as tags or custom fields linked to that contact.
Practical examples include:
- Automatically fetching customer details when a phone number is received from an external source.
- Enriching workflows by retrieving contact metadata before sending messages or updating records.
- Integrating phone-based identification into CRM or support automation processes.
Properties
| Name | Meaning |
|---|---|
| Phone Number | The phone number of the contact to retrieve. |
| Include Details | Optional additional data to include with the contact information. Options: Tags, CustomFields |
Output
The output is a JSON object representing the contact data retrieved from the WTS API for the specified phone number. It includes standard contact fields and, optionally, additional details such as:
- Tags: Labels or categories assigned to the contact.
- CustomFields: User-defined fields with extra information about the contact.
If the contact is found, the output will be an array with one item containing the contact's JSON data. If not found or an error occurs, an error is thrown.
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to the WTS Chat API.
- Needs an API key credential configured in n8n for authentication.
- The node uses internal service modules to call the WTS API endpoints.
Troubleshooting
- Invalid or missing phone number: Ensure the "Phone Number" property is correctly filled; otherwise, the API call will fail.
- API authentication errors: Verify that the API key credential is valid and has necessary permissions.
- Contact not found: If no contact matches the phone number, the node may throw an error or return empty data depending on API behavior.
- Include Details options: Selecting "Tags" or "CustomFields" requires that such data exists for the contact; otherwise, those fields may be empty.
Common error messages are wrapped and rethrown as node API errors, providing descriptive messages from the underlying API or validation checks.
Links and References
- WTS Chat API Documentation (general reference)
- n8n documentation on Creating Custom Nodes