SparkBot icon

SparkBot

Interact with SparkBot WhatsApp API

Actions148

Chat Contacts → Update Contact Metadata

AI-generated

Overview

This node interacts with the SparkBot WhatsApp API to update metadata associated with a specific contact on a given WhatsApp number. It is useful in scenarios where you want to enrich or modify contact information dynamically by adding custom key-value pairs as metadata. For example, you might tag contacts with customer status, preferences, or any other relevant attributes that your business logic requires.

Practical examples include:

  • Adding loyalty program membership details to a contact.
  • Tagging contacts with their preferred language or region.
  • Storing temporary flags or notes for follow-up actions.

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 (e.g., 447362053576@c.us) whose metadata will be updated.
Metadata One or more key-value pairs representing metadata to add or update for the contact. Keys must be alphanumeric or underscores; values can be up to 300 characters.

Output

The node outputs JSON data representing the result of the metadata update operation. This typically includes confirmation of the updated metadata or the updated contact object as returned by the SparkBot API.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating with the SparkBot WhatsApp API.
  • The node depends on the SparkBot service being accessible and properly configured.
  • The "WhatsApp Number" (device) must be valid and linked to the authenticated account.
  • The contact ID must exist within the specified WhatsApp number's contacts.

Troubleshooting

  • Invalid Contact ID: If the contact ID does not exist or is malformed, the API may return an error. Verify the contact ID format and existence.
  • Invalid Metadata Key/Value: Metadata keys must be alphanumeric or underscores only, and values must not exceed 300 characters. Violations may cause errors.
  • Authentication Errors: Ensure the API key credential is correctly set up and has sufficient permissions.
  • Device Not Found: The WhatsApp number (device) ID must be valid and active; otherwise, the operation will fail.
  • API Rate Limits or Network Issues: Temporary failures may occur due to rate limits or connectivity problems. Retrying or checking network status may help.

Links and References

Discussion