Actions21
Overview
The "Send Image" operation of the DinastiAPI AI node allows sending image messages via WhatsApp to individual users, groups, newsletters, or LIDs. It supports multiple image input formats including binary data from previous nodes, base64-encoded images, or direct URLs to image files. Users can optionally add captions and configure advanced message options such as custom message IDs, presence simulation (typing indicator), disappearing message durations, view-once settings, and context information for replies, forwards, and mentions.
This node is beneficial in scenarios where automated workflows need to send rich media content through WhatsApp, such as marketing campaigns, customer support with visual aids, or broadcasting updates with images. For example, a business could automatically send product images with descriptions to customers or groups, or share event photos with newsletter subscribers.
Properties
| Name | Meaning |
|---|---|
| Recipient | Phone number, Group ID (@g.us), Newsletter ID (@newsletter), or LID (@lid) to which the image will be sent. |
| Image Source | The source type of the image to send. Options: • Binary Data - use binary data from a previous node. • Base64 - provide a base64 encoded image string. • URL - provide a direct URL to the image file. |
| Binary Property | (If Image Source is Binary Data) The name of the binary property containing the image data in the input item. |
| Base64 Image | (If Image Source is Base64) Base64 encoded image string including the data URL prefix (e.g., data:image/jpeg;base64,...). |
| Image URL | (If Image Source is URL) Direct URL to the image file to send. |
| Caption | Optional caption text to accompany the image message. |
| Additional Options | Collection of optional settings: • Message ID: Custom identifier for the message. • Presence Simulation: Simulate typing/recording indicator for specified milliseconds. • Message Duration: Disappearing message timer. • View Once: Whether the message can only be viewed once. • Context Information: Reply, forward, mention details for the message. |
Output
The node outputs JSON data representing the response from the DinastiAPI service after attempting to send the image message. This includes status information about the message delivery and any metadata returned by the API.
If the user opts to save avatars as binary data (in other operations), the node can output binary data fields; however, for the "Send Image" operation specifically, the output is JSON-only and does not include binary data.
Dependencies
- Requires an active connection to the DinastiAPI WhatsApp messaging service.
- Requires configuration of an API key credential for authentication with DinastiAPI.
- Uses internal helper functions to prepare media data and make HTTP requests to the DinastiAPI endpoints.
Troubleshooting
- Binary Property Not Found: If the selected binary property does not exist in the input data, the node throws an error indicating the missing property. Ensure that the previous node outputs binary data under the specified property name.
- Invalid Image Source: Providing an invalid or inaccessible URL, malformed base64 string, or empty binary data will cause the API request to fail. Verify the correctness and accessibility of the image source.
- Recipient Format Errors: The recipient must be a valid phone number or group/newsletter/LID identifier. Incorrect formatting may result in message delivery failure.
- API Errors: Network issues, invalid credentials, or API limits may cause errors. Check API key validity and network connectivity.
- Context Information Misconfiguration: When using reply or mention features, ensure all required fields like participant JID are correctly set to avoid errors.
Links and References
- DinastiAPI GitHub Repository - Official documentation and source code for the DinastiAPI service.
- WhatsApp Messaging Best Practices - Refer to WhatsApp's official guidelines for media message formats and limitations.