Actions148
- Chats Actions
- Chat Contacts Actions
- Chat Messages Actions
- Chat Files Actions
- Files Actions
- Team Actions
- Labels Actions
- Departments 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
Overview
This node interacts with the SparkBot WhatsApp API to update labels on a specific chat associated with a WhatsApp number. It allows users to manage chat labels by replacing all existing labels, adding/updating labels (upsert), or removing specified labels from a chat.
Common scenarios include:
- Organizing chats by tagging them with relevant labels for easier filtering and management.
- Updating chat metadata dynamically based on conversation context or workflow triggers.
- Removing outdated or irrelevant labels to keep chat categorization accurate.
Practical example:
- Automatically add a "Support" label to incoming chats routed to a support team.
- Remove a "Pending" label once an issue is resolved in the chat.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the WhatsApp number to which the chat belongs. This identifies the device/account. |
| Chat ID | The unique identifier of the chat to update labels on (e.g., user chat or group chat ID). |
| Labels | One or more labels to set on the chat. |
| Update Type | How to update the labels: - Replace All: Replace all existing labels with the provided ones. - Add/Update (Upsert): Add new labels or update existing ones. - Remove Only: Remove the specified labels only. |
Output
The node outputs JSON data representing the result of the label update operation on the chat. This typically includes confirmation of the updated labels or status information returned by the SparkBot API.
No binary data output is involved.
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 registered and active within the SparkBot system.
Troubleshooting
- Invalid Chat ID: If the chat ID does not exist or is malformed, the API may return an error. Verify the chat ID format (e.g.,
447362053576@c.usfor user chats). - Unauthorized Access: Missing or invalid API key credentials will cause authentication failures. Ensure the API key is correctly configured in n8n credentials.
- Labels Format Issues: Labels should be provided as strings; incorrect formatting or empty values might cause errors.
- Update Type Misuse: Using "Remove Only" without specifying existing labels may have no effect. Confirm that labels to remove actually exist on the chat.
- Device Not Found: The WhatsApp number (device) must be valid and loaded via the node's options. If the device is not found, the operation will fail.
Links and References
- SparkBot WhatsApp API Documentation (generic link, replace with actual if available)
- n8n documentation on Creating Custom Nodes
- WhatsApp chat ID formats and usage guidelines (refer to WhatsApp Business API docs)