Skip to main content
WhatsApp → Webhook Workflow sends a WhatsApp template message whenever data arrives from an outside system through a webhook call — most commonly a new or edited row in Google Sheets. Each workflow is tied to one WhatsApp Account and one Message Template, and every field in the incoming data can fill in that template’s variables.
Google Sheets (row added/edited)


Apps Script trigger


ChatSyncs Webhook Callback URL


Webhook Workflow


WhatsApp Template Message Sent

Prerequisite: a message template with variables

Before creating a workflow, the message template it will send needs Template Variables — placeholders that get filled in from the webhook data.
Message Template settings page with a Template Variables section and a Create button
1

Open Message Template settings

In Chatbot Manager, open Message Template, and scroll down to Template Variables.
2

Create a variable

Click Create and name it — no spaces allowed, e.g. deliverydate.
Create Template Variable modal with a Variable Name field containing deliverydate
3

Use the variable inside a template

Create or edit a message template and insert your variables into the body using #!variablename!#, alongside built-in Custom Fields and Variables like Name.
Message Template editor with body text Total: #!totalprice!#, Delivery date: #!deliverydate!#, and a live WhatsApp preview on the right
For example, a template body of:
Hi, Thanks for shopping with us! Here are the details of your order:

Product: [productlist]
Total: #!totalprice!#
Delivery date: #!deliverydate!#
4

Sync the template

Click Sync Template so its approval status updates from Meta.
Message Template Settings page with a Successful banner after clicking Sync Template, and a list of templates with their approval status
The template must show Approved before a workflow can send it.

Step 1: Create the workflow

Webhook Workflow list showing an existing order update workflow with delivery stats, and a Workflow Details form below with Workflow Name, WhatsApp Account, and Message Template fields
In WhatsApp → Webhook Workflow, fill in Workflow Details:
  • Workflow Name — e.g. order update
  • WhatsApp Account — which connected number sends the message
  • Message Template — the approved template to send, e.g. orderdetails
Click Create Workflow. This workflow’s purpose, as ChatSyncs describes it: “Send WhatsApp template message based on data received from 3rd party webhook call.”

Step 2: Get the webhook URL

Webhook Callback URL shown after creating a workflow, with Google Sheet Trigger Instruction and Capture Webhook Response buttons
ChatSyncs generates a unique Webhook Callback URL for this workflow, e.g. https://platform.chatsyncs.com/webhook/whatsapp-workflow/xxxxxxx. Copy it — you’ll paste it into whatever system will call it (a Google Sheet’s Apps Script, in this example). Each workflow has its own URL, so a test submission or record sent to it only affects this one workflow.

Step 3: Create your sheet’s header columns first

Google Sheet with header row: phone number, product list, total price, delivery date
Before touching Apps Script, set up your sheet’s header row to match the fields your template needs — e.g. phone number, productlist, price. Each column becomes a field ChatSyncs can map to a template variable, using either [fieldname] (custom field) or #fieldname# (template variable) syntax depending on how it’s referenced in your template.
The phone number column is mandatory. Without it, ChatSyncs has no way to know which WhatsApp number to send the message to — every other column is optional and only needed if your template actually uses it.

Step 4: Wire up Google Sheets

Click Google Sheet Trigger Instruction for the exact script to paste in:
Google Sheet Trigger Instruction modal with steps to go to the Apps Script editor, add the code, set up a trigger, and test the function, plus an onChange function code sample
1

Open Apps Script

In your Google Sheet, go to Extensions → Apps Script.
2

Paste the code

Paste in the onChange function ChatSyncs gives you in the instructions above — it already includes a sendToWebhook function wired to your workflow’s webhook URL:
Apps Script Code.gs editor with the full onChange and sendToWebhook functions pasted in, including the workflow's webhook URL
It detects an inserted row (INSERT_ROW) or an edited row (EDIT) and sends that row’s data to the webhook URL.
Press Ctrl+S to save the script before continuing. If you skip this, the trigger you add next won’t run the code you just pasted.
3

