Platform
Chatbot Builder Bulk Messaging Team Inbox Mini CRM API & Webhooks AI Integration WhatsApp Flows
Industries
E-commerce & D2C Real Estate Education Healthcare Finance & BFSI Logistics Hospitality Retail
Integrations
Learn
Learning Hub Help & Docs Connect Guides Automation Codex Blog Message Templates
Pricing Start Free Trial →
HomeConnect › Connect Google Calendar to WhatsApp
Google Calendar Integration Guide · Forms / Productivity

Connect Google Calendar to WhatsApp

Create a Google Calendar event the moment a customer books on WhatsApp, and send automatic appointment reminders before the slot. No more manual diary entries or missed follow-ups.

Published 23 June 2026  ·  7 min read  ·  Forms / Productivity

Before following this guide, read the External API Request step foundation guide. It covers every field in the step interface so this guide can focus on Calendar-specific values.

Two use cases, two directions

Use case 1 (WA.Expert calls Google): customer books on WhatsApp, automation creates a Calendar event. Use case 2 (Google calls WA.Expert): upcoming event triggers a WhatsApp reminder. Both are covered in this guide.

Apps Script avoids OAuth for both use cases

Creating or reading Calendar events via the Google Calendar API requires an OAuth access token, not a plain API key. The simplest path for both use cases is Apps Script, which runs as your own Google account and has calendar access without any token exchange in WA.Expert.

Use case 1: Create a Calendar event from a WhatsApp booking

Step 1: Create the Apps Script web app

1
Go to script.google.com and create a new project.
2
Paste the script below. It reads appointment details from the POST body and creates the event using CalendarApp.
3
Click Deploy → New deployment → Web app. Set Execute as Me, access Anyone. Deploy and copy the URL.
Apps Script doPost — create Calendar event
function doPost(e) {{
  var data  = JSON.parse(e.postData.contents);
  var cal   = CalendarApp.getDefaultCalendar();

  // Parse start time from ISO string, e.g. '2026-06-25T10:00:00'
  var start = new Date(data.start_datetime);
  var end   = new Date(data.end_datetime);

  var options = {{
    description: data.description || '',
    guests:      data.customer_email || '',
    sendInvites: true
  }};

  var event = cal.createEvent(
    data.title,
    start,
    end,
    options
  );

  return ContentService
    .createTextOutput(JSON.stringify({{
      status:   'ok',
      event_id: event.getId(),
      link:     event.getEventSeriesId()
    }}))
    .setMimeType(ContentService.MimeType.JSON);
}}

Step 2: Post the booking from WA.Expert

External API Request Step · WA.Expert
Select Method
POST
Request URL
https://script.google.com/macros/s/AKfy.../exec
Select Auth Type
No Auth
Header Parameters
Content-Typeapplication/json
Select Body Type
JSON
Body
{{"title":"Consultation: {{{{customer_name}}}}","start_datetime":"{{{{slot_start}}}}","end_datetime":"{{{{slot_end}}}}","description":"WhatsApp booking","customer_email":"{{{{customer_email}}}}"}}
Choose Response Type
JSON
POST body and response
Body:
{{
  "title":           "Consultation: Priya Sharma",
  "start_datetime":  "2026-06-25T10:00:00",
  "end_datetime":    "2026-06-25T10:30:00",
  "description":     "WhatsApp booking — product demo request",
  "customer_email":  "priya@example.com"
}}

Response:
{{"status": "ok", "event_id": "abc123_2026062510@google.com"}}

"The event appears in your Google Calendar immediately.
The customer receives a Google Calendar invite if customer_email is provided.
Date format for start_datetime

Pass dates as ISO 8601 strings: 2026-06-25T10:00:00. The script parses them with new Date(). Collect the slot from the customer in WhatsApp as a variable, or build the string from separate date and time variables: {{slot_date}}T{{slot_time}}:00.

Use case 2: Send WhatsApp reminders for upcoming events

Set up a daily Apps Script trigger that reads tomorrow's events and posts each one to WA.Expert with the customer's phone number, so WA.Expert sends a WhatsApp reminder.

Apps Script — daily reminder trigger
var WA_WEBHOOK = 'YOUR_WA_EXPERT_WEBHOOK_URL';

function sendReminders() {{
  var cal      = CalendarApp.getDefaultCalendar();
  var tomorrow = new Date();
  tomorrow.setDate(tomorrow.getDate() + 1);

  var events = cal.getEventsForDay(tomorrow);

  events.forEach(function(event) {{
    var desc  = event.getDescription();
    // Extract phone from description (e.g. 'phone:+919820000001')
    var match = desc.match(/phone:([\+0-9]+)/);
    if (!match) return;

    var payload = {{
      phone:     match[1],
      title:     event.getTitle(),
      startTime: event.getStartTime().toLocaleString('en-IN'),
      location:  event.getLocation() || 'your scheduled session'
    }};

    UrlFetchApp.fetch(WA_WEBHOOK, {{
      method:      'post',
      contentType: 'application/json',
      payload:     JSON.stringify(payload)
    }});
  }});
}}

// Add a time-driven trigger: Triggers -> Add Trigger
// sendReminders -> Time-driven -> Day timer -> 8am-9am
Store the phone number in the event description

When creating the event (Use case 1), include the customer's WhatsApp number in the event description using a parseable format like phone:+919820000001. The reminder script then extracts it with a regex and sends the reminder to the right number.

Reference: direct Calendar API v3 (advanced)

