Z-API WhatsApp icon

Z-API WhatsApp

Custom operations

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 chat identified by a phone number or group ID. This is useful for managing and organizing chats by dynamically updating their labels based on workflow logic.

Common scenarios include:

  • Automatically removing an "important" or "pending" label from a chat once a certain condition is met.
  • Cleaning up tags after a conversation has been resolved.
  • Managing chat states in customer support workflows.

Example: You have labeled a chat as "urgent" when a customer reported an issue. After resolving it, you use this node to remove the "urgent" label automatically.

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 headers.
Phone The phone number or group ID of the chat from which the label should be removed.
Tag The label/tag name that you want to remove from the specified chat.

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 operation.

No binary data is returned 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 are required beyond the provided credentials.

Troubleshooting

  • Invalid Credentials: If the instance ID, token, or client token are incorrect or expired, the API will reject the request. Verify and update credentials.
  • Phone Number Format: Ensure the phone number or group ID is correctly formatted as expected by Z-API.
  • Label Not Found: Attempting to remove a label that does not exist on the chat may result in an error or no change.
  • Network Issues: Connectivity problems can cause request failures; check network access to the Z-API endpoint.
  • Unsupported Operation Error: If the operation or resource parameters are misconfigured, the node throws an error indicating unsupported operation.

Links and References

Discussion