Skip to content

Guide · For businesses

WhatsApp automation guide: triggers, workflows and webhooks, with a form-to-template example

How WhatsApp automation fits together (chatbots, workflows, campaigns), then a full build: website form to Custom Webhook, contact and tags in the CRM, a routed utility template, testing and limits.

By Broadchat teamPublished 9 min read

हिन्दी में पढ़ें

In short

WhatsApp automation has three tools: chatbots react to what customers write, workflows react to events in your other systems, and campaigns send to an audience at a time you choose. A workflow starts with a trigger such as a Custom Webhook URL, then runs steps: create or update the contact, tag it, branch on the data and send an approved template. Test with your own number, switch it on, and watch the run history.

Key takeaways

  • Chatbots start from customer messages; workflows start from events (a webhook call, a new contact, a field change, a payment); campaigns start from a schedule.
  • Workflow triggers are Custom Webhook, three CRM contact triggers and payment triggers; there is no built-in scheduled trigger.
  • Map data with {{step.field}}, for example {{1.phone}}; the receiver number must include the country code.
  • Run and Save executes a real step, so test template sends with your own number before mapping a live field.
  • Every processed step counts as a task, and External API Call and app steps such as Google Sheets use paid tasks from your plan.

Build a WhatsApp workflow from a website form to an approved template

Time needed: 1 h. You will need: Broadchat panel with the Automations module, A website form or system that can send an HTTP request.

  1. Pick the right automation tool

    Decide whether the job starts from a customer message (chatbot), an event in another system (workflow) or a planned send to a list (campaign). Form submissions are workflow jobs.

  2. Create the workflow and Custom Webhook trigger

    In Automations → Workflow click Create Workflow, rename it, add the Webhook app's Custom Webhook trigger, enter a Webhook Title, click + Generate Hook and copy the Webhook URL.

  3. Capture a real sample

    Click Capture Incoming Webhook and submit the form once. When the data arrives, click Show Received Data to see the fields you can map.

  4. Create or update the contact and tag it

    Add the CRM app's Create / Update Contact with WhatsApp Number {{1.phone}} and Name {{1.name}}, then Assign Tags to Contact (Creates Tag if Tag not exist) with a source tag.

  5. Branch with a router and filters

    Add a Basic Router from the connection's wrench menu and set up a filter on each path, for example department is Dental, so each path can tag or assign differently.

  6. Send the approved template

    Add Send Template Message (V2): choose the channel and template, map WhatsApp Number and each variable from the webhook data, and fill header media or button variables if the template has them.

  7. Test, activate and monitor

    Test with your own number, switch the workflow to Active, submit the form again and check the run in the workflow's History. Watch tasks in Automations → Analytics.

Three automation tools, three jobs

WhatsApp automation workflows are one of three tools, and most frustration comes from using the wrong one. Before building anything, decide what starts the job:

Starts when…ToolExample
A customer sends a message, taps an ad or a buttonChatbot (Chatbots → Chatbots)Answer "fees?", qualify a lead, book a slot
Something happens in another system or in your CRMWorkflow (Automations → Workflow)Website form, store order, payment, new contact
You decide to send to an audience at a timeCampaign (CRM → Bulk Campaign)Diwali offer to a segment, monthly newsletter

Workflows are the glue between WhatsApp and the rest of your business. A workflow begins with one trigger, then runs steps in order: CRM updates, messages, delays, lookups, calls to other apps. This guide explains the parts and then builds a complete example.

The parts of a workflow

Triggers. A workflow can start from:

  • Custom Webhook (Webhook app): a unique URL any system can call with GET, POST, PUT, PATCH or DELETE, with a JSON, form-encoded or multipart body up to 1 MB.
  • Trigger on New Contact Creation, Trigger on Any Custom Field Update and Trigger on Specific Custom Field Update (CRM app): react to changes in your contacts.
  • New Payment Order Created, Transaction Completed and Transaction Fail (Paymentz app): react to payments collected through Broadchat.

