WAREST icon

WAREST

Interact with the WARest WhatsApp REST API

Overview

This node operation sends a poll message via the WARest WhatsApp REST API. It allows users to specify a session, recipient chat, poll question, and multiple poll options. Additional settings such as maximum selections allowed and message-related options (e.g., presence indicator, reply to message ID, mark as forwarded) can also be configured. This node is useful for creating interactive polls in WhatsApp chats, enabling engagement and feedback collection from chat participants.

Use Case Examples

  1. Sending a poll to a WhatsApp group to gather opinions on a meeting time.
  2. Creating a poll in a customer support chat to understand customer preferences.

Properties

Name Meaning
Session The WhatsApp session ID to use for sending the poll message.
Recipient / Chat (to) The phone number or JID of the recipient chat where the poll will be sent.
Question The poll question text to be presented to the recipients.
Options The list of poll options that recipients can choose from.
Max Selections The maximum number of poll options that can be selected by a recipient.
Additional Fields Optional message-related settings such as presence indicator, reply message ID, and mark as forwarded.

Output

JSON

  • json - The JSON response from the WARest API containing details of the sent poll message.

Dependencies

  • WARest WhatsApp REST API

Troubleshooting

  • Ensure the session ID is valid and active; otherwise, the API call will fail.
  • Verify the recipient chat ID or phone number is correct and reachable via WhatsApp.
  • At least one poll option must be provided; an error is thrown if no options are added.
  • If using reply message ID, ensure the referenced message exists in the chat.

Links

  • WARest API - Send Poll - Official documentation for sending poll messages using the WARest WhatsApp REST API.

Discussion