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
The node integrates with the SparkBot WhatsApp API to manage labels associated with WhatsApp numbers. Specifically, the Create Label operation allows users to create a new label for a specified WhatsApp number (device). Labels help organize and categorize chats or contacts within the WhatsApp environment, making it easier to filter, search, or automate workflows based on these tags.
Common scenarios where this node is beneficial:
- Automatically tagging incoming chats or contacts with specific labels for better segmentation.
- Organizing customer conversations by categories such as "Support", "Sales", or "VIP".
- Creating color-coded labels to visually distinguish different types of interactions in WhatsApp management tools.
Practical example:
A customer support team wants to tag all chats coming from a particular WhatsApp number with a label named "Priority" colored red. Using this node, they can programmatically create that label and then apply it to relevant chats, streamlining their workflow.
Properties
| Name | Meaning |
|---|---|
| WhatsApp number | The ID of the WhatsApp number (device) for which the label will be created. |
| Label Name | The name of the label to create. |
| Label Color | The color of the label. Options include: Ruby, Tomato, Orange, Sunflower, Bubble, Rose, Poppy, Rouge, Raspberry, Purple, Lavender, Violet, Pool, Emerald, Kelly, Apple, Turquoise, Aqua, Gold, Latte, Cocoa, Iron. |
| Description | A short description of the label (optional). |
Output
The node outputs JSON data representing the result of the label creation operation. This typically includes details about the newly created label such as its ID, name, color, description, and association with the specified WhatsApp number.
If the operation fails and "Continue On Fail" is enabled, the output JSON will contain an error field with the error message.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the SparkBot WhatsApp API.
- Needs an API key credential configured in n8n for authentication with the SparkBot service.
- The WhatsApp number (device) must be valid and accessible via the connected SparkBot account.
Troubleshooting
Common issues:
- Invalid or missing WhatsApp number ID: Ensure the device ID corresponds to a registered WhatsApp number in your SparkBot account.
- Duplicate label names: Some APIs may reject creating labels with names that already exist for the same device.
- Missing required fields: The label name and color are mandatory; omitting them will cause errors.
- Authentication failures: Verify that the API key credential is correctly set up and has sufficient permissions.
Common error messages:
"Invalid device ID": Check that the WhatsApp number ID is correct."Label name already exists": Use a unique label name or update the existing label instead."Authentication failed": Reconfigure the API key credential."Missing required parameter": Ensure all required properties are provided.
Links and References
- SparkBot WhatsApp API Documentation (example placeholder link)
- n8n Documentation on Creating Custom Nodes
- General information on WhatsApp Business API Labels (for conceptual understanding)