Actions148
- 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
- Send messages Actions
- Outbound Messages Actions
- WhatsApp Numbers Actions
- Groups Actions
- Channels Actions
Chat Contacts → Update Contact Metadata
AI-generatedOverview
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
- SparkBot WhatsApp API Documentation (general reference for API capabilities)
- n8n Documentation on Creating Custom Nodes
- Best practices for managing WhatsApp contacts and metadata in SparkBot environments.