There is no scheduled (time-of-day) trigger. For "every morning at 9" jobs, have an external scheduler call the Custom Webhook, for example a Google Apps Script time-driven trigger as shown in sending WhatsApp messages from Google Sheets, or use a scheduled or repeating campaign.

Actions. The CRM app sends messages (Send Template Message (V2), and session messages such as Send Text Message (V2) for contacts inside the 24-hour window), manages contacts (Create / Update Contact, Update a Custom Field, tag actions, Assign Chat Agent) and more. Tools include Delay, Iterator, Goto, Workflow Counter, Data Forwarder and External API Call; native apps include Google Sheets, Google Drive, Zoho Books, Razorpay, Shopify and OpenAI.

Mapping. Each step's output is available to later steps as {{<step number>.<field>}}. Step 1 is the trigger, so a form field phone is {{1.phone}}, and nested data uses dots: {{1.billing.phone}}. Small functions help clean data: parseNumber() keeps only digits, slice(text;-10) keeps the last ten characters, and addDays(date;n) shifts a date.

The example: Sunrise Clinic's appointment request form

Sunrise Clinic in Pune has an appointment request form on its website. Reception used to copy each request into WhatsApp by hand. The workflow below sends an instant confirmation on WhatsApp, saves the patient in the CRM with tags, and routes dental requests differently. The form posts this JSON:

{
  "name": "Meera Joshi",
  "phone": "919812345678",
  "department": "Dental",
  "preferred_date": "15 Oct 2026",
  "request_id": "APT-30418",
  "whatsapp_consent": "yes"
}

The confirmation is a utility template, approved in advance in CRM → WhatsApp Templates:

Step 1: create the workflow and Custom Webhook trigger

  1. Open Automations → Workflow and click Create Workflow. Broadchat creates an Untitled workflow and opens the builder; rename it "Website appointment form".
  2. Click Add Trigger, choose the Webhook app and its Custom Webhook trigger.
  3. Enter a Webhook Title, click + Generate Hook and copy the Webhook URL. It looks like https://<your panel domain>/api/automations/hook/<token>.
  4. Paste the URL into your form tool's webhook setting (most WordPress form plugins and website builders have one), or ask your developer to POST the form data to it from the server.

Step 2: capture a real sample

Click Capture Incoming Webhook (it shows Waiting for data...) and submit the form once with test values. When "Data received" appears, click Show Received Data. The sample is stored for mapping and does not run the workflow. Capturing works even before the workflow is active.

Step 3: create or update the contact and tag it

Click + after the trigger and add the CRM app:

  1. Create / Update Contact: WhatsApp Number {{1.phone}}, Name {{1.name}}. Existing contacts are updated, new ones created.
  2. Assign Tags to Contact (Creates Tag if Tag not exist): tags src-website, appointment-request.

If your form collects 10-digit numbers without the country code, map the number as 91slice(parseNumber({{1.phone}});-10): it strips spaces and symbols, keeps the last ten digits and adds 91. Use this only if all your patients have Indian numbers.

Step 4: branch with a router and filters

Dental requests go to a different receptionist. Click the wrench on the connection after the tag step and choose Add Basic Router. On each path, Set up filter:

PathFilterSteps on this path
Dental{{1.department}} is DentalAssign Chat Agent (Agent Email: dental reception), tag dept-dental
Everything else{{1.department}} is not DentalAssign Chat Agent (Agent Email: main reception)

A Basic Router runs every path whose filter passes; a path without a filter always runs. Text filters offer is, is not, Contains, Start with, Match pattern and their opposites (including case-insensitive versions); number filters offer greater than, less than and equals; Exist and Not Exist check whether a field is present.

Step 5: send the approved template

Since both paths send the same confirmation, the simplest place for it is just before the router, after the tag step; if paths need different templates, add one send step at the end of each path. Add CRM → Send Template Message (V2):

FieldValue
Select ChannelSunrise Clinic's WhatsApp number
Select Templateappointment_request_received
WhatsApp Number{{1.phone}} (with country code)
Template variable 1{{1.name}}
Template variable 2{{1.request_id}}
Template variable 3{{1.department}}
Template variable 4{{1.preferred_date}}

