Connect Google Calendar to B6AI
Set up the Google Calendar integration end to end, from creating credentials in Google Calendar to verifying the live connection and using it in your bots.
Overview
The Google Calendar integration lets bots check availability and book appointments during a conversation, perfect for demos, callbacks, consultations and service bookings.
Customers pick a time in chat and the event lands on your calendar, with an invite sent automatically.
What you can do with Google Calendar
Once connected, your bots and agents can use Google Calendar inside conversations and automations. Typical uses include:
- Check free/busy on a calendar before offering a slot.
- Create an event/booking and invite the customer.
- Reschedule or cancel an existing event.
- List upcoming available slots for the customer to choose from.
How the integration works
B6AI uses Google OAuth 2.0 and the Calendar API. You grant calendar access and choose the target calendar; B6AI reads availability and creates events server-side.
Prerequisites
Make sure all of the following are in place before you start. Each one is required, skipping any will cause the connection to fail later.
- A Google account or Workspace with the calendar you want to use.
- A Google Cloud project where you can enable the Calendar API and create OAuth credentials.
- Access to the target calendar.
- The Enterprise Admin role in B6AI.
Create or prepare your Google Calendar account
If your organization does not already use Google Calendar, create an account first. Existing customers can skip to the next step.
- In Google Cloud Console, enable the “Google Calendar API”.
- In Google Calendar → the calendar’s Settings → Integrate calendar, copy the Calendar ID (often the email, or an …@group.calendar.google.com value).
Generate your Google OAuth 2.0 credentials (Client ID & Secret)
B6AI authenticates with Google Calendar using your Google OAuth 2.0 credentials (Client ID & Secret). Follow these steps exactly, each field you copy here is entered into B6AI later.
- In Google Cloud Console, open APIs & Services → OAuth consent screen and add the calendar scopes below.
- Open Credentials → Create credentials → OAuth client ID → Web application.
- Add the B6AI redirect URL under Authorized redirect URIs.
- Create the client and copy the Client ID and Client secret.
https://app.b6ai.ai/integrations/google-calendar/callbackThe B6AI redirect / callback URL
During credential setup, Google Calendar asks for an authorized redirect (callback) URL. This is where Google Calendar returns you after you approve access. Use the exact URL below, a mismatch is the most common cause of a failed connection.
https://app.b6ai.ai/integrations/google-calendar/callbackRequired permissions & scopes
Grant only the scopes below. Each one maps to a specific B6AI capability; requesting fewer reduces risk and speeds up any review your Google Calendar administrator performs. The table explains exactly what each scope allows and why it is needed.
| Scope / permission | What it allows | Why B6AI needs it |
|---|---|---|
| calendar.events | Create, read and update events | Book, reschedule and cancel appointments |
| calendar.readonly | Read calendars and free/busy | Check availability before offering a slot |
Connect Google Calendar in B6AI
Now enter your credentials in B6AI. Signed in as an Enterprise Admin, open Settings → Integrations, find the Google Calendar card and click Connect, then complete the form. Every field is explained below.
- In B6AI, open Settings → Integrations → Google Calendar and click Connect.
- Paste the Client ID and Client secret and complete consent.
- Enter the Calendar ID, time zone and default slot length.
- Click Save.
| Field | What it is | Example value |
|---|---|---|
| Client ID | OAuth client identifier | …apps.googleusercontent.com |
| Client secret | OAuth client secret | GOCSPX-… |
| Calendar ID | The target calendar | bookings@yourco.com |
| Time zone | Time zone used for slots and events | Asia/Kolkata |
| Default slot length | Default appointment duration | 30m |
Verify the connection
Confirm the integration is live before you rely on it in a bot.
- Confirm the Google Calendar card shows “Connected”.
- Run the test: it creates a test event about an hour ahead.
- Confirm the event appears on the calendar, then delete it.
Troubleshooting
If the connection fails or an action does not work, match the symptom below to its cause and fix.
| Symptom / error | Likely cause | How to fix it |
|---|---|---|
| redirect_uri_mismatch | Callback not registered | Add the exact B6AI redirect URL |
| 404 (calendar) | Wrong Calendar ID | Copy the Calendar ID from the calendar’s settings |
| 403 insufficient | A required scope is missing | Add the calendar.events scope and reconnect |
| Double-booking | Availability wasn’t checked first | Enable the free/busy check before booking |
Limitations & rate limits
Keep these constraints in mind so your bots behave predictably at scale.
- The Calendar API enforces per-user and per-project quotas.
- Time zones must be consistent between B6AI and the calendar.
- B6AI reads and writes only the calendars you grant access to.
Security best practices
- Grant only the scopes and permissions listed above, never request more “just in case”.
- Rotate your Google OAuth 2.0 credentials (Client ID & Secret) on a regular schedule, and immediately if you suspect exposure.
- Restrict the Enterprise Admin role (which manages integrations) to a small, trusted group.
- Prefer a dedicated service account or bot user over a personal login, so access survives staff changes.
- Review the integration’s activity in the B6AI Activity Logs periodically for unexpected calls.
- Disconnect the integration the moment a credential leaks; then rotate it in Google Calendar before reconnecting.
Recommendations
- Test against a sandbox or non-production Google Calendar account before connecting live data.
- Document which bots and flows depend on this integration so changes are predictable.
- Set a recurring reminder to review scopes and rotate credentials.
- Enable only the capabilities you actually use today; you can widen scopes later.