Z-API icon

Z-API

Send messages

Overview

This node allows sending various types of messages through the Z-API messaging platform, focusing here on the "Send Location" operation within the "Send Message" resource. It enables users to send a geographic location message to a specified phone number, including details such as title, address, latitude, and longitude.

Common scenarios include:

  • Sharing a business or event location with customers.
  • Sending directions or meeting points in customer support chats.
  • Broadcasting location-based promotions or notifications.

Practical example: A clinic chatbot sends its office location to a patient by providing the clinic's name, full address, and GPS coordinates.

Properties

Name Meaning
Phone The recipient's phone number in international format (e.g., 5511999999999).
Title Location The title or name of the location being sent (e.g., "Cloudia - Chatbot para clínicas").
Address Location The full address of the location (e.g., "Av. Paulista 171, Pavimento 4 - Bela Vista, São Paulo - SP, 01311-000").
Latitude The latitude coordinate of the location (e.g., -23.570323).
Longitude The longitude coordinate of the location (e.g., -46.6508174).
Additional Fields Optional extra settings:
- Delay Message Number of seconds (1-15) to wait before sending the message.
- Delay Typing Number of seconds (0-15) to show "Typing..." status before sending the message.
- Message ID to Reply ID of an existing message to which this location message will reply.

Output

The node outputs a JSON array where each element corresponds to the response from the Z-API service for each input item processed. The exact structure depends on the API response but generally includes confirmation of message delivery or error details.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the Z-API messaging platform.
  • Needs an API authentication token configured in n8n credentials to authorize requests.
  • Network access to the Z-API endpoint is necessary.

Troubleshooting

  • Invalid phone number format: Ensure the phone number is in the correct international format without spaces or special characters.
  • Missing required fields: Title, address, latitude, and longitude must be provided; otherwise, the API may reject the request.
  • API authentication errors: Verify that the API key credential is correctly set up and has not expired.
  • Delays too long or short: Delay values must be within allowed ranges (typing delay 0-15 seconds, message delay 1-15 seconds).
  • Unknown operation or resource errors: These indicate misconfiguration of the node parameters; double-check the selected resource and operation.

Links and References

Discussion