W-api icon

W-api

Interaja com W-api WhatsApp API

Botões → Enviar Lista

AI-generated

Summary

Sends a WhatsApp interactive list message (a button that opens a dropdown of sectioned options) to a number through a W-api instance, via POST to /buttons/sendList/{instanceName}.

Inputs

  • instanceName (required) — Name of the W-api instance used to send the message; it is placed in the request URL.
  • number (required) — Recipient number with country code and area code, without + or spaces. Sent as to.
  • text (required) — Main message body text.
  • buttonText (required) — Label of the button that opens the list. Defaults to 'Ver opções'.
  • sectionsJson (required) — JSON array of sections, each with a title and rows (id, title, description). It is parsed before sending, and invalid JSON throws an error.
  • footer — Optional footer text. It is always sent, as an empty string if unset.
  • sendOptions — Optional collection: delay (ms), quotedMessageId, quotedFromMe, quotedText, mentionAll, mentionNumbers, previewLink. Empty values are dropped and the rest are merged into the request body.

Output shape

One output item per input item, with json set to the W-api response body for the list send request.

Uses the wapiApi credential (baseUrl and apiKey sent in the apikey header). If 'Continue on Fail' is enabled, a failed item returns { error: message } instead of stopping the workflow. Invalid sectionsJson also raises an error, or an error item when continue-on-fail is on.

Examples

Example 1: Offer a support menu to a customer on WhatsApp

instanceName=minha-loja, number=5521999999999, text='Olá! Escolha uma opção:', buttonText='Ver opções', sectionsJson with one section of rows (id, title, description), footer='Atendimento 24h'.

Example 2: Send a list as a reply to an earlier message after a short delay

Same required fields, plus sendOptions: delay=2000, quotedMessageId set to the earlier message ID, quotedFromMe=false.

Links

Discussion