WaliChat icon

WaliChat

Interact with WaliChat WhatsApp API

Actions148

Chat Contacts → Update Contact Metadata

AI-generated

Overview

This node interacts with the WaliChat WhatsApp API, specifically focusing on managing chat contacts. The "Update Contact Metadata" operation allows users to update or add custom metadata key-value pairs for a specific WhatsApp contact associated with a given WhatsApp number (device). This is useful for enriching contact information with additional context or attributes that can be used in workflows, segmentation, or personalized messaging.

Practical examples:

  • Adding tags or labels to contacts for targeted marketing campaigns.
  • Storing customer preferences or status flags as metadata.
  • Tracking interaction history or custom identifiers relevant to business logic.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) from which the contact is managed.
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 update or add for the contact.

The Metadata property supports multiple entries, each consisting of:

  • Key: An alphanumeric string (including underscores) serving as the metadata key.
  • Value: A string value up to 300 characters associated with the key.

Output

The node outputs JSON data representing the result of the metadata update operation for each input item. The exact structure depends on the WaliChat API response but generally includes confirmation of updated metadata fields or error details if the update failed.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active connection to the WaliChat WhatsApp API via an API key credential configured in n8n.
  • The node relies on internal methods to load available WhatsApp numbers (devices) dynamically.
  • Proper permissions and valid WhatsApp number IDs are necessary to perform contact metadata updates.

Troubleshooting

  • Common issues:

    • Invalid or missing WhatsApp number ID (device): Ensure the selected device exists and is correctly loaded.
    • Incorrect Contact ID format: Must follow WhatsApp contact ID conventions (e.g., including @c.us).
    • Metadata keys must be alphanumeric or underscore only; invalid characters will cause errors.
    • Metadata values exceeding 300 characters may be rejected by the API.
  • Error messages:

    • Authentication errors indicate problems with the API key credential setup.
    • Validation errors typically relate to malformed input parameters such as contact ID or metadata keys/values.
    • Network or API downtime errors require checking connectivity and WaliChat service status.

To resolve errors, verify all input parameters, ensure credentials are valid, and consult WaliChat API documentation for limits and constraints.

Links and References

Discussion