Z-API WhatsApp icon

Z-API WhatsApp

Custom operations

Overview

This node integrates with the Z-API WhatsApp service to send various types of WhatsApp messages and perform related chat actions. Specifically, the Send Contact operation under the Message resource allows users to send a contact card (vCard-like information) to a specified phone number or group on WhatsApp.

Typical use cases include:

  • Automatically sharing contact details during customer support conversations.
  • Sending business cards or team member contacts in bulk messaging campaigns.
  • Integrating CRM systems to share contact info directly via WhatsApp.

Example: A user can configure this node to send a contact named "Tuan Pakya" with phone number "601154272790" to a client’s WhatsApp number or group ID.

Properties

Name Meaning
Instance Your Z-API instance ID used to identify your WhatsApp API session.
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 recipient's phone number or WhatsApp group ID where the contact will be sent.
Contact Name The name of the contact that you want to send.
Contact Phone The phone number of the contact being sent.

Output

The node outputs a JSON object representing the response from the Z-API WhatsApp service after attempting to send the contact. This typically includes status information about the message delivery, any error messages, or metadata returned by the API.

No binary data output is involved in this operation.

Example output structure (simplified):

{
  "status": "success",
  "messageId": "some-message-id",
  "details": { ... }
}

Dependencies

  • Requires access to the Z-API WhatsApp service.
  • Needs valid credentials: an instance ID, a token, and a client token.
  • The node makes HTTP POST requests to the Z-API endpoints.
  • No additional environment variables are required beyond these credentials.

Troubleshooting

  • Invalid Credentials: If the instance ID, token, or client token are incorrect or expired, the API will reject requests. Verify and update credentials as needed.
  • Incorrect Phone Number Format: Ensure the phone number or group ID is correctly formatted according to Z-API requirements (e.g., including country code, no extra characters).
  • Network Issues: Connectivity problems may cause request failures. Check network access and firewall settings.
  • API Rate Limits: Excessive requests might be throttled by Z-API. Monitor usage and respect rate limits.
  • Error Messages: The node throws errors if the operation is unsupported or parameters are missing. Review error messages carefully and ensure all required fields are provided.

Links and References

Discussion