Chat with us
Up to 60% OFF with Recurring Discounts on Premium Upgrades & Whitelabel FlexUp to 60% OFF on Premium Upgrade & Whitelabel03:00:00:00Claim
Knowledgebase/Automation/Article

How to Set Up WhatsApp Webhook Workflows Using Google Sheets in BotSailor

  • 3 Nov 2026
  • 9 min read
  • 0 views
TL;DR:

BotSailor Webhook Workflows can receive data from an external source and use that data to automatically send a WhatsApp template message. In this guide, the practical example is:

Google SheetsApps ScriptBotSailor Webhook WorkflowWhatsApp Message

You will create an approved template, create a webhook workflow, configure the Google Sheet trigger, capture a sample webhook response, map the incoming fields, save the workflow, and test it.

How to Set Up WhatsApp Webhook Workflows Using Google Sheets in BotSailor

Create a webhook workflow, connect Google Sheets, map the incoming data, and check the WhatsApp notification.

BotSailor Webhook Workflows receive data from an external source and use that data to send a WhatsApp template message automatically. In this guide, Google Sheets provides the data and Google Apps Script sends it to the workflow’s callback URL.

The example is a monthly due reminder. You will prepare an approved template, configure the Google Sheet trigger, capture a sample payload, map the customer’s phone number and template values, and check the message received on WhatsApp.

Before You Begin

  • An active BotSailor account with a connected WhatsApp number.
  • An approved WhatsApp message template for your notification.
  • A Google Sheet and permission to use Google Apps Script.
  • A Phone Number column, plus columns for the template values such as customer name and due amount.
  • A WhatsApp-enabled test phone number you can use to verify the message.

Walkthrough example

The received message in this guide is addressed to Abir and shows a monthly due of 44.00 USD. Use your own test number and compare the received values with the same Google Sheet row.

What Is a Webhook Workflow?

A webhook workflow allows an external application to send data to BotSailor when an event occurs. BotSailor receives the incoming payload through a unique callback URL. You map the required fields, and the workflow uses those values in the selected WhatsApp template.

How This Example Workflow Works

Google SheetsApps ScriptBotSailor Webhook WorkflowWhatsApp Message
  • A row is inserted or edited in Google Sheets according to the configured script’s trigger behavior.
  • Google Apps Script sends the row data to the workflow’s Webhook Callback URL.
  • BotSailor captures the incoming webhook payload.
  • The phone number and template variables are mapped to the relevant row values.
  • The workflow sends the selected WhatsApp template using the mapped data.

Part 01: Create the WhatsApp Message Template

Chatbot ManagerSelect Your WhatsApp AccountAutomationMessage Templates

Open Message Templates

Log in to BotSailor, select your WhatsApp account, and go to Automation → Message Templates.

Create a new message template for the notification you want to automate.

Configure the Template

Enter a template name and choose the required locale and template category. Write the message body and add variables for the values that will come from the webhook data.

For a due-payment reminder, prepare the customer-name and due-amount values used in your message.

BotSailor message template editor with a monthly due message and a live WhatsApp preview.
Example message template with variables that can later be mapped to Google Sheets data.

Save, Sync, and Confirm Approval

Save the template, then sync its status with WhatsApp. Use the template in your webhook workflow only after it is approved.

Part 02: Create the Webhook Workflow in BotSailor

Chatbot ManagerSelect Your WhatsApp AccountAutomationWebhook Workflows

Open Webhook Workflows

From the selected WhatsApp account, go to Automation → Webhook Workflows. Click Create to start a new workflow.

Define the Workflow

Enter a descriptive workflow name. Select the approved WhatsApp message template prepared in Part 01, then review its preview to confirm that you selected the correct message.

Locate the Webhook Callback URL

In Configure Webhook Data, locate the unique Webhook Callback URL. Google Apps Script will call this endpoint when the configured sheet event occurs.

The script provided by Google Sheet Instruction already includes the workflow-specific endpoint. Use the script generated for this workflow.

BotSailor Webhook Workflow setup showing Workflow Details, template preview, Webhook Callback URL, Google Sheet Instruction, and Capture Webhook Response.
Workflow Details and Configure Webhook Data area showing the selected message template, Webhook Callback URL, Google Sheet Instruction button, and Capture Webhook Response option.

Part 03: Configure the Google Sheet Trigger

Prepare the Google Sheet

Make sure the sheet contains a column named Phone Number. Add separate columns for the template values, such as customer name and due amount. Keep the headers clear so the mapping step is easier.

Open Google Sheet Trigger Instruction

In the BotSailor workflow, click Google Sheet Instruction. Copy the Apps Script code provided for this workflow.

BotSailor Google Sheet Trigger Instruction panel containing setup steps and the generated Apps Script code.
Google Sheet Trigger Instruction panel showing the Apps Script setup steps and the workflow-specific onChange code.

