Actions148
- Send messages Actions
- Outbound Messages Actions
- WhatsApp Numbers Actions
- Groups Actions
- Channels Actions
- Chats Actions
- Chat Contacts Actions
- Chat Messages Actions
- Chat Files Actions
- Team Actions
- Labels Actions
- Departments Actions
- Files Actions
- Quick replies Actions
- Queue Actions
- WhatsApp session Actions
- WhatsApp profile Actions
- Business catalog Actions
- Campaigns Actions
- Meeting Links Actions
- User Status Actions
- Webhooks Actions
- Other Actions
Chat Contacts → Upsert Contact Metadata
AI-generatedOverview
This node interacts with the WaliChat WhatsApp API to manage chat contacts, specifically allowing you to upsert (update or insert) metadata for a contact associated with a WhatsApp number. This is useful when you want to enrich contact information dynamically by adding custom key-value metadata pairs.
Common scenarios include:
- Adding tags or labels to contacts for segmentation.
- Storing additional attributes like customer preferences or statuses.
- Updating contact details programmatically based on external triggers.
For example, you could use this node to add a "loyalty_level" metadata key with value "gold" to a contact after they reach a certain purchase threshold.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the WhatsApp number (device) from which the contact belongs. |
| Contact ID | The unique identifier of the contact in WhatsApp format (e.g., 447362053576@c.us). |
| Metadata | One or more key-value pairs representing metadata to be added or updated for the contact. |
The Metadata property supports multiple entries, each consisting of:
- Key: An alphanumeric string (including underscores) that identifies the metadata field.
- Value: A string value up to 300 characters associated with the key.
Output
The node outputs JSON data representing the result of the upsert operation. Each output item corresponds to one input and contains the response from the WaliChat API regarding the contact metadata update.
If the operation succeeds, the output JSON typically includes confirmation details about the updated contact metadata.
The node does not output binary data.
Dependencies
- Requires an active connection to the WaliChat WhatsApp API.
- Needs an API key credential configured in n8n for authentication with WaliChat.
- The node depends on internal methods that handle the API calls for chat contacts.
Troubleshooting
- Invalid Contact ID: If the contact ID is malformed or does not exist, the API may return an error. Ensure the contact ID follows the correct WhatsApp format (e.g., phone number followed by
@c.us). - Metadata Key Restrictions: Metadata keys must be alphanumeric or underscore characters only. Using invalid characters will cause errors.
- API Authentication Errors: Missing or incorrect API key credentials will prevent successful requests. Verify your API key configuration.
- Exceeded Metadata Length: Values longer than 300 characters may be rejected by the API.
- Network Issues: Connectivity problems can cause timeouts or failures; check network access to the WaliChat API endpoint.
If the node throws errors, enabling "Continue On Fail" allows processing subsequent items without interruption, capturing error messages in the output JSON.
Links and References
- WaliChat Official API Documentation (for detailed API usage and metadata specifications)
- WhatsApp Contact ID Format (explains contact ID conventions)