Actions21
Overview
The node "DinastiAPI AI" enables sending WhatsApp messages through the DinastiAPI service, optimized for AI workflows. It supports a wide range of message types including text, images, documents, audio, video, locations, contacts, stickers, interactive buttons, lists, polls, and links. Additionally, it can retrieve WhatsApp session status, user info, avatars, groups, newsletters, and business profiles.
The Send Location operation specifically allows sharing geographic coordinates (latitude and longitude) with an optional location name to WhatsApp users, groups, newsletters, or LIDs. This is useful for scenarios such as:
- Sharing meeting points or event locations.
- Providing navigation assistance.
- Sending real-time location updates in customer support or delivery tracking.
Example: A logistics company can send a precise drop-off location to a client via WhatsApp using this node.
Properties
| Name | Meaning |
|---|---|
| Recipient | Phone number, Group ID (@g.us), Newsletter ID (@newsletter), or LID (@lid) to which the location will be sent. |
| Latitude | Latitude coordinate of the location to share. Required. |
| Longitude | Longitude coordinate of the location to share. Required. |
| Location Name | Optional name or label for the location (e.g., "Main Office", "Event Venue"). |
| Additional Options | Collection of optional parameters: - Message ID: Custom message identifier (auto-generated if omitted). - Presence Simulation: Simulate typing/recording indicator for specified milliseconds. - Message Duration: Disappearing message duration (No Expiration, 24 Hours, 7 Days, 90 Days). - Context Information: Reply, forward, mentions, and other context metadata. - View Once: Not applicable for location but available for some media types. - Link Preview: Not applicable for location but available for text messages. |
| Optimize Response | Whether to optimize the API response to reduce token usage and improve AI processing (used when node is run as a tool). |
| Max Response Length | Maximum characters in the response when optimizing output. |
| Include Only Essential Fields | Whether to include only essential fields in the optimized response to reduce noise. |
| Response Format | Format of the response: Optimized (structured), Raw (complete API response), or Summary (brief key info). |
Output
The node outputs JSON data representing the API response from DinastiAPI after sending the location message. The structure typically includes:
- Confirmation of message sent.
- Message ID (if custom or generated).
- Status or error information.
- Metadata about the message context if provided.
If the node is configured to optimize the response (when used as a tool), the output may be truncated or simplified to improve AI processing efficiency.
This node does not output binary data for the Send Location operation.
Dependencies
- Requires an active DinastiAPI API key credential configured in n8n.
- Internet access to communicate with the DinastiAPI endpoints.
- Proper configuration of the node's credentials and permissions to send WhatsApp messages.
Troubleshooting
- Error: Binary property "X" not found — Not applicable for Send Location but common for media operations; ensure the binary property exists in input data.
- Unknown operation error — Ensure the operation parameter is correctly set to "sendLocation".
- Invalid phone number or recipient format — Verify that the recipient is a valid phone number or group/newsletter/LID ID with correct suffixes.
- Missing required parameters — Latitude, Longitude, and Recipient are mandatory; ensure they are provided.
- API request failures — Check network connectivity and validity of the API key credential.
- Context information errors — When using reply or mention options, ensure correct message IDs and participant JIDs are provided.
Links and References
- DinastiAPI GitHub Repository
- WhatsApp Location Sharing Documentation (general reference): https://faq.whatsapp.com/general/chats/how-to-share-your-location
- n8n Documentation on Creating Custom Nodes: https://docs.n8n.io/integrations/creating-nodes/
Summary
This node's Send Location operation provides a straightforward way to share geographic coordinates via WhatsApp using DinastiAPI. It supports detailed customization through additional options and integrates well into AI-driven workflows by offering response optimization features.