Calendar automation

Integrate WhatsApp with Google Calendar

This integration connects the events in your Google Calendar to WhatsApp through ZapZap API, an unofficial, instance-based WhatsApp API. For every upcoming event, a script reads the calendar and fires an automatic reminder message to the right number, without you ever opening WhatsApp. ZapZap API runs on dedicated instances, authenticates with x-api-key and x-api-secret, and costs R$15 per active number per month on the prepaid model, with a welcome credit when you create the account, subject to the current campaign, so you can test the integration before scaling.

Why connect

An aesthetics clinic books every appointment in Google Calendar. One day before each slot, a Google Apps Script scans tomorrow's events, extracts the client's phone number from the event description and sends a personalized WhatsApp reminder with date, time and address. The result is fewer no-shows, fewer last-minute reschedules and a calendar that talks to the client on its own, all starting from the same calendar the front desk already uses every day.

Step by step

  1. 1

    Create your instance on ZapZap API

    Go to the dashboard at app.zapzapapi.com, create an active number and connect it by scanning the QR Code in WhatsApp. In the instance menu, copy your x-api-key and x-api-secret, which will be used to authenticate the calls.

  2. 2

    Open the Google Apps Script linked to the calendar

    Go to script.google.com and click New project. This environment has native access to the CalendarApp service, which reads the events of your Google Calendar account without any extra credentials.

  3. 3

    Write the script that reads the events and calls the API

    In the editor, use CalendarApp.getDefaultCalendar().getEventsForDay(date) to fetch the appointments and UrlFetchApp.fetch() to send each reminder through ZapZap API. Put the client's phone number in the description of each event so the script can extract it.

  4. 4

    Create a time-driven trigger

    In the Apps Script side menu, click Triggers (the clock icon), then Add Trigger. Choose the sending function, the event type Time-driven and set a daily trigger at the time you want, for example 8 AM to notify about the day's appointments.

  5. 5

    Authorize and test

    Click Run once, accept the permissions for Google Calendar and external internet access. Check that the reminder reached your test WhatsApp and adjust the message text before leaving it running in production.

Example

// ILLUSTRATIVE example in Google Apps Script.
// Check the real endpoints and fields at https://api.zapzapapi.com/llms.txt

function sendReminders() {
  const tomorrow = new Date();
  tomorrow.setDate(tomorrow.getDate() + 1);

  const events = CalendarApp.getDefaultCalendar().getEventsForDay(tomorrow);
  const instanceId = 'YOUR_INSTANCE_ID';

  events.forEach(function (evento) {
    // Phone number saved in the event description
    const numero = evento.getDescription().trim();
    const hora = Utilities.formatDate(evento.getStartTime(), 'America/Sao_Paulo', 'HH:mm');
    const texto = 'Reminder: you have ' + evento.getTitle() + ' tomorrow at ' + hora + '.';

    UrlFetchApp.fetch('https://api.zapzapapi.com/api/v1/' + instanceId + '/send/text', {
      method: 'post',
      contentType: 'application/json',
      headers: {
        'x-api-key': 'YOUR_API_KEY',
        'x-api-secret': 'YOUR_API_SECRET'
      },
      payload: JSON.stringify({
        number: numero,
        text: texto
      })
    });
  });
}

Illustrative. The exact fields and endpoints are in the documentation.

Frequently asked questions

Do I need the official WhatsApp Business API for this to work?

No. ZapZap API is an unofficial, instance-based WhatsApp API. You connect a regular number by scanning the QR Code and can start sending messages from your Google Calendar events right away, with no official account approval process.

How much does it cost to keep this automation running?

The cost is R$15 per active number per month, on the prepaid model. You only pay for the numbers you connect, and you also get a welcome credit when you create the account, subject to the current campaign, so you can test the calendar integration before going to production.

Is Google Apps Script the only way to integrate?

It is the most direct path because it has native access to Google Calendar, but you can also use automation tools such as n8n, Make or Zapier, or your own backend, as long as it reads the calendar events and calls ZapZap API over HTTP.

Where do I put the client's phone number in the event?

In the example, the number is in the event description, where the script extracts it. You can adapt it to read from guests, from a standardized field in the title or from a linked external spreadsheet, depending on your booking flow.

How do I find the exact endpoints and fields of the API?

This example is illustrative. The always up-to-date reference for endpoints, fields and authentication formats is at https://api.zapzapapi.com/llms.txt, which is the source of truth for building your calls.

Start now

Create your account, connect a number in minutes and test the API with warm-up and anti-ban. R$15 per active number/month, prepaid, no lock-in.