DinastiAPI AI icon

DinastiAPI AI

Send WhatsApp messages using DinastiAPI - optimized for AI workflows

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, business profiles, and more.

Specifically, the Send Poll operation allows creating polls with multiple choice options that can be sent to WhatsApp groups or individual recipients. This is useful for gathering group feedback, conducting surveys, or making decisions interactively within WhatsApp conversations.

Practical Examples

  • A team leader sends a poll to a project group asking "What's your preferred meeting time?" with options like "Morning", "Afternoon", "Evening".
  • An event organizer sends a poll to attendees to vote on meal preferences.
  • A community manager collects opinions via polls in WhatsApp newsletters or channels.

Properties

Name Meaning
Recipient Phone number, Group ID (@g.us), Newsletter ID (@newsletter), or LID (@lid) to send the poll to.
Poll Question The question or header text of the poll (e.g., "What's your favorite color?").
Poll Options Comma-separated list of poll answer options (e.g., "Red,Blue,Green,Yellow").
Additional Options Collection of optional settings:
- Message ID Custom message ID; if not provided, one is auto-generated.
- Presence Simulation Simulate typing/recording indicator for specified milliseconds (0-30000 ms).
- Message Duration Disappearing message duration in seconds (No expiration, 24 hours, 7 days, 90 days).
- Context Information Context metadata such as reply-to message ID, mentions (all or specific users), forwarded flag, etc.
Optimize Response Whether to optimize the API response for AI processing (reduces token usage).
Max Response Length Maximum characters in the response when optimizing.
Include Only Essential Fields Whether to include only essential fields in the optimized response.
Response Format Format of the response: Optimized, Raw, or Summary.

Output

The node outputs JSON data representing the API response from DinastiAPI after sending the poll. The structure includes:

  • data: Contains details about the sent poll message, such as message IDs and status.
  • If response optimization is enabled, the output may be truncated or simplified for AI consumption, with metadata indicating truncation.
  • In case of errors, the output JSON contains an error field describing the issue.

The node does not output binary data for the Send Poll operation.

Dependencies

  • Requires an active DinastiAPI API key credential configured in n8n.
  • Internet access to communicate with the DinastiAPI endpoints.
  • No additional environment variables are explicitly required beyond the API credential.

Troubleshooting

  • Binary Property Not Found: Although not applicable to Send Poll, other operations require binary data properties. Ensure the correct binary property name is set and data exists.
  • Invalid Recipient Format: The recipient must be a valid phone number or group/newsletter/LID identifier. Use international format without "+" and append appropriate suffixes (@g.us, @newsletter, @lid) as needed.
  • Missing Required Fields: Poll Question and Poll Options are mandatory. Ensure these are provided and options are comma-separated.
  • API Errors: Network issues or invalid API keys will cause request failures. Verify credentials and network connectivity.
  • Context Info Misconfiguration: When using context information (replies, mentions), ensure all required fields like participant JID are correctly set.

Links and References


This summary focuses on the "Send Poll" operation of the DinastiAPI AI node, detailing its inputs, outputs, and usage context based on static code analysis and provided property definitions.

Discussion