← Blog

·

WhatsApp with Power Automate: send messages through the official API

Updated on November 10, 2026

To send WhatsApp messages from Power Automate through the official API, you use the HTTP action in a cloud flow: it makes a POST to the messages endpoint with the token in a header and the template in the JSON body. The HTTP action is a premium feature: Microsoft lists “HTTP actions” among the features that require a license such as Power Automate Premium, and Microsoft 365 licenses only include standard connectors.

This guide covers the license you need, a complete flow that sends a template when a new order lands in a SharePoint list, how to protect the token, how to handle errors and how to receive replies and delivery statuses.

Which license you need

Microsoft’s documentation is clear on this:

  • The Free license and Microsoft 365 licenses only give access to standard connectors, per the Power Automate licensing FAQ.
  • The license must cover every premium feature the flow uses, “such as premium connectors, custom connectors, or HTTP actions”, and Power Automate Premium covers them, according to the page on licensing service principal flows.
  • Automated and scheduled flows run in the owner’s context, so only the owner needs Premium. Instant (button) flows run in the context of whoever triggers them, so every user needs the license, or the flow needs a Process license.

If your company runs Power Automate on Microsoft 365 licenses only, budget for that extra license before you start. A custom connector is premium too, so it isn’t a way around licensing.

What you need first

  • A number connected to the official WhatsApp Business API and an access token (from Meta or your provider).
  • An approved message template. Outside the 24-hour window that opens when the customer messages you, only templates go through.
  • A data source with phone numbers in international format, without + (e.g. 15551234567). In this example, a SharePoint list called “Orders” with the columns Customer, Phone and OrderNumber.

Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →

