Skip to main content
RapidDev - Software Development Agency
bubble-tutorial

How to integrate Google Calendar in Bubble

Integrate Google Calendar with your Bubble app by setting up OAuth2 authentication through the API Connector, then creating API calls to read events, create new events, and update existing ones. Users authorize their Google account once, and your app can then display their calendar events and push new events directly from Bubble workflows.

What you'll learn

  • How to set up Google Calendar API OAuth2 in Bubble's API Connector
  • How to pull calendar events into Bubble and display them
  • How to create new Google Calendar events from Bubble workflows
  • How to handle authorization and token refresh
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner6 min read20-25 minAll Bubble plansMarch 2026RapidDev Engineering Team
TL;DR

Integrate Google Calendar with your Bubble app by setting up OAuth2 authentication through the API Connector, then creating API calls to read events, create new events, and update existing ones. Users authorize their Google account once, and your app can then display their calendar events and push new events directly from Bubble workflows.

Integrating Google Calendar with Your Bubble App

Google Calendar integration lets your app sync with users' calendars — display their events, create new ones from bookings or appointments, and keep everything in sync. This tutorial covers setting up the Google Calendar API via Bubble's API Connector with OAuth2 authentication, pulling events into your app, and creating events from Bubble workflows. Ideal for booking apps, project managers, or any tool that involves scheduling.

Prerequisites

  • A Bubble account with an app open in the editor
  • A Google Cloud Console account with a project created
  • The Google Calendar API enabled in your Google Cloud project
  • OAuth 2.0 credentials (Client ID and Client Secret) from Google Cloud Console
  • The API Connector plugin installed

Step-by-step guide

1

Set up OAuth 2.0 credentials in Google Cloud Console

Go to console.cloud.google.com → select your project → APIs & Services → Credentials → Create Credentials → OAuth client ID. Select 'Web application' as the type. Add your Bubble app's redirect URL in 'Authorized redirect URIs' — it follows the pattern: https://yourapp.bubbleapps.io/api/1.1/oauth_redirect. Copy the Client ID and Client Secret. Also go to OAuth consent screen and configure your app name and scopes — add 'https://www.googleapis.com/auth/calendar' for full calendar access.

Expected result: OAuth credentials (Client ID and Secret) are created with the correct redirect URI and calendar scope.

2

Configure the Google Calendar API in the API Connector

In Bubble, go to Plugins → API Connector → Add another API. Name it 'GoogleCalendar.' Set Authentication to 'OAuth2 User-Agent Flow.' Enter: App ID = your Client ID, App Secret = your Client Secret, Scope = 'https://www.googleapis.com/auth/calendar', Login dialog redirect = 'https://accounts.google.com/o/oauth2/v2/auth', Access token endpoint = 'https://oauth2.googleapis.com/token'. Check 'Use a generic redirect URL' and copy the generated redirect URL back to your Google Cloud Console authorized redirect URIs if it differs.

Expected result: The API Connector is configured with Google's OAuth2 flow, ready to authenticate users.

3

Create an API call to fetch calendar events

Add a new call named 'get_events.' Set Use as: Data, Method: GET, URL: https://www.googleapis.com/calendar/v3/calendars/primary/events?timeMin=[start_date]&timeMax=[end_date]&singleEvents=true&orderBy=startTime. Add parameters: start_date (test value: RFC 3339 format like '2026-03-01T00:00:00Z') and end_date. Click 'Initialize call' — it will prompt you to authenticate with Google. After authorizing, the response maps fields including items (the event list), each with summary, start, end, description, and location.

Pro tip: Use 'singleEvents=true' to expand recurring events into individual instances. Without it, recurring events show as a single entry with recurrence rules.

Expected result: The API call is initialized and returns a list of calendar events with titles, dates, and descriptions.

4

Display Google Calendar events in your app

On your calendar or schedule page, add a Repeating Group with Type of content set to 'get_events items' (the nested type from the API response). Set the Data source to 'Get data from an external API → GoogleCalendar - get_events' with start_date = Current date/time:rounded down to month (formatted as RFC 3339) and end_date = same + 1 month. In each cell, display: summary (event title), start's dateTime (formatted), end's dateTime, and description.

Expected result: Your app displays the user's Google Calendar events for the current month in a Repeating Group.

5

Create a workflow to add new events to Google Calendar

Add another API call named 'create_event.' Set Use as: Action, Method: POST, URL: https://www.googleapis.com/calendar/v3/calendars/primary/events. Add header: Content-Type = application/json. Set the body with dynamic parameters for event details. Initialize with test data. On your booking or event creation page, after saving the event to your Bubble database, add the plugin action: GoogleCalendar - create_event with parameters mapped from your form inputs.

API Connector body - create event
1{
2 "summary": "<event_title>",
3 "description": "<event_description>",
4 "start": {
5 "dateTime": "<start_datetime>",
6 "timeZone": "America/New_York"
7 },
8 "end": {
9 "dateTime": "<end_datetime>",
10 "timeZone": "America/New_York"
11 },
12 "location": "<location>"
13}

