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

Typical use cases include:

  • Sharing a business or event location with customers or contacts.
  • Sending meeting points or delivery addresses in conversations.
  • Automating location sharing in customer support or sales workflows.

For example, a user can configure this node to send the exact latitude and longitude along with a title and address description to a client’s WhatsApp number automatically when triggered.

Properties

Name Meaning
Instance The Z-API instance ID identifying the WhatsApp session to use.
Token The Z-API token 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 an array of JSON objects representing the response from the Z-API service for each input item processed. The structure depends on the API response but generally includes confirmation details about the sent location message.

No binary data output is produced by this operation.

Example output snippet (conceptual):

[
  {
    "sent": true,
    "messageId": "some-message-id",
    "phone": "120363029102538932-group",
    "status": "success"
  }
]

Dependencies

  • Requires access to the Z-API WhatsApp service.
  • Needs valid credentials: instance ID, token, and client token.
  • The node makes HTTP POST requests to https://api.z-api.io/instances/{instance}/token/{token}/send-location.
  • Proper network connectivity and API permissions are necessary.

Troubleshooting

  • Authentication errors: Ensure that the instance ID, token, and client token are correct and active.
  • Invalid phone/group ID: Verify the phone number or group ID format matches WhatsApp requirements.
  • Missing required fields: All properties marked as required must be provided; missing latitude, longitude, or address will cause failures.
  • API rate limits or downtime: If requests fail repeatedly, check Z-API service status and usage limits.
  • Error messages from API: The node throws errors if the operation is unsupported or parameters are invalid. Review error messages carefully and confirm all inputs.

Links and References

Discussion