# Magpadala ng WhatsApp interactive button at list mula sa n8n

> Walang interactive na message type ang WhatsApp node ng n8n. Magpadala ng reply button at list gamit ang HTTP Request node, tapos basahin ang tap sa WhatsApp Trigger.

Published 2026-11-04. Z-API Omni team.

Ipadala ang mga ito gamit ang HTTP Request node. Walang interactive na message type ang WhatsApp Business Cloud node, kaya ikaw mismo ang mag-POST ng `interactive` payload ng Meta sa `/<PHONE_NUMBER_ID>/messages`, naka-authenticate gamit ang WhatsApp credential na mayroon ka na. Bumabalik ang tap sa pamamagitan ng WhatsApp Trigger bilang `messages[0].interactive.button_reply.id` para sa mga button, o `list_reply.id` para sa mga list.

## Ano ang kayang ipadala ng WhatsApp node

Tatlong message operation ang nakalista sa node page ng n8n: Send, Send and Wait for Response, at Send Template. May Upload, Download at Delete ang Media ([WhatsApp Business Cloud node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.whatsapp/), na-access noong 2026-11-04). Ang mga message type ng Send operation sa source ng node ay Audio, Contacts, Document, Image, Location, Text at Video ([n8n source, master branch](https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/WhatsApp/MessagesDescription.ts), binasa noong 2026-11-04). Wala roon ang `interactive`. Puwede itong idagdag ng susunod na release, kaya i-check ang Message Type dropdown ng bersyon mo.

Mukhang exception ang Send and Wait for Response, dahil pinapayagan ng Approval type nito ang mga user na "mag-approve o mag-disapprove mula sa loob mismo ng message." Binubuo iyon ng source bilang `type: 'text'` na message, at bawat opsyon ay isinusulat sa body bilang bold na label at link. URL ang tinatap ng user, at walang `button_reply` na bumabalik sa trigger.

Naka-pin din sa source na iyon ang mas lumang mga bersyon ng Graph API: isang `v13.0` na base URL constant at `v19.0` sa request helper. Para sa anumang hindi sakop ng node, sinasabi mismo ng page ng n8n na "puwede mong gamitin ang HTTP Request node para tawagin ang API ng service".

## I-set up ang HTTP Request node

