WhatsApp — Get poll results
Automatically get poll results on web.whatsapp.com. Read the current results of a WhatsApp poll, by chat name plus the poll message's id. Returns the poll question, whether it accepts more than one answer per person, each option with its vote count, and which options the signed-in account has voted for. Reading a poll changes nothing and notifies nobody. Older polls are found by loading further back through the conversation. Individual voter names are not included — only the counts. Pairs with the poll creating and voting scripts.
Input
id requiredThe poll message's id, as returned by get_conversation or search_messages.
name requiredExact chat name containing the poll, as returned by get_inbox.
Output
id requiredchat requiredThe chat the poll was read from, echoed from the conversation header.
options requiredquestion requiredtotalVotes requiredSum of the per-option counts. On a multi-answer poll one person can add several, so this is not necessarily the number of people who voted.
allowMultiple requiredTrue when the poll accepts more than one answer per person.
FAQ
Get WhatsApp conversation
Read the most recent messages of one WhatsApp chat, oldest first. Give the chat by its `chatId` from get_inbox. Each message gives its id, type, sender (in groups), time, text or caption, whether it was deleted for everyone, the delivery status of your own messages, file details for media, and its reactions with counts. `complete` is true when the start of the chat's history was reached. Reading does not open the chat, so nothing is marked as read and the other person gets no read receipt. If WhatsApp Web is open in another tab of the same browser, the run stops and asks to close that tab. If the browser is not linked to WhatsApp, the run stops and says so. An unknown chatId stops the run with an error.
Send WhatsApp message or attachment
Send a WhatsApp message to a chat, given by its `chatId` from get_inbox, or to a phone number in international format that has no chat yet. The message is a text, an image, a video or a document with an optional caption, or a saved contact's card. Returns the new message's id, which delete_message and react_to_message take, with the time, the delivery status and the account that sent it. The run succeeds only when WhatsApp's server has acknowledged the message, and fails if WhatsApp marks it as failed. With dry_run, the chat is opened and the message prepared, and nothing is sent. Confirm the recipient with the user before sending. If WhatsApp Web is open in another tab of the same browser, the run stops and asks to close that tab.
Get WhatsApp inbox
List the chats of the WhatsApp chat list, in the order the list shows them, most recent first. Pick the same tab as the app: all chats, unread, favorites, groups, or archived. Each chat gives its id, its name, when it was last active, its unread count, whether it is pinned, muted, a favorite or marked unread by hand, and its last message with id, type, sender, time and text. `total` tells how many chats the tab holds, so a result cut by `count` is visible. Reading the list does not open a chat and marks nothing as read. If WhatsApp Web is open in another tab of the same browser, the run stops and asks to close that tab, because taking the session would disconnect it. If the browser is not linked to WhatsApp, the run stops and says so.