Only approved templates for the selected channel appear in the list. If the template has an image or document header, the step shows a header field; leave it empty to use the template's own media. URL buttons with a variable get their own field.

Step 6: test, activate and monitor

  1. Run and Save on a step runs that one step against the captured sample, and it is real: a CRM step changes the contact and a Send Template step sends the message. Submit the test form with your own phone number before you use it.
  2. Click Save Workflow and switch the workflow on with the toggle in the top bar. An inactive workflow answers callers with 409 "workflow is inactive".
  3. Submit the form again. The caller gets {"accepted":true,"runId":"…"} and the workflow runs in the background.
  4. Open the workflow's History from the list: each run shows its status (Success, Failed, Queued, Running, Waiting) and each step's request and response. History is kept for 30 days, and Retrigger Workflow re-runs a past run.
SymptomCauseFix
Message not receivedNumber without country code, or template not approved for that channelCheck the number in the run log; pick the template again after changing channel
"Insufficient task to perform the action"Paid tasks used upCheck Automations → Analytics; ask your provider for an add-on
404 "invalid flow"Hook regenerated or workflow deletedCopy the current Webhook URL into the form
Empty variablesWrong path, such as {{1.body.name}}Map exactly as shown in Show Received Data

Costs and limits to plan for

  • Meta charges. Utility templates are charged per delivered message even inside an open 24-hour window since 1 Oct 2026 (₹0.115 per utility message to India, Meta rate card effective 1 Oct 2026, excl. GST), from the channel's messaging wallet. A low balance makes the send fail.
  • Tasks. Every processed step counts as a task; External API Call and app steps such as Google Sheets, Shopify or OpenAI also use one paid task each from your plan's allowance.
  • Delays. A Delay step can wait minutes to weeks (relative delays up to 30 days) or until a fixed date-time; waiting runs survive restarts, but turning the workflow off cancels them.
  • Loops. One run stops after 400 steps, which matters if you iterate over long lists.

For the reverse direction, sending WhatsApp events to your own server, see WhatsApp webhooks. For order notifications from a store, follow WooCommerce WhatsApp order notifications, and for multi-step follow-ups see WhatsApp drip campaigns with workflows. New to the platform? Start with what the WhatsApp Business API is. Agencies can build and sell automations like this under their own brand with the white-label platform.

Sources

  1. Send message templates — Meta for Developers, checked 12 October 2026
  2. Pricing on the WhatsApp Business Platform — Meta for Developers, checked 12 October 2026
  3. Getting opt-in for WhatsApp — Meta for Developers, checked 12 October 2026
  4. Template categorization — Meta for Developers, checked 12 October 2026

Broadchat team · Product and partner success team

The people who build and support Broadchat, the white-label WhatsApp Business API platform. We write from what we see while onboarding partners and their clients on the official WhatsApp Cloud API, and we check every article against Meta's current documentation.

Last updated:

Frequently asked questions

What is the difference between a WhatsApp chatbot and a workflow?

A chatbot starts when a customer messages you and runs a conversation. A workflow starts from an event elsewhere, such as a form submission, a new contact or a payment, and runs steps like updating the CRM and sending an approved template.

Can a workflow send WhatsApp messages on a schedule?

There is no scheduled trigger in workflows. Use a Delay step inside a workflow, a scheduled or repeating campaign, or an external scheduler such as a Google Apps Script time-driven trigger that calls the workflow's Custom Webhook URL.

Does a workflow check the 24-hour window or opt-in?

No. Template sends work at any time because templates are allowed outside the window, but session messages such as Send Text Message only reach contacts inside it. Opt-in is your responsibility: collect consent and filter on it before the send step.

How do I test a workflow without messaging customers?

Capture a sample with your own phone number as the recipient, then use Run and Save on each step. Run and Save really executes the step, so never test with a customer's data.

See Broadchat on a real WhatsApp number

A short walkthrough of campaigns, chatbots, the team inbox and the partner panel, built around your use case.