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 via WhatsApp.

Typical use cases include:

  • Automatically sharing contact details during customer support conversations.
  • Sending business contact cards in marketing campaigns.
  • Distributing team member contacts within group chats.

For example, you can configure this node to send a contact named "Tuan Pakya" with phone number "601154272790" to a WhatsApp group or individual by specifying the target phone 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 group ID where the contact will be sent.
Contact Name The name of the contact being sent.
Contact Phone The phone number of the contact being sent.

Output

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

No binary data is output by 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 the provided 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 set.

Links and References

Discussion