W-api icon

W-api

Interaja com W-api WhatsApp API

Botões → Enviar CTA

AI-generated

Summary

Sends a WhatsApp interactive CTA message (URL, copy or call buttons) through a W-api instance by POSTing to /buttons/sendInteractive/{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, no + or spaces. Sent as to.
  • text (required) — Main message text.
  • footer — Optional footer text. It is sent as an empty string if left blank.
  • buttonsJson (required) — JSON array of buttons, parsed before sending. The default is a quick-reply style array of {id, text}. For CTA use, supply the button objects (URL, copy or call) that the W-api endpoint expects. The node doesn't validate their structure. Invalid JSON throws an error.
  • sendOptions — Optional collection merged into the request body. Fields: delay (ms), quotedMessageId, quotedFromMe, quotedText, mentionAll, mentionNumbers, previewLink. Empty values are dropped.

Output shape

One output item per input item. Its json is the parsed response body from the W-api endpoint.

Authentication uses the wapiApi credential (baseUrl and apiKey). If 'Continue on Fail' is enabled, a failed item returns {error: message} instead of stopping the workflow. The exact response fields depend on the W-api service.

Examples

Example 1: Send a message with a button that opens a website

instanceName=minha-loja, number=5521999999999, text='Conheça nossa oferta', buttonsJson=a JSON array holding one URL button object in the format W-api expects

Example 2: Reply to a specific message with a CTA, delayed by 2 seconds

Fill in the required fields, then set sendOptions: delay=2000, quotedMessageId=, quotedFromMe=false

Links

Discussion