Send an instant WhatsApp alert to your team the moment a Google Form is submitted, or send a confirmation message to the person who filled it in. No third-party tools, no polling. A short Apps Script fires the moment a response comes in.
Most guides in this series show WA.Expert calling an external service. This one is reversed: Google Forms calls WA.Expert. When someone submits a form, an Apps Script trigger fires and sends the response data to WA.Expert, which then sends a WhatsApp message. No External API Request step is needed on the WA.Expert side. The trigger comes from Google.
Apps Script has two trigger types. A simple trigger (a function literally named onSubmit) only runs when you test it manually in the editor. It does not fire on real form submissions. An installable trigger, added from the Triggers menu (the clock icon in the sidebar), registers with Google and fires on every real submission. If your script is not running on submissions, a missing installable trigger is almost certainly the reason.
Apps Script Form triggers: developers.google.com
Replace the editor content with this script. Set
WA_WEBHOOK_URL to your WA.Expert automation webhook URL,
and adjust the field titles to match your form's actual question text.
var WA_WEBHOOK_URL = 'YOUR_WA_EXPERT_WEBHOOK_URL';
function onFormSubmit(e) {{
var response = e.response;
var items = response.getItemResponses();
var payload = {{}};
// Build a key:value map of question title -> answer
for (var i = 0; i < items.length; i++) {{
var title = items[i].getItem().getTitle();
var answer = items[i].getResponse();
payload[title] = answer;
}}
// Add the submission timestamp
payload['submitted_at'] = response.getTimestamp().toISOString();
// Send to WA.Expert
var options = {{
'method': 'post',
'contentType': 'application/json',
'payload': JSON.stringify(payload)
}};
UrlFetchApp.fetch(WA_WEBHOOK_URL, options);
}}
// NOTE: After saving, add an installable trigger for this function
// Triggers menu -> Add Trigger -> onFormSubmit -> From form -> On form submitThe script builds a JSON object where each key is a form question
title and each value is the answer. For example, if your form has a field titled
"WhatsApp Number", the payload will include
"WhatsApp Number": "+919820000001".
After adding the trigger, submit your form as a real user (open the form link and fill it in). The Run button in the editor does not pass a real form event object, so the script will error. A live submission is the only reliable test.
When the form is submitted, WA.Expert receives a POST with a JSON body like this:
POST https://your-wa-expert-webhook-url
Content-Type: application/json
Body:
{{
"Full Name": "Priya Sharma",
"WhatsApp Number": "+919820000001",
"Email": "priya@example.com",
"Enquiry Type": "Product Demo",
"Message": "I would like to see a demo of your platform.",
"submitted_at": "2026-06-23T08:30:00.000Z"
}}
In WA.Expert, map these JSON keys to automation variables:
{{customer_name}} <- Full Name
{{customer_phone}} <- WhatsApp Number
{{customer_email}} <- Email
{{enquiry_type}} <- Enquiry Type
{{customer_message}} <- Message| Form type | WhatsApp message sent |
|---|---|
| Lead / enquiry form | Team alert: 'New lead from Priya Sharma (+919820000001): Product Demo' |
| Registration / booking form | Confirmation to submitter: 'Your booking is confirmed, Priya. We will see you on 25 June.' |
| Support / complaint form | Team alert with priority + submitter phone so someone can call back |
| Survey / feedback form | Thank-you message to submitter with a link to results or next steps |
| Event RSVP form | Instant RSVP confirmation to attendee with event details and joining link |
Any combination works: alert your team AND send a confirmation to the submitter in the same WA.Expert automation flow.
1. Someone fills in your 'Request a Demo' Google Form.
2. Apps Script onFormSubmit fires, builds JSON payload:
{{"Full Name":"Priya","WhatsApp Number":"+919820000001",
"Enquiry Type":"Product Demo","submitted_at":"2026-06-23T..."}}
3. UrlFetchApp POSTs the payload to your WA.Expert webhook URL.
4. WA.Expert automation receives it and maps:
customer_name = Priya
customer_phone = +919820000001
enquiry_type = Product Demo
5. WA.Expert sends two WhatsApp messages:
TO YOUR TEAM (+91 XXXXXXXXXX):
'New demo request from Priya Sharma.
Phone: +919820000001
Type: Product Demo
Reply to claim this lead.'
TO THE SUBMITTER (+919820000001):
'Hi Priya! We received your demo request.
Our team will contact you within 2 hours.
— WA.Expert Team'| Symptom | Likely cause | Fix |
|---|---|---|
| Script not firing on submissions | Missing installable trigger | Add an installable trigger in the Triggers menu (clock icon). A simple function named onSubmit does not fire on real submissions. |
| Error when testing via Run button | No real form event object | The Run button does not pass a real event. Test by submitting the form as a real user via the form link. |
| TypeError: Cannot read properties of undefined | Wrong question title | The title in the script must match the form field title exactly, including capitalisation and punctuation. Check the form editor. |
| WA.Expert not receiving the call | Wrong webhook URL | Check the WA_WEBHOOK_URL value in the script. Test the URL independently with a tool like webhook.site to confirm it is reachable. |
| Trigger appears but fails | Script authorisation not approved | Click the trigger in the Triggers panel, then re-authorise. Check the execution log for the specific error. |
| Phone number includes spaces or dashes | Raw form input | Strip non-numeric characters in the script before posting: phone.replace(/[^0-9+]/g, ''). Always include the country code. |
Log WhatsApp leads and orders to a Google Sheet automatically.
Read guide →Typeform native webhooks: simpler than Apps Script, same outcome.
Read guide →Free trial, no credit card. If you get stuck, we answer live on WhatsApp.