If you prefer the direct API, here is the create-event endpoint. You need a valid OAuth access token from a service account.

Direct Calendar API v3 — create event
POST https://www.googleapis.com/calendar/v3/calendars/primary/events
     ?sendUpdates=all
Authorization: Bearer YOUR_OAUTH_ACCESS_TOKEN
Content-Type: application/json

Body:
{{
  "summary":     "Consultation: Priya Sharma",
  "description": "WhatsApp booking",
  "start": {{"dateTime": "2026-06-25T10:00:00+05:30",
             "timeZone": "Asia/Kolkata"}},
  "end":   {{"dateTime": "2026-06-25T10:30:00+05:30",
             "timeZone": "Asia/Kolkata"}},
  "attendees": [{{"email": "priya@example.com"}}]
}}

Response (HTTP 200):
{{
  "kind":    "calendar#event",
  "id":      "abc123",
  "htmlLink":"https://calendar.google.com/calendar/event?eid=...",
  "status":  "confirmed"
}}

Map: id -> event_id, htmlLink -> calendar_link
FieldValueNotes
calendarIdprimary'primary' for your main calendar.
summaryEvent titleWhat appears in the calendar.
start.dateTimeRFC 3339 datetimee.g. 2026-06-25T10:00:00+05:30
start.timeZoneIANA timezonee.g. Asia/Kolkata
attendees[].emailCustomer emailSends a calendar invite if sendUpdates=all.
sendUpdates query paramall / externalOnly / noneall sends invites to all attendees.

Worked example: WhatsApp appointment booking

Full flow — WhatsApp booking to Google Calendar event
Customer: 'I want to book a consultation'

Bot collects:
  {{customer_name}}  = Priya Sharma
  {{customer_email}} = priya@example.com
  {{slot_date}}      = 2026-06-25
  {{slot_time}}      = 10:00

External API Request step:
POST https://script.google.com/macros/s/AKfy.../exec
Body:
  title:           'Consultation: Priya Sharma'
  start_datetime:  '2026-06-25T10:00:00'
  end_datetime:    '2026-06-25T10:30:00'
  description:     'phone:+919820000001'
  customer_email:  'priya@example.com'

Response: {{status: 'ok', event_id: '...'}}

WA.Expert replies to Priya:
'Your appointment is confirmed for 25 June at 10:00 AM.
You will receive a reminder on WhatsApp the day before.
See you then!'

Next morning (8 AM), the daily reminder script fires:
  Reads tomorrow's event for Priya
  Extracts phone from description: +919820000001
  Posts to WA.Expert webhook

WA.Expert sends Priya:
'Reminder: your consultation is tomorrow at 10:00 AM.
Reply CONFIRM to confirm or CANCEL to reschedule.'

Troubleshooting

SymptomLikely causeFix
Event not createdScript not deployed or wrong URLEnsure you deployed as a Web App (not just saved). Use the /exec URL, not the /dev URL. Redeploy after any script changes.
Date parsing errorInvalid datetime stringPass ISO 8601 format: 2026-06-25T10:00:00. Ensure the variable contains the full datetime, not just a date or time.
No invite sent to customersendInvites not set or no email providedInclude customer_email in the payload and set sendInvites: true in the script. For the direct API, add sendUpdates=all as a query parameter.
Reminder not firingMissing time-driven triggerIn Apps Script, add a trigger: Triggers -> Add Trigger -> sendReminders -> Time-driven -> Day timer -> 8am-9am.
Direct API 401Invalid or expired OAuth tokenAccess tokens expire after about an hour. Use the Apps Script method to avoid token management entirely.
Calendar event goes to wrong calendarDefault calendar is not what you expectUse CalendarApp.getCalendarById('calendar@email.com') to target a specific calendar instead of getDefaultCalendar().

Common questions

What is the simplest way to create a Calendar event from WhatsApp?
+
Apps Script Web App. Deploy a doPost handler, POST the booking details from WA.Expert. No OAuth required. The script runs as you.
Can I use a Google API key for Calendar?
+
No. Creating events needs OAuth. A plain API key is read-only for public calendars. Use the Apps Script method to avoid this.
What date format does Calendar use?
+
RFC 3339: 2026-06-25T10:00:00+05:30. Include timezone offset or use the timeZone field with an IANA name like Asia/Kolkata.
How do I send reminders?
+
A time-driven Apps Script trigger runs daily, reads tomorrow's events with CalendarApp.getEventsForDay(), extracts the phone from the description, and posts to WA.Expert which sends the WhatsApp reminder.
How do I add the customer as an attendee?
+
Include customer_email in the payload. In the script: options.guests = email and options.sendInvites = true. For the direct API: attendees: [{email: ...}] and sendUpdates=all in the query params.
Does this incur extra WA.Expert charges?
+
One automation action per External API Request call. Included on the Complete plan. Starter: from Rs. 49 per 1,000 actions. Google Calendar and Apps Script are free.

Connect Calendly to WhatsApp

Calendly webhooks: simpler booking integration with native webhook support.

Read guide →

Connect Google Sheets to WhatsApp

Log WhatsApp bookings to a Google Sheet alongside the Calendar event.

Read guide →

External API Request Step

Master every field in WA.Expert's HTTP action step.

Read foundation guide →

Connect Google Calendar to WhatsApp today

Free trial, no credit card. If you get stuck, we answer live on WhatsApp.

Start Free Trial → Book a Demo
1