Add the Script in Google Sheets

Google SheetsExtensionsApps Script

Open the Google Sheet and go to Extensions → Apps Script. In the Apps Script project for this setup, replace the default function with the code copied from BotSailor, then save the project.

Create the Apps Script Trigger

Open Triggers in the Apps Script editor and click Add Trigger. Use the following settings, then save the trigger:

Field
Setting
Function
onChange
Event source
From spreadsheet
Event type
On change
Google Apps Script Add Trigger dialog configured for onChange, From spreadsheet, and On change.
Apps Script trigger configuration using the onChange function, From spreadsheet event source, and On change event type.

Complete Google Authorization

Select the Google account that owns or can edit the sheet. Google may ask you to authorize the Apps Script project when you save the trigger for the first time.

Google Authorization Notice

Review the requested permissions. If Google displays an unverified-app warning for your own Apps Script project, continue only when you recognize and trust the project created from the BotSailor-provided script.

For that project, open Advanced if needed and select the option to continue. Review the permissions and click Allow if they match the script’s required actions.

Google unverified-app warning during authorization of the user-created Apps Script project.
Example Google unverified-app warning shown while authorizing a user-created Apps Script project.
Google account permissions screen for the Apps Script project.
Google permissions screen. Review the access requested by the Apps Script project before allowing it.

Part 04: Capture the Webhook Response

Start Capturing a Real-Time Response

Return to the BotSailor workflow and click Capture Webhook Response. BotSailor will wait for a sample event so it can identify the incoming data structure.

Trigger a Sample Sheet Event

Switch to Google Sheets and insert or edit a sample row according to the script’s configured behavior. Include a valid test phone number and values for every template variable. The Apps Script trigger sends the row data to BotSailor.

Review the Incoming Raw Data

After the sample event arrives, review the Raw Data panel. Check the row number, row data, and event type, such as INSERT_ROW or EDIT. Use this captured structure when mapping the template.

Captured Google Sheets webhook payload with a rowData array containing a phone number, Abir, and the due amount 44.
Raw Data panel showing a sample webhook payload received from Google Sheets.

Part 05: Map the Webhook Data to the WhatsApp Template

Map the Phone Number

In Webhook Response Mapping, select the incoming Google Sheet value that represents the Phone Number column. This mapping determines which WhatsApp number receives the message.

Map the Template Variables

For every variable in your approved template, select the matching value from the captured webhook payload. Map the customer-name value to USER-NAME and the due-amount value to DUE when those are the variables used by your template.

Field
Setting
Phone Number
The destination phone number from your Google Sheet.
USER-NAME
The customer-name value; the received example is Abir.
DUE
The due-amount value; the captured sample contains 44.

Use a formatter only when a value needs formatting before it is inserted into the template.

Match the captured field paths

Choose fields from your own captured response. In the Google Sheets sample, the name is the second value in rowData (rowData > 1). The updated mapping illustration also shows a nested sample path, billing_address > name; use the customer-name field actually available in your sheet payload.

Configure an Optional Delay

If needed, set a delay before BotSailor sends the message after the webhook is triggered. Use 0 minutes when the message should be sent immediately.

Updated Webhook Response Mapping with Phone Number, USER-NAME showing Abir, DUE showing 44, formatter selectors, and a zero-minute message delay.
Webhook Response Mapping showing the Phone Number mapping, a template-variable mapping, optional formatter fields, and message delay.

Part 06: Save and Activate the Workflow

Save the Mapping

Click Save Workflow after completing the mappings. BotSailor displays a confirmation when the workflow data has been mapped and saved successfully.

BotSailor success dialog confirming that the webhook workflow data has been mapped and saved.
Success confirmation after the webhook workflow mapping is saved.

Confirm the Workflow Status

Return to the Webhook Workflows list. Confirm that your workflow is active and verified.

The list provides processing and delivery information, including Targeted, Processed, Delivered, Opened, Failed, Skipped, and Last Called At.

BotSailor Webhook Workflows list with status, verification, delivery metrics, and Last Called At.
Webhook Workflows list showing the workflow status, verification state, delivery metrics, and last-called information.

Part 07: Test the Complete Automation

Add or Edit a Google Sheet Row

Enter a valid Phone Number and the values needed by the template variables. Insert a new row or edit an existing row according to the trigger behavior configured in Apps Script.

Check the WhatsApp Message

Confirm that BotSailor receives the webhook and sends the selected template to the mapped phone number. Compare the customer name and due amount in the received message with the same Google Sheet row.

Review the Workflow Report

Use Workflow Report or the workflow list to check whether the event was processed, delivered, failed, skipped, or not reached. Use Last Called At to confirm that the workflow received the latest sheet event.

Part 08: Review the End-user Notifications

