Updated on November 24, 2026
To capture leads with a form inside WhatsApp, use WhatsApp Flows: you build a screen with fields (name, email, phone, interest and consent), send the Flow to the contact and receive the answers on your webhook, ready to go into your CRM. The lead fills it in without leaving the chat, and you get structured data instead of loose messages to interpret.
This guide covers the marketing use case: how to design the form, when to send it as a template and when to send it inside the customer service window, how to read the response and how to get the lead into your CRM with as little code as possible.
Why a form inside WhatsApp
People who arrive on WhatsApp, whether from an ad, a QR code or a link on your site, usually send “hi” and wait. Qualification turns into a back-and-forth of questions, and the sales rep copies answers into the CRM by hand. A form fixes three problems at once:
- Standardized data. The email arrives in an email field, the interest comes from a closed list. No more “I want the plan from that ad”.
- Less friction. The form opens on top of the conversation. The lead doesn’t have to visit a landing page or download anything.
- Recorded consent. An opt-in field with clear wording stores, alongside the lead, permission to receive marketing messages.
WhatsApp Flows is Meta’s official feature for this. In the Flows creation API, Meta lists the categories SIGN_UP, SIGN_IN, APPOINTMENT_BOOKING, LEAD_GENERATION, CONTACT_US, CUSTOMER_SUPPORT, SURVEY and OTHER. A lead capture form uses LEAD_GENERATION.
Building the form without heavy code
Meta documents three ways to create a Flow:
- Flow Builder. The Flows getting-started page includes a video showing how to create a Flow using Meta’s Flow Builder interface.
- Playground. Meta offers a playground to configure and preview a basic Flow and copy the generated JSON.
- Flows API. If you want to version the form in code, you create and publish the Flow through the API.
In all three cases, the output is a Flow JSON. For a lead form, one screen is enough. Here is a complete example:
{
"version": "6.0",
"screens": [
{
"id": "LEAD",
"title": "Talk to us",
"terminal": true,
"success": true,
"layout": {
"type": "SingleColumnLayout",
"children": [
{ "type": "TextBody", "text": "Takes 30 seconds. A consultant will reply right here." },
{ "type": "TextInput", "name": "name", "label": "Your name", "input-type": "text", "required": true },
{ "type": "TextInput", "name": "email", "label": "Email", "input-type": "email", "required": true },
{ "type": "TextInput", "name": "phone", "label": "Other phone", "input-type": "phone", "required": false },
{
"type": "Dropdown",
"name": "interest",
"label": "I'm interested in",
"required": true,
"data-source": [
{ "id": "basic_plan", "title": "Basic plan" },
{ "id": "pro_plan", "title": "Pro plan" },
{ "id": "question", "title": "Just a question" }
]
},
{
"type": "OptIn",
"name": "marketing_optin",
"label": "I agree to receive offers from Example Store on WhatsApp. I can opt out anytime."
},
{
"type": "Footer",
"label": "Send",
"on-click-action": {
"name": "complete",
"payload": {
"name": "${form.name}",
"email": "${form.email}",
"phone": "${form.phone}",
"interest": "${form.interest}",
"marketing_optin": "${form.marketing_optin}"
}
}
}
]
}
}
]
}
The footer button uses the complete action: when tapped, the Flow closes and the payload data comes back to you on the webhook. Note that this example doesn’t call any server of yours while the lead is filling it in. The Flow template example in Meta’s own sending guide follows the same model, with the Flow JSON embedded and a complete footer. If the form needs real-time data (stock, available slots, price by ZIP code), you need the data_exchange action and an encrypted endpoint, covered in the article on the Flows endpoint and encryption.
Component limits that matter for a form
Meta’s components page sets limits that shape the design:
| Component | Use in the form | Relevant limits |
|---|---|---|
TextInput | Name, email, phone | input-type: text, number, email, password, passcode, phone; label up to 20 characters |
Dropdown | Interest, budget range, city | At least 1 option; label up to 20 characters |
RadioButtonsGroup | Single choice visible on screen | Up to 20 options |
OptIn | Marketing consent, terms acceptance | Text up to 120 characters; up to 5 per screen |
Footer | Submit button | Label up to 35 characters |
| Screen | Group of components | Up to 50 components per screen |
The 20-character TextInput label limit catches many people: “What’s your best email address?” doesn’t fit. Keep labels short and explain the rest in a TextBody.
Form best practices
- Ask only for what sales will use. The WhatsApp number already arrives on the webhook, so don’t ask for it again. That’s why “Other phone” is optional in the example.
- Closed lists for qualification. Interest, company size and purchase timeline work better as a
Dropdownthan as free text, because they become filters in the CRM. - Separate, optional consent. Putting marketing consent in its own unchecked
OptInmakes it clear what the person agreed to. - One screen if possible. For lead capture, fewer steps tend to mean fewer drop-offs. Split into screens only when questions depend on earlier answers.
Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →
How to send the form
The Flow reaches the lead in two ways, according to the sending guide:
| Situation | How to send | Cost for recipients in Brazil |
|---|---|---|
| The lead messaged you in the last 24 hours | Interactive message of type flow | Service message (free tier of 1,000 per month per number; charged from the 1,001st) |
| Outside the window, to opted-in contacts | Template with a FLOW button | Template rate; marketing costs BRL 0.3217 per delivered message |
Inside the window: interactive message
This is the most common lead capture case: the lead clicked an ad or a link and sent “hi”. The 24-hour window is open, and you reply with the form:
{
"messaging_product": "whatsapp",
"to": "15551234567",
"type": "interactive",
"interactive": {
"type": "flow",
"body": { "text": "Hi! To help you faster, please fill in this short form." },
"action": {
"name": "flow",
"parameters": {
"flow_message_version": "3",
"flow_token": "lead-ctwa-20261124-0001",
"flow_id": "1234567890123456",
"flow_cta": "Fill in the form",
"flow_action": "navigate",
"flow_action_payload": { "screen": "LEAD" }
}
}
}
}
flow_cta is the button text; Meta recommends 30 characters or fewer, with no emoji. Pass either flow_id or flow_name, never both.
If the lead came from a Click-to-WhatsApp ad, store the source data that arrives on the webhook and include it in the flow_token. That way the lead lands in the CRM already tagged with the right campaign. See how in tracking Click-to-WhatsApp ads. When the lead comes from a Facebook or Instagram lead form, the path is different and is covered in Meta Lead Ads with WhatsApp.
Outside the window: template with a FLOW button
To invite people already on your opt-in list (for example, someone who downloaded an ebook and agreed to be contacted), create a template with a FLOW button. The button text can be up to 25 characters:
{
"name": "lead_form_invite",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "BODY",
"text": "Hi {{1}}! Want a quote for the Pro plan? Answer 4 quick questions and a consultant will get in touch.",
"example": { "body_text": [["Emma"]] }
},
{
"type": "BUTTONS",
"buttons": [
{ "type": "FLOW", "text": "Get my quote", "flow_id": "1234567890123456", "flow_action": "navigate" }
]
}
]
}
The category is marketing because the goal is to sell. Meta confirms the category during approval. When sending, the button carries the flow_token:
{
"messaging_product": "whatsapp",
"to": "15551234567",
"type": "template",
"template": {
"name": "lead_form_invite",
"language": { "code": "en_US" },
"components": [
{ "type": "body", "parameters": [{ "type": "text", "text": "Emma" }] },
{
"type": "button",
"sub_type": "flow",
"index": "0",
"parameters": [{ "type": "action", "action": { "flow_token": "lead-list-ebook-0042" } }]
}
]
}
}
Marketing templates go only to people who opted in. How to build that list is covered in building a WhatsApp opt-in list.
Draft and publishing
Every Flow starts as DRAFT. In that state it can only be sent with "mode": "draft", for testing. Once published (PUBLISHED), don’t treat the Flow as an editable draft: to change the form, follow the lifecycle in Meta’s documentation or create a new Flow based on the current one. Flows you no longer use can be marked DEPRECATED. Always test in draft mode with an internal number before publishing.
Reading the response and pushing the lead to your CRM
When the lead taps “Send”, your webhook receives an interactive message of type nfm_reply. The response_json field is a JSON string with the flow_token and the complete action payload, according to the Flows webhooks documentation:
{
"from": "15551234567",
"id": "wamid.HBgN...",
"timestamp": "1764000000",
"type": "interactive",
"interactive": {
"type": "nfm_reply",
"nfm_reply": {
"name": "flow",
"body": "Sent",
"response_json": "{\"flow_token\": \"lead-ctwa-20261124-0001\", \"name\": \"Emma Brown\", \"email\": \"emma@example.com\", \"phone\": \"\", \"interest\": \"pro_plan\", \"marketing_optin\": true}"
}
}
}
The response does not include the Flow ID. That’s why the flow_token matters so much: use a prefix per form and per source (lead-ctwa-, lead-list-ebook-) so you know where each lead came from.
Pushing to the CRM doesn’t require a complex server. This Node.js snippet receives the webhook, extracts the lead and forwards it to your CRM’s inbound webhook (most CRMs, and tools like n8n, Make and Zapier, accept a JSON POST):
const CRM_WEBHOOK = process.env.CRM_WEBHOOK_URL;
export async function handleLead(msg) {
if (msg.type !== 'interactive' || msg.interactive.type !== 'nfm_reply') return;
const r = JSON.parse(msg.interactive.nfm_reply.response_json);
const lead = {
whatsapp: msg.from,
name: r.name,
email: r.email,
extra_phone: r.phone || null,
interest: r.interest,
marketing_optin: r.marketing_optin === true,
source: r.flow_token,
received_at: new Date(Number(msg.timestamp) * 1000).toISOString(),
};
await fetch(CRM_WEBHOOK, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(lead),
});
}
The lead’s response opens the 24-hour window. Use it: confirm receipt with a free-form message and, for high-intent leads, hand the conversation to a sales rep. Sync patterns are covered in WhatsApp API CRM integration.
Consent and LGPD
The form collects personal data. In Brazil, that falls under the LGPD (Lei 13.709/2018), the country’s general data protection law; elsewhere, your local privacy law applies. In practice: state what the data will be used for, store the consent record with date and source (the flow_token and timestamp help), and honor opt-out requests. Meta requires opt-in before a business starts conversations and asks businesses to honor opt-out requests. More in LGPD and WhatsApp. This is not legal advice; consult a lawyer.
How to do it with Vectalk
Vectalk is a proxy for the official WhatsApp Business API, so the Flow JSON, payloads and webhooks are Meta’s:
- Create and publish the Flow: Flows endpoints (creation with name and categories such as
LEAD_GENERATION) and publishing, with an instance token. - Create the template with a FLOW button: the Create Template endpoint or the templates area of the dashboard.
- Send:
POST https://apis.vectalk.com.br/api/messages, withtype: "interactive"(Flow) ortype: "template", as in the sending reference. - Receive responses: register your URL with
POST https://apis.vectalk.com.br/api/webhooks. The webhook carries the same payload Meta sends, includingnfm_reply.
Vectalk has no native CRM or support inbox: the lead goes to your CRM or to a tool connected to the API. Each delivered message is deducted from your prepaid balance, with no card registered at Meta. Create your account to test the form.
Frequently asked questions
Do I need to code to create a WhatsApp lead form?
Not necessarily to design it: Meta’s Flow Builder interface and playground let you build and preview the Flow. To send the Flow and read responses, you need something connected to the API, either a small script like the one in this guide or a tool such as n8n, Make or your CRM.
Can I send the form to any number?
No. Outside the 24-hour window, only with an approved template and only to people who opted in. Inside the window, opened when the lead messaged you, you can send the Flow as an interactive message.
Does the form need my own server while the lead fills it in?
Not if it only collects data and closes with complete, as in the example. A server comes in when the Flow has to fetch or validate information in real time, using data_exchange and an encrypted endpoint.
How do I know which campaign each lead came from?
The Flow response doesn’t include the Flow ID. Put the source in the flow_token when sending (for example, lead-ctwa- plus the ad ID) and read it back from response_json.
Can I edit a Flow after publishing it?
A published Flow isn’t changed directly; follow the lifecycle in Meta’s documentation, or create a new Flow based on the current one and publish the new version.
Official sources consulted on November 24, 2026: WhatsApp Flows (Meta), Flows getting started (Meta), Sending a Flow (Meta), Flows components (Meta), Flows webhooks (Meta), Flows API (Meta), Pricing (Meta), Getting opt-in (Meta), Vectalk: Flows, Vectalk: sending messages, Vectalk: webhooks.
Try the official WhatsApp API today
Create your account, generate a token and send your first message with the quick-start guide. Same payloads and webhooks as Meta's Cloud API.