Add a trigger

Click the Triggers (clock) icon, then Add Trigger:
Apps Script Triggers page listing one trigger: function onChange, event From spreadsheet - On change
Add Trigger modal set to function onChange, deployment Head, event source From spreadsheet, event type On change
Set Choose which function to run to onChange, Select event source to From spreadsheet, and Select event type to On change. Save.

Step 5: Test, capture, and map the fields

Add a real row of data to try it:
Google Sheet with two test rows: a phone number, product, price, and delivery date for each
The onChange trigger fires automatically and calls your workflow’s webhook URL. Back in ChatSyncs, click Capture Webhook Response so the workflow detects the incoming fields from that test row:
Webhook Callback URL screen with the Capture Webhook Response button highlighted
The first time you do this, ChatSyncs shows a variable assigning / mapping step — match each detected sheet field (phone number, productlist, price, …) to the corresponding template variable you created earlier. Once mapped and saved, every future row sent through this webhook fills in the template automatically using that same mapping.

Monitoring workflows

WhatsApp Webhook (in-bound) Workflow list with two order update workflows and their Sent, Delivered, Opened, Failed, Skipped, and Unreached stats, and a Workflow Report button
The workflow list shows Sent, Delivered, Opened, Failed, Skipped, and Unreached counts for every workflow. Click Workflow Report for the full call-by-call log:
WhatsApp Webhook Workflow Report table with columns Phone Number, Status, Response, Triggered at, Scheduled at, Response, and Webhook Data
Each row shows the Phone Number the message went to, its Status (e.g. Completed), Response (e.g. Success), Triggered at / Scheduled at timestamps, and the raw Response and Webhook Data payloads — useful for confirming exactly what data a specific row sent.

Common use cases

  • Order confirmation — notify a customer the moment their order row is added.
  • Shipping updates — send tracking info after a dispatch row is logged.
  • Appointment reminders — trigger from a bookings sheet.
  • Payment confirmation — notify once a payment row is marked received.
  • Lead follow-up — instantly message a new lead captured in a sheet.
  • Customer onboarding — welcome a new row automatically.
  • Event registration — confirm a signup with a personalized message.

Best practices

  • Always include a phone number column — it’s mandatory; without it ChatSyncs has no destination for the message.
  • Store phone numbers in international format (e.g. 919876543210) — this is what the webhook payload and WhatsApp both expect.
  • Save your Apps Script with Ctrl+S before adding the trigger — an unsaved script won’t run when the trigger fires.
  • Keep spreadsheet column headers consistent — the workflow maps fields by header name, so a renamed column breaks the mapping silently.
  • Test with Capture Webhook Response before going live — confirm the fields it detects match what you expect before relying on it for real customers.
  • Use an approved template — a workflow can’t send a template that hasn’t come back Approved from Sync Template.
  • Check the Workflow Report regularly — it’s the fastest way to spot a spike in Failed or Skipped sends.

Frequently asked

Create a message template with the variables you need, create a Webhook Workflow pointing at that template, copy its webhook URL into a Google Apps Script onChange trigger on your sheet (via Google Sheet Trigger Instruction), then test with Capture Webhook Response.
Click Capture Webhook Response after triggering a fresh test row — this is how ChatSyncs detects which fields are coming in. If it still doesn’t show your columns, check that the Apps Script trigger is active and that the sheet’s header row matches what you expect.
Yes — every row that triggers the webhook (a new row, or an edit) runs the workflow again for that row’s phone number.
Open Webhook Workflow → Workflow Report and search by phone number — it shows the Status, Response, and the exact Webhook Data received for that send.
Google Sheets (via Apps Script) is the common case, but the webhook URL just needs an HTTP call with the right data — any third-party system capable of calling a webhook can trigger the same workflow.