Integrations
Connect Google Calendar
Connect a Google Calendar to an assistant so every booking, reschedule and cancellation it makes is written to your calendar, and learn how AIVA's appointment book works.
When a caller or website visitor books with your assistant, AIVA saves the appointment in its own appointment book and writes it to the assistant's Google Calendar. Reschedules and cancellations move or delete the event there too. The connection uses a Google Cloud service account: a robot Google account that AIVA signs in as, with permission to edit one calendar. You connect a calendar per assistant, and each assistant writes to one calendar. You need a Google account with access to Google Cloud, the calendar you want to use, and an assistant that can book appointments.
How the connection works (read this first)
How AIVA finds a free slot depends on where the customer is booking:
- On phone calls (and in the website widget's voice mode), AIVA checks its own appointment book. That book holds bookings made by your assistants and bookings your team adds on the Appointments page, which is how AIVA bookings avoid double-booking each other. Events you add directly in Google Calendar are not seen on calls and don't block those slots.
- In website chat, AIVA checks your Google Calendar's busy times before offering a slot, so events in that calendar do block chat bookings. Booking in website chat needs a connected Google Calendar.
- Every booking, reschedule and cancellation, from either channel, is then written to the assistant's Google Calendar and saved in AIVA's appointment book.
1. Create a service account in Google Cloud
Do this in Google Cloud. Google's screens change from time to time, so follow Google's own guides for the exact clicks:
- Create (or pick) a Google Cloud project and enable the Google Calendar API for it.
- Create a service account in that project (Google's guide).
- Create a key for the service account in JSON format and download it (Google's guide).
Open the JSON file in a text editor. You need two values from it:
client_email: the service account's email address.private_key: the long block that starts with-----BEGIN PRIVATE KEY-----and ends with-----END PRIVATE KEY-----.
Keep this file private. Anyone who has it can edit the calendars you share with the service account.
2. Share your calendar with the service account
- In Google Calendar, open Settings and sharing for the calendar you want bookings to go into.
- Share it with the service account's email (
client_email) and give it the Make changes to events permission (Google's guide to sharing a calendar). - In the same settings, under Integrate calendar, find the Calendar ID and copy it. For your main calendar, it's usually your Gmail address. For other calendars, it's a longer address ending in
@group.calendar.google.com.
A separate calendar just for AIVA bookings is a good idea. It keeps AI bookings easy to spot.
3. Add the credentials to your assistant
- In the sidebar, under AI Configuration, open Assistants, then click the assistant.
- On the General tab, scroll to Google Calendar. Until it's connected, it says Not connected.
- Click Add credentials.
- Fill in:
- Calendar ID: the ID you copied in step 2.
- Service account email: the
client_emailvalue. - Private key: paste the whole
private_keyvalue, including the BEGIN and END lines.
- Click Save draft.
If you're using the full-page Create Assistant form instead, the same details go under Function Configuration: choose Google Calendar Booking in Select Function, then fill in Google Calendar ID, Google Client Email and Google Private Key.
The section now shows Saved. The private key is never shown again once saved. To change the credentials, click Replace. Leave a field blank to keep its current value. To disconnect, click Remove. The assistant then stops booking until you add new credentials, and the change takes effect when you save.
4. Make sure booking is switched on
Open the assistant's Actions tab and check that the booking actions are on, such as Checking calendar availability and Booking the appointment, plus rescheduling and cancelling if you want them. The Receptionist, Support and Follow-up agent types start with booking switched off, so turn it on here if you need it.
Then test it: book an appointment on a test call, and check that it appears on the Appointments page and in your Google Calendar.
Add bookings made outside AIVA
- In the sidebar, under Campaign & Scheduling, open Appointments.
- Click New appointment.
- Fill in Customer name, Phone, Service, Length, Date and Time, and choose which assistant it's Handled by. Add Notes if you like.
- Click Book appointment.
The booking goes into AIVA's appointment book, so the assistant won't offer that slot, and it's written to that assistant's Google Calendar like any other booking. You can also mark appointments as completed or no-show on the Appointments page.
Troubleshooting
Bookings show in AIVA but not in Google Calendar. Check that the calendar is shared with the exact service account email and that the service account can make changes to events. Check that the Calendar ID is correct. If needed, click Replace and paste the private key again, including the BEGIN and END lines.
The assistant booked over a meeting in my calendar. On phone calls this is expected: calls check AIVA's appointment book, not Google Calendar. Add those times on the Appointments page so calls see them too. (Website chat already checks your calendar's busy times.)
I have two assistants. Each one has its own Google Calendar section on its General tab, so add the credentials to each assistant that books appointments.
Next steps
Something here doesn’t match what you see in the dashboard? Email support@aivachat.io and we’ll fix the guide.