Actions17
Overview
This node integrates with the Z-API WhatsApp service to perform various messaging-related operations. Specifically, the "Remove Label" operation under the "Message" resource allows users to remove a label (tag) from a WhatsApp chat or group identified by a phone number or group ID. This is useful for managing chat organization and categorization dynamically, such as unmarking conversations that no longer require special attention.
Practical examples:
- Automatically removing an "important" label from a customer chat after their issue is resolved.
- Clearing tags from group chats when they are no longer relevant.
- Managing chat labels programmatically in bulk workflows.
Properties
| Name | Meaning |
|---|---|
| Instance | Your Z-API instance ID used to identify your WhatsApp API instance. |
| Token | Your Z-API token for authenticating API requests. |
| Client Token | Your Z-API client token for additional authentication header required by the API. |
| Phone | The phone number or group ID from which the label should be removed. |
| Tag | The label/tag name to remove from the specified chat or group. |
Output
The output is a JSON object representing the response from the Z-API server after attempting to remove the label. It typically contains status information about the success or failure of the label removal request.
No binary data is output by this operation.
Example output structure (simplified):
{
"success": true,
"message": "Label removed successfully"
}
Dependencies
- Requires access to the Z-API WhatsApp service.
- Needs valid credentials: instance ID, token, and client token.
- The node makes HTTP PUT requests to the Z-API endpoints.
- No additional environment variables or n8n configurations beyond standard credential setup are required.
Troubleshooting
Common issues:
- Invalid or expired tokens leading to authentication errors.
- Incorrect phone number or group ID format causing the API to reject the request.
- Attempting to remove a label that does not exist on the chat may result in an error or no-op response.
- Network connectivity issues preventing communication with the Z-API service.
Error messages:
- Authentication failures: Check that the instance ID, token, and client token are correct and active.
- "The operation 'remove-label' is not supported for resource 'messages'!": This indicates a misconfiguration in the node parameters; ensure the resource is set to "messages" and operation to "remove-label".
- HTTP errors from the API: Review the API response message for details and verify input parameters.
Resolution tips:
- Double-check all credential values.
- Validate phone/group IDs conform to expected formats.
- Use the "get-labels" operation to confirm existing labels before attempting removal.
- Enable "Continue On Fail" in the node settings to handle errors gracefully in workflows.
Links and References
- Z-API WhatsApp Official Documentation
- Z-API WhatsApp API Reference
- n8n HTTP Request Node Documentation (for understanding underlying HTTP calls)