Step by step: a flow that sends a template for every new order

  1. Create an automated cloud flow with the SharePoint trigger When an item is created, pointing to the “Orders” list.
  2. Add the HTTP action (labeled Premium).
  3. Set Method to POST and URI to the messages endpoint (Meta’s is https://graph.facebook.com/v27.0/<PHONE_NUMBER_ID>/messages; or your provider’s).
  4. Under Headers, add Content-Type: application/json and Authorization: Bearer <token> (the next section covers keeping the token out of sight).
  5. In Body, paste the template JSON and replace the values with dynamic content:
{
  "messaging_product": "whatsapp",
  "to": "@{triggerOutputs()?['body/Phone']}",
  "type": "template",
  "template": {
    "name": "order_confirmed",
    "language": { "code": "en_US" },
    "components": [
      {
        "type": "body",
        "parameters": [
          { "type": "text", "text": "@{triggerOutputs()?['body/Customer']}" },
          { "type": "text", "text": "@{triggerOutputs()?['body/OrderNumber']}" }
        ]
      }
    ]
  }
}
  1. Add Parse JSON on the response body, or grab the ID directly with the expression body('HTTP')?['messages']?[0]?['id'].
  2. Add SharePoint Update item to save that ID (the wamid) in a column on the order. You’ll use it to match the statuses that arrive later.

A successful response only means the API accepted the request; delivery and read receipts arrive later via webhook, as explained in WhatsApp API message statuses. For the full template structure with media and buttons, see how to send a template message through the API.

Keeping the token out of the flow

By default, run history shows every action’s inputs and outputs, including the Authorization header. Two Microsoft features help:

  • Secure inputs and Secure outputs. Turn both on in the HTTP action’s settings. The action’s inputs and outputs then stop showing up in run history and audit logs, per Secure data used in cloud flows.
  • Environment variable backed by an Azure Key Vault secret. Power Platform lets an environment variable reference a Key Vault secret, as described in environment variables for Azure Key Vault secrets. That page notes these variables don’t yet appear in the flow’s dynamic content picker, so read the procedure before you build.

Avoid pasting the token straight into the header in shared flows: anyone who can edit the flow can see it.

Error handling and retries

Microsoft’s error-handling guidance for cloud flows recommends three building blocks, all useful here:

  • Configure run after. An action after the HTTP call that only runs when it “has failed”, to log the error or notify someone.
  • Try/Catch scopes. Put the send in a “Try” scope and the handling in a “Catch” scope.
  • Retry policy. In the HTTP action’s settings, choose fixed or exponential intervals. Microsoft prefers exponential for transient failures.

With the WhatsApp API, not every error should be retried. A template with a wrong parameter will fail on every attempt. Read error.code from the response and only retry transient errors such as rate limits and service outages. The most common codes are covered in WhatsApp API error codes.

SituationExample codeWhat the flow should do
Number throughput limit130429Retry with increasing waits
Too many messages to the same contact131056Wait before messaging that contact again
Service unavailable131016Retry later
Template parameters don’t match132000Don’t retry; fix the flow
Outside the 24-hour window131047Don’t retry; use a template

Sending to an Excel list

For batch notifications, a scheduled flow reads the rows of an Excel table and uses Apply to each with the HTTP action inside. Three things to watch:

  • Every action counts toward Power Automate’s daily action limits, and retries count too, per limits and configuration.
  • Control the concurrency of “Apply to each” and, if needed, add a Delay action between sends.
  • For large volumes, Power Automate is no substitute for a real queue. A queue design with pacing and retries is in WhatsApp API send queue with Redis and BullMQ.

Batch sends also require opt-in and the right template category. Marketing messages cost much more per message than utility ones.

Receiving messages and statuses in Power Automate

The When an HTTP request is received trigger generates a URL that can receive events. In practice:

  • With Meta directly, the webhook requires answering the verification challenge (hub.challenge) and validating the X-Hub-Signature-256 signature over the raw body. That’s awkward inside a flow; the safer route is a small endpoint (an Azure Function, for example) that validates and forwards to the flow.
  • With a provider that forwards events, you register the flow URL as the destination. The URL contains a SAS key; treat it as a secret and regenerate it if it leaks, following Regenerate the SAS key used in HTTP trigger flows.

Check in the designer whether the HTTP trigger requires a Premium license in your environment before you plan around it.

Power Automate, Make, Zapier or n8n?

Power Automate makes sense when your data already lives in Microsoft 365 (SharePoint, Excel, Dataverse, Outlook) and you already own the licenses. If not, compare it with Make and Zapier or with n8n, which you can self-host. For an internal admin panel with a send button, see also Retool with the WhatsApp API.

How to do it with Vectalk

With Vectalk, the HTTP action points to POST https://apis.vectalk.com.br/api/messages, with Authorization: Bearer <token> and the same JSON body Meta uses, per the quickstart. Use an instance token: it resolves the phone_number_id on its own, so the body doesn’t need it, according to the authentication page. The token doesn’t expire on its own; store it as a secret and revoke it in the dashboard when needed.

To receive events, register the flow’s HTTP trigger URL through Vectalk’s webhooks API: events arrive in Meta’s format, and the endpoint must return 200 within 20 seconds. Billing is prepaid: each delivered message is deducted from your balance, with no card on file at Meta. Vectalk has no dedicated Power Automate connector and no agent inbox; the flow is yours. Sign up at apps.vectalk.com.br/register.

Frequently asked questions

Can I use WhatsApp in Power Automate with just a Microsoft 365 license?

Not with the HTTP action. Microsoft 365 licenses only include standard connectors, and Microsoft lists HTTP actions among premium features.

Can I send free-form text instead of a template?

Only inside the 24-hour window opened by the customer’s last message. Outside it, the API rejects free-form text and you need an approved template.

How do I know the message was delivered?

The HTTP action’s response includes the wamid, but delivery comes later through the status webhook. Save the wamid and update the record when the status arrives.

How much does each message sent by the flow cost?

You pay Meta’s per-message rate for each delivered template, which depends on the recipient’s country. For numbers in Brazil, since October 1, 2026: R$ 0.3217 (Brazilian reais) per marketing template and R$ 0.0350 per utility or authentication template. Estimate your volume with the cost calculator.

Can Power Apps send WhatsApp messages?

Yes, by calling a Power Automate flow that does the send. In that case the flow is instant and runs in the context of the user who clicks, which affects licensing.


Official sources checked on November 10, 2026: Microsoft: Power Automate licensing FAQ, Microsoft: Assign a user license to a flow owned by a service principal, Microsoft: Secure data used in cloud flows, Microsoft: Environment variables for Azure Key Vault secrets, Microsoft: error handling in cloud flows, Microsoft: limits and configuration, Microsoft: Regenerate the SAS key used in HTTP trigger flows, Meta: send messages, Meta: error codes, Vectalk: quickstart, Vectalk: authentication, Vectalk: webhooks.

Put your business on the official WhatsApp

Create your account, connect your number to the official API (you can keep the app with coexistence) and start serving customers and sending messages.