Actions10
Overview
This node integrates with the Z-API service to send various types of WhatsApp messages programmatically. Specifically, for the Send Location operation under the Send Message resource, it allows users to send a geographic location message to a specified phone number via WhatsApp.
Typical use cases include:
- Sharing a business or event location with customers.
- Sending meeting points or directions in customer support chats.
- Automating location sharing in appointment reminders or delivery notifications.
For example, a clinic chatbot can automatically send its address and map location to patients who request directions.
Properties
Name | Meaning |
---|---|
Instance ID | Your Z-API Instance ID used to authenticate API requests. |
Instance Token | Your Z-API Instance Token (password field) for secure authentication. |
Client Token | Your Z-API Client Token (password field) for additional authentication. |
Phone | The recipient's phone number in international format (e.g., 5511999999999). |
Title Location | The title or name of the location to be sent (e.g., "Cloudia - Chatbot para clínicas"). |
Address Location | The full address string describing the location (e.g., "Av. Paulista 171, Pavimento 4..."). |
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 | Delay in seconds before sending the message (1 to 15 seconds). |
- Delay Typing | Delay in seconds showing "Typing..." status before sending (0 to 15 seconds). |
- 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 after sending the location message. The structure typically includes confirmation details such as message IDs, status, or error information if the sending failed.
No binary data is output by this operation.
Example output snippet (conceptual):
[
{
"messageId": "abc123",
"status": "sent",
"to": "5511999999999"
}
]
Dependencies
- Requires access to the Z-API WhatsApp messaging service.
- Needs valid credentials: Instance ID, Instance Token, and Client Token.
- The node uses HTTP POST requests to the Z-API endpoints.
- No additional environment variables are required beyond the provided credentials.
Troubleshooting
- Invalid Credentials: If authentication fails, verify that the Instance ID, Instance Token, and Client Token are correct and active.
- Incorrect Phone Number Format: Ensure the phone number is in the international format without spaces or special characters.
- Missing Required Fields: The phone number, latitude, and longitude must be provided; missing these will cause errors.
- Operation Not Known Error: This occurs if an unsupported operation is selected; ensure "send-location" is chosen.
- Resource Not Known Error: This happens if the resource is not "send-message"; confirm the resource selection.
- Delays Too Long or Short: Delay values must be within allowed ranges (Delay Message: 1-15 seconds, Delay Typing: 0-15 seconds).
- Network Issues: Check internet connectivity and Z-API service availability if requests time out or fail.
Links and References
- Z-API Official Documentation — For detailed API usage and credential management.
- WhatsApp Location Messages Guide — Understanding location message formats on WhatsApp.
- n8n Documentation — General guidance on creating and using custom nodes.