Actions85
- Instances Actions
- Client Actions
- Message Actions
- Chat Actions
- Contact Actions
- Number Actions
- Group Actions
- Channel Actions
- Label Actions
- Story Actions
Overview
The "Upsert Contact" operation in the Contact resource allows users to create a new contact or update an existing one based on the provided instance ID. This node is useful for synchronizing contact information with an external system, ensuring that contact details such as phone number, first name, and last name are accurately maintained. It also optionally syncs the contact to the device's address book.
Practical examples include:
- Adding new customers or leads into a CRM system.
- Updating existing contact details when changes occur.
- Synchronizing contacts between different platforms or devices automatically.
Properties
| Name | Meaning |
|---|---|
| Id | The unique instance ID of the contact to upsert (required). |
| Phone Number | The phone number of the contact (required). |
| First Name | The first name of the contact (required). |
| Last Name | The last name of the contact (required). |
| Sync To Addressbook | Boolean flag indicating whether to sync the contact to the device's address book. |
Output
The node outputs JSON data representing the result of the upsert operation. This typically includes the updated or created contact details as returned by the API. The output structure will contain fields corresponding to the contact's properties such as id, phone number, first name, last name, and possibly metadata about the sync status.
No binary data output is indicated for this operation.
Dependencies
- Requires an API key credential for authenticating with the WaAPI service.
- The node communicates with the WaAPI endpoint at
https://waapi.app/api/v1. - Proper configuration of the API credentials within n8n is necessary for successful execution.
Troubleshooting
- Common issues:
- Missing or invalid API credentials can cause authentication failures.
- Providing an invalid or non-existent instance ID may result in errors or no updates.
- Incorrectly formatted phone numbers might be rejected by the API.
- Error messages:
- Authentication errors usually indicate problems with the API key; verify and re-enter credentials.
- Validation errors from the API may specify which required fields are missing or malformed.
- Network or timeout errors suggest connectivity issues; check internet access and API availability.
Links and References
- WaAPI Official Documentation (for detailed API usage and contact management)
- n8n Documentation (for general guidance on using custom nodes and credentials)