Expected result: Events created in your Bubble app are automatically added to the user's Google Calendar.

6

Add the Google authorization button for users

On the user settings or first-use page, add a Button labeled 'Connect Google Calendar.' In the workflow: When clicked → Account → Signup/login with a social network → select GoogleCalendar (the OAuth2 API you configured). This triggers the Google OAuth flow, asking the user to grant calendar access. Once authorized, all subsequent API calls will use the user's access token automatically. Add a conditional to show 'Connected' status when the user has already authorized.

Expected result: Users can authorize their Google account with one click, and the app maintains the connection for future API calls.

Complete working example

API Connector payload
1{
2 "api_name": "GoogleCalendar",
3 "authentication": {
4 "type": "OAuth2 User-Agent Flow",
5 "client_id": "[YOUR_CLIENT_ID]",
6 "client_secret": "[YOUR_CLIENT_SECRET]",
7 "scope": "https://www.googleapis.com/auth/calendar",
8 "auth_url": "https://accounts.google.com/o/oauth2/v2/auth",
9 "token_url": "https://oauth2.googleapis.com/token"
10 },
11 "calls": [
12 {
13 "name": "get_events",
14 "use_as": "Data",
15 "method": "GET",
16 "url": "https://www.googleapis.com/calendar/v3/calendars/primary/events?timeMin=[start_date]&timeMax=[end_date]&singleEvents=true&orderBy=startTime"
17 },
18 {
19 "name": "create_event",
20 "use_as": "Action",
21 "method": "POST",
22 "url": "https://www.googleapis.com/calendar/v3/calendars/primary/events",
23 "headers": { "Content-Type": "application/json" },
24 "body": {
25 "summary": "[title]",
26 "description": "[description]",
27 "start": { "dateTime": "[start_iso]", "timeZone": "[timezone]" },
28 "end": { "dateTime": "[end_iso]", "timeZone": "[timezone]" },
29 "location": "[location]"
30 }
31 },
32 {
33 "name": "delete_event",
34 "use_as": "Action",
35 "method": "DELETE",
36 "url": "https://www.googleapis.com/calendar/v3/calendars/primary/events/[event_id]"
37 }
38 ]
39}

Common mistakes when integrating Google Calendar in Bubble

Why it's a problem: Using incorrect date format for the Google Calendar API

How to avoid: Format dates using Bubble's ':format as' operator with a custom format matching RFC 3339, or use the ':formatted as ISO 8601' option.

Why it's a problem: Not enabling the Google Calendar API in Google Cloud Console

How to avoid: Go to APIs & Services → Library → search 'Google Calendar API' → click Enable.

Why it's a problem: Forgetting to add the redirect URI to Google Cloud Console

How to avoid: Copy the exact redirect URL from the API Connector and add it to Authorized redirect URIs in your Google OAuth credentials.

Best practices

  • Always use 'singleEvents=true' when fetching events to expand recurring events into individual instances
  • Format dates in RFC 3339 format for all Google Calendar API calls
  • Store the Google Calendar event ID in your Bubble database so you can update or delete events later
  • Add timezone handling — pass the user's timezone with event creation requests
  • Cache fetched events in your Bubble database to reduce API calls and enable offline display
  • Show a clear 'Connect Google Calendar' button with authorization status indicators

Still stuck?

Copy one of these prompts to get a personalized, step-by-step explanation.

ChatGPT Prompt

How do I integrate Google Calendar with my Bubble.io app? I need to set up OAuth2 authentication, fetch a user's calendar events, and create new events from Bubble workflows. Walk me through the API Connector setup, date formatting, and authorization flow.

Bubble Prompt

Integrate Google Calendar into my app. Set up OAuth2 with the API Connector using my Google Cloud credentials. Create calls to fetch events for a date range and create new events. Add an authorization button for users and display their calendar events on the dashboard page.

Frequently asked questions

Do users need a Google account to use this integration?

Yes. Users must authorize their Google account through the OAuth flow. Non-Google users cannot use Google Calendar features.

Can I access shared or team calendars?

Yes. Replace 'primary' in the API URL with the specific calendar ID (found in Google Calendar settings). The user must have access to that calendar.

What happens when the OAuth token expires?

Bubble's API Connector handles token refresh automatically using the refresh token stored during initial authorization. Users do not need to re-authorize.

Can I set up two-way sync between Bubble events and Google Calendar?

Yes. When creating events in Bubble, also create them in Google Calendar. When events are updated in Google Calendar, use Google's push notifications (webhooks) to update your Bubble database. The webhook setup requires a backend workflow endpoint.

Is there a simpler alternative without OAuth?

For read-only access to public calendars, you can use Google Calendar's public iCal feed URL without authentication. For private calendars, OAuth is required.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.