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 programmatically. Specifically, the "Send Location" operation under the "Message" resource allows users to send a geographic location message to a specified phone number or group ID on WhatsApp.

Common scenarios for this node include:

  • Sharing a business location with customers.
  • Sending event venue details in customer support chats.
  • Providing delivery or meeting points dynamically within automated workflows.

For example, a logistics company could automatically send the current warehouse location to drivers via WhatsApp using this node.

Properties

Name Meaning
Instance The Z-API instance ID identifying your WhatsApp API instance.
Token The Z-API token used for authenticating API requests.
Client Token The client token required by Z-API for additional authentication.
Phone The recipient's phone number or group ID where the location will be sent.
Title The title or name of the location (e.g., "Google Brasil").
Address The textual address description of the location (e.g., street address).
Latitude The latitude coordinate of the location as a string (e.g., "-23.0696347").
Longitude The longitude coordinate of the location as a string (e.g., "-50.4357913").

Output

The node outputs a JSON array where each element corresponds to the response from the Z-API after sending the location message. The structure of each JSON object depends on the Z-API response but generally includes status information about the message delivery.

No binary data output is produced by this operation.

Dependencies

  • Requires access to the Z-API WhatsApp service.
  • Needs valid credentials: an instance ID, a token, and a client token for authentication.
  • The node makes HTTP POST requests to the Z-API endpoints.
  • Proper network connectivity to https://api.z-api.io is necessary.

Troubleshooting

  • Authentication errors: If the API returns authentication failures, verify that the instance ID, token, and client token are correct and active.
  • Invalid phone/group ID: Ensure the phone number or group ID is correctly formatted and registered on WhatsApp.
  • Coordinate format issues: Latitude and longitude must be strings representing valid decimal coordinates; invalid values may cause request failures.
  • API rate limits or downtime: Temporary failures might occur if the Z-API service is down or rate limits are exceeded.
  • Error messages: The node throws an error if the operation is not supported or parameters are missing. Check that all required fields are provided.

Links and References

Discussion