Actions15
- Instância Actions
- Mensagem Actions
- Botões Actions
- Webhook Actions
Botões → Enviar Enquete
AI-generatedSummary
Sends a WhatsApp poll (question plus answer options) to a number through a W-api instance, via POST to /buttons/sendPoll/{instanceName}.
Inputs
- instanceName (required) — Name of the W-api instance used to send the poll. It is inserted into the request URL.
- number (required) — Recipient number with country code and area code, no + or spaces. Sent as
to. - pollName (required) — The poll question. Sent as
name. - optionsJson (required) — JSON array of option strings, e.g. ["Opção 1","Opção 2"]. It is parsed before sending, and invalid JSON throws an error naming the field.
- selectableCount — How many options a user may select. Defaults to 1.
- sendOptions — Optional collection merged into the request body. It holds delay (ms), quotedMessageId, quotedFromMe, quotedText, mentionAll, mentionNumbers and previewLink. Empty values are dropped.
Output shape
One output item per input item. Its json is the W-api response body for the poll send request.
Authenticates with the apikey header and baseUrl from the wapiApi credentials. With Continue On Fail enabled, a failed item yields {error: message} instead of stopping the workflow. The footer parameter is read for the buttons resource but not sent in the poll body.
Examples
Example 1: Ask a customer to pick a preferred delivery day.
instanceName=minha-loja, number=5521999999999, pollName='Qual dia prefere?', optionsJson=["Segunda","Quarta","Sexta"], selectableCount=1
Example 2: Send a multi-select poll as a reply to an earlier message, after a delay.
selectableCount=2, sendOptions: quotedMessageId=