Open WhatsApp on the destination phone and review the notification. The example below shows the monthly due reminder addressed to Abir, with the amount displayed as 44.00 USD. Earlier chat messages are blurred so the new notification is easy to identify.

WhatsApp monthly due notification: Hi Abir, Your Monthly Due is 44.00 USD. Please Pay Your Due Amount As Soon As Possible. Thanks. All earlier chat messages are blurred.
The end-user receives the monthly due reminder with Abir’s name and the amount 44.00 USD. Earlier messages are blurred.

Received WhatsApp message

Hi Abir,
Your Monthly Due is 44.00 USD.
Please Pay Your Due Amount As Soon As Possible.

Thanks.
  • Check that the message arrived at the phone number from the intended sheet row.
  • Confirm that the customer’s name and due amount match the expected values.
  • If a value is missing or incorrect, review the captured payload, the variable mapping, and any selected formatter.

Verification: How to Know It Worked

Verify the complete workflow

A Google Sheet event triggers Apps Script, BotSailor receives the webhook, the workflow remains active and verified, and the WhatsApp template reaches the intended phone number with the expected row values.

Common Troubleshooting

Issue
What to Check
The Google Sheet change does not trigger BotSailor
Confirm that the Apps Script project was saved, the onChange trigger uses From spreadsheet → On change, and Google authorization was completed.
Capture Webhook Response receives no sample data
Start Capture Webhook Response before triggering the sample event. Confirm that the script contains the callback URL for this workflow, then trigger another sheet event.
The phone number or a template variable is incorrect
Review Webhook Response Mapping. Check that each field points to the intended row value and that the sheet columns are in the expected positions.
The workflow receives data but sends no WhatsApp message
Check that the selected template is approved and available, the workflow is active and verified, and the report does not show Failed, Skipped, or Condition Failed.

For a video walkthrough, watch the Webhook Workflow configuration tutorial.

Key Takeaways

  • Webhook Workflows are the automation feature; Google Sheets is the data source in this example.
  • Capture a sample response before mapping the phone number and template variables.
  • Use an approved template and verify the received WhatsApp message against the source row.

Next Steps

  • Adapt the same webhook pattern for order updates, abandoned-cart recovery, COD verification, form submissions, or another system that can send webhook data.
  • Create separate workflows for different message templates or business events so each workflow has clear mapping and reporting.
Siddhartha Ghosh

Siddhartha Ghosh

FAQ

Frequently Asked Questions

Find answers to common questions about this topic

You can send WhatsApp messages from Google Sheets by connecting the sheet to a BotSailor Webhook Workflow. A Google Apps Script trigger sends row data to BotSailor when a row is inserted or edited. BotSailor then maps the phone number and template variables and sends the selected WhatsApp template message.

In BotSailor, create a Webhook Workflow and select an approved WhatsApp message template. Then use the provided Google Sheet Trigger Instruction to add the Apps Script to your Google Sheet. Configure the onChange trigger so changes in the sheet can send data to BotSailor and trigger a WhatsApp message.

Create a WhatsApp template in BotSailor, set up a Webhook Workflow, and connect it to Google Sheets using the provided Apps Script. When the configured sheet event occurs, the script sends the row data to BotSailor, which uses the mapped values to automatically send the WhatsApp template message.

A webhook allows an external application to send data to BotSailor when an event occurs. BotSailor receives the data through a unique callback URL, captures the incoming payload, maps the required fields, and uses those values in the configured WhatsApp automation

In BotSailor, create a Webhook Workflow, select an approved WhatsApp template, and connect an external data source to the workflow's callback URL. After BotSailor receives the webhook data, map the phone number and template variables, save the workflow, and activate it.

For the workflow described in this guide, BotSailor provides a Google Sheet Trigger Instruction containing the required Apps Script. Copy the script into Google Sheets → Extensions → Apps Script, save it, and create an onChange trigger using From spreadsheet → On change.

Copy the Apps Script generated by BotSailor into the Apps Script editor for your Google Sheet. Save the project and create an onChange trigger. When the configured sheet event occurs, the script sends the changed row data to BotSailor's workflow-specific webhook URL.

Add or edit a row in the connected Google Sheet according to the trigger behavior configured in Apps Script. The sheet should contain a valid Phone Number and the values required by the WhatsApp template. The Apps Script sends the row data to BotSailor, which then sends the configured message.

First, click Capture Webhook Response and trigger a sample event from Google Sheets. After BotSailor receives the sample payload, open Webhook Response Mapping and map the incoming Phone Number field and each template variable to the correct Google Sheet row value.

Make sure Capture Webhook Response is active before triggering the sample event. Also confirm that the Apps Script contains the correct workflow-specific webhook URL, that the script is saved, and that the Google Sheet trigger and authorization have been configured successful