May hawak na access token at Business Account ID ang WhatsApp API credential ([WhatsApp credentials](https://docs.n8n.io/integrations/builtin/credentials/whatsapp/), na-access noong 2026-11-04). Sa [source ng credential](https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/credentials/WhatsAppApi.credentials.ts), idinadagdag ng `authenticate` block nito ang `Authorization: Bearer <access token>` sa bawat request, kaya magagamit ito ulit ng HTTP Request node. Wala sa credential ang phone number ID, kaya sa URL ito ilalagay.

1. Magdagdag ng HTTP Request node. I-set ang Method sa `POST` at ang URL sa `https://graph.facebook.com/v26.0/PHONE_NUMBER_ID/messages`.
2. Sa Authentication, piliin ang Predefined Credential Type. Sa Credential Type, piliin ang WhatsApp API, tapos piliin ang kasalukuyang credential mo ([custom API operations](https://docs.n8n.io/integrations/custom-operations/), na-access noong 2026-11-04).
3. Kung wala sa listahang iyon ang WhatsApp API, piliin ang Generic Credential Type, tapos Header Auth. I-set ang Name sa `Authorization` at ang Value sa `Bearer ACCESS_TOKEN`.
4. I-on ang Send Body, piliin ang JSON, at i-paste ang isa sa mga payload sa ibaba.

"Inirerekomenda [ng n8n] ang paggamit ng Predefined Credential Type option kapag available ito" ([HTTP Request node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/), na-access noong 2026-11-04). Hindi nakalista sa docs nito ang WhatsApp API sa pangalan, kaya may hakbang 3.

Bilang default, ang node ay "nagbabalik lang ng success kapag 2xx code ang ibinalik ng response". Kaya pumapalya ang node sa error ng Meta. I-on ang Never Error kung gusto mong IF node ang mag-route ayon sa error code.

## Payload ng reply button

Nakabatay ang payload na ito sa reply buttons example ng Meta, na naka-set sa v26.0 ang bersyon sa URL sa itaas ([Interactive reply buttons](https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/interactive-reply-buttons-messages), na-access noong 2026-11-04). Media ID ang `id` ng header. Palitan ito ng isang in-upload mo mula sa number mo, gaya ng nasa [gabay sa media upload](/academy/fil/articles/whatsapp-media-upload-api-media-id/), at ang value ng `to` ng test recipient mo.

```json
{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "+16505551234",
  "type": "interactive",
  "interactive": {
    "type": "button",
    "header": { "type": "image", "image": { "id": "2762702990552401" } },
    "body": { "text": "Hi Pablo! Your gardening workshop is scheduled for 9am tomorrow. Use the buttons if you need to reschedule. Thank you!" },
    "footer": { "text": "Lucky Shrub: Your gateway to succulents!™" },
    "action": {
      "buttons": [
        { "type": "reply", "reply": { "id": "change-button", "title": "Change" } },
        { "type": "reply", "reply": { "id": "cancel-button", "title": "Cancel" } }
      ]
    }
  }
}
```

Kapag matagumpay, nagbabalik ito ng `messages[0].id`, isang `wamid`. Itabi ito. Tumuturo pabalik dito ang `context.id` ng reply, at iyon ang paraan para maitugma mo ang tap sa message na may dalang mga button.

Para sagutin ang taong nagsimula ng workflow, ilipat muna sa Expression mode ang JSON field. Pagkatapos, palitan ang value ng `to` ng `{{ $json.messages[0].from }}`. Hindi dinodokumento ng HTTP Request page ang mga expression sa loob ng JSON body, kaya patakbuhin muna ito nang isang beses gamit ang nakapirming number.

<!-- TODO:test n8n expression in the HTTP Request JSON body ("to": "{{ $json.messages[0].from }}") -->

## Payload ng list message

Nagbubukas ang list ng menu ng mga row sa likod ng isang button. Ito ang example body ng Meta ayon sa pagkakalathala ([Interactive list messages](https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/interactive-list-messages), na-access noong 2026-11-04).

```json
{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "+16505551234",
  "type": "interactive",
  "interactive": {
    "type": "list",
    "header": { "type": "text", "text": "Support Topic" },
    "body": { "text": "Pick the issue closest to yours." },
    "footer": { "text": "Acme Support" },
    "action": {
      "button": "Choose Topic",
      "sections": [
        {
          "title": "Billing",
          "rows": [
            { "id": "billing_invoice", "title": "Invoice question", "description": "Charges or receipts" },
            { "id": "billing_refund", "title": "Request refund", "description": "Refund status and timing" }
          ]
        },
        {
          "title": "Account",
          "rows": [
            { "id": "account_reset", "title": "Reset password", "description": "Recover your login" }
          ]
        }
      ]
    }
  }
}
```

Ibinibigay ng mga page ng Meta ang mga limit na ito para sa dalawang type. Kapag galing sa sarili mong data ang mga title, paikliin ang mga ito sa isang Set node bago ang HTTP Request.

| Limit | Reply button | List |
| --- | --- | --- |
| Mga pagpipilian | hanggang 3 button | hanggang 10 section, 10 row sa kabuuan |
| Title ng pagpipilian | 20 character | 24 character (row), 24 (section) |
| ID ng pagpipilian | 256 character | 200 character |
| Description ng row | n/a | 72 character |
| Text ng menu button | n/a | 20 character |
| Header | `text`, `image`, `video` o `document` | `text` lang, 60 character |
| Body | 1,024 character | 4,096 character |
| Footer | 60 character | 60 character |

Tinalakay ng [mga limit ng interactive button at list](/academy/fil/articles/whatsapp-interactive-buttons-list-messages-limits/) ang iba pang interactive type.

## Umiiral pa rin ang 24 oras na window

Hindi template ang mga interactive message. Maipapadala mo lang ang mga ito habang bukas ang customer service window, at nagsisimula ang window na iyon kapag nag-message o tumawag sa iyo ang user ([Pricing](https://developers.facebook.com/documentation/business-messaging/whatsapp/pricing), na-access noong 2026-11-04). Sa labas nito, pumapalya ang send na may 131047, "More than 24 hours have passed since the recipient last replied to the sender number" ([Error codes](https://developers.facebook.com/documentation/business-messaging/whatsapp/support/error-codes), na-access noong 2026-11-04).

Sa praktika, nagsisimula ang workflow sa WhatsApp Trigger kasama ang message ng user, at lumalabas ang mga button bilang reply. Para ikaw ang magsimula ng usapan, magpadala ng template gamit ang [WhatsApp Send Template node](/academy/fil/articles/n8n-whatsapp-send-template-node/). Ipinapaliwanag ng [error 131047](/academy/fil/articles/whatsapp-error-131047-24-hour-window-templates/) ang window.

## Basahin ang tap sa WhatsApp Trigger

I-subscribe ang trigger sa Messages event. Dumarating ang tap bilang message na may type na `interactive`. Ito ang bahaging `messages` ng button reply example ng Meta ([Interactive webhook reference](https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/messages/interactive), na-access noong 2026-11-04).

```json
{
  "messages": [
    {
      "context": {
        "from": "15550783881",
        "id": "wamid.HBgLMTY1MDM4Nzk0MzkVAgARGBI3MEM2RUJFNkI0RENGQTVDRjUA"
      },
      "from": "16505551234",
      "id": "wamid.HBgLMTY1MDM4Nzk0MzkVAgASGBQzQTZBQzg0MzQ4QjRCM0NGNkVGOAA=",
      "timestamp": "1750025136",
      "type": "interactive",
      "interactive": {
        "type": "button_reply",
        "button_reply": {
          "id": "cancel-button",
          "title": "Cancel"
        }
      }
    }
  ]
}
```

Nagsisimula ang snippet ng Meta sa `"messages":`. Idinagdag dito ang mga panlabas na brace para ma-parse ito. Naglalabas ang source ng trigger ng isang item bawat webhook change, na naka-set sa `value` ng change na iyon kasama ang `field` nito ([WhatsApp Trigger source](https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/WhatsApp/WhatsAppTrigger.node.ts), binasa noong 2026-11-04). Hindi inilalarawan ng docs ng n8n ang hugis ng output na iyon, kaya galing sa source ang mga path na ito.

| Expression | Value |
| --- | --- |
| `{{ $json.messages[0].interactive.type }}` | `button_reply` o `list_reply` |
| `{{ $json.messages[0].interactive.button_reply.id }}` | Ang button ID na itinakda mo, gaya ng `cancel-button` |
| `{{ $json.messages[0].interactive.list_reply.id }}` | Ang row ID, gaya ng `billing_refund` |
| `{{ $json.messages[0].context.id }}` | Ang `wamid` ng message na may dalang mga button |
| `{{ $json.messages[0].from \|\| $json.messages[0].from_user_id }}` | Ang sender, phone number o BSUID |

Umaabot sa parehong trigger ang mga status update na may `statuses` at walang `messages`. Maglagay muna ng IF node na nagche-check ng `{{ Boolean($json.messages) }}`. Pagkatapos, gumamit ng Switch sa `button_reply.id` o `list_reply.id`, isang route bawat ID.

Bumabalik sa `from_user_id` ang sender dahil puwedeng dumating nang walang `from` ang mga user na may WhatsApp username. Para sumagot sa isang BSUID, magpadala gamit ang `recipient` kapalit ng `to`, gaya ng inilalarawan sa [mga WhatsApp username at BSUID](/academy/fil/articles/whatsapp-usernames-business-scoped-user-ids/).

Kung walang dumarating, i-check ang setup ng trigger. Pinapayagan ng WhatsApp ang "iisang webhook bawat app", kaya kapag lumipat ka sa pagitan ng test at production URL, napapalitan ang naka-register. Nagpapadala rin lang ang Meta ng webhook sa mga app na naka-subscribe sa WhatsApp Business Account ([WhatsApp Trigger](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.whatsapptrigger/), na-access noong 2026-11-04). Tinalakay ng [setup ng WhatsApp Trigger](/academy/fil/articles/n8n-whatsapp-trigger-node-setup/) at [webhook na hindi tumatanggap sa production URL](/academy/fil/articles/n8n-webhook-not-receiving-production-url/) ang dalawa.

Kung hindi iyon ang problema, at dalawang beses tumatakbo ang parehong tap dahil sa na-retry na delivery, mag-dedupe sa `messages[0].id` gaya ng sa [idempotency pattern ng n8n](/academy/fil/articles/n8n-duplicate-webhooks-idempotency/).

*Ang Z-API Omni team*
