View Categories

Sending Flows via Message Templates

1 min read

WhatsApp Flows are always triggered by a button inside an approved message template. This article explains how to create that template, get it approved, and send it via Baat.

Step 1 — Create your Flow in Meta Business Manager #

  1. Go to Meta Business Manager → WhatsApp → Flows
  2. Click Create Flow, give it a name and category
  3. Build your screens using the visual Flow Builder (or paste your Flow JSON in the code editor)
  4. Click Publish — the Flow gets a permanent flow_id

Note the flow_id — you’ll need it when creating the template.

Step 2 — Create a template with a Flow button #

  1. Go to Meta Business Manager → WhatsApp → Message Templates
  2. Click Create Template
  3. Choose a category (e.g. Utility for service flows, Marketing for lead gen)
  4. Add your message body and, under Buttons, select Flow
  5. Fill in the button fields:
Field Description
flow_id The ID of the published Flow from step 1
flow_cta Button label shown to the customer (e.g. “Book Now”)
flow_action navigate (opens a specific screen) or data_exchange
navigate_screen The id of the screen to open first (required if flow_action is navigate)
  1. Submit for review — templates in the Utility category are typically approved within minutes

Step 3 — Send the template via Baat #

Once the template is approved, it appears automatically in Baat under Settings → Channels → Templates. You can now send it from:

  • Inbox — Click Send Template, select the Flow template, and send
  • Broadcast — Create a new broadcast and select the Flow template
  • Journey Builder — Add a Send Template step and choose the Flow template

The API payload (for reference) #

Baat handles this automatically, but for reference, here is what the Cloud API call looks like when sending a Flow template:

POST https://graph.facebook.com/v19.0/{phone-number-id}/messages

{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "919876543210",
  "type": "template",
  "template": {
    "name": "book_appointment_v1",
    "language": { "code": "en" },
    "components": [
      {
        "type": "body",
        "parameters": [
          { "type": "text", "text": "Priya" }
        ]
      },
      {
        "type": "button",
        "sub_type": "flow",
        "index": "0",
        "parameters": [
          {
            "type": "action",
            "action": {
              "flow_token": "FLOW_TOKEN_abc123",
              "flow_action_data": {}
            }
          }
        ]
      }
    ]
  }
}
flow_token is a unique string you generate per send — it ties the Flow submission back to the specific conversation. Baat generates this automatically when sending via the dashboard. If you use the API directly, generate a UUID per send.

What happens after the customer submits #

  1. The Flow overlay closes and the customer returns to the chat
  2. WhatsApp delivers a webhook notification to Baat containing the submitted form data as a JSON payload
  3. Baat stores the response data in the conversation and makes it available to Journey Builder for the next step
  4. If you have a Journey step after the Flow, it triggers automatically using the submitted data

Webhook payload shape #

{
  "object": "whatsapp_business_account",
  "entry": [{
    "changes": [{
      "value": {
        "messages": [{
          "type": "interactive",
          "interactive": {
            "type": "nfm_reply",
            "nfm_reply": {
              "response_json": "{"full_name":"Priya Sharma","service_type":"spa","appointment_date":"2024-06-15"}",
              "body": "Sent",
              "name": "flow"
            }
          }
        }]
      }
    }]
  }]
}

The response_json string contains all submitted field values keyed by the name attribute you defined in your Flow JSON.