Skip to main content

Google Calendar

Adding Google Calendar as data source

Do the following to add Google Calendar as data source:

  1. From the left navigation panel, click Lakehouse and then click Data Sources.
  2. From the upper right corner of the page, click the + New Data Source button to start the process of adding a new database.
  3. In the New Data Source page, click the Google Calendar icon.
  4. Specify the following details to add Google Calendar. Once you have connected a data source, the system immediately fetches its schema. After this schema retrieval process is complete you can browse and interact with the tables and data.
FieldDescription
Connection NameEnter a unique name for the connection.
Calendar IDSpecify the Google Calendar ID you wish to sync (e.g., primary or an email address).
Client IDEnter your Google OAuth Client ID. This is obtained from the Google Cloud Console.
Client SecretEnter your Google OAuth Client Secret.
Refresh TokenProvide the OAuth refresh token generated for your Google account to allow persistent access.
  1. Click Submit.

Supported streams

  • Calendars: Metadata for the calendars in the user's account.
  • Calendar List: The list of calendars that appear on the user's calendar interface.
  • Events: Individual events and appointments from the specified calendar.
  • ACL: Access control lists defining permissions for the calendar.
  • Settings: User settings for the calendar service.
  • Free/Busy: Times when the calendar is blocked (calculated based on events).

Google Calendar API Key Generation Guide

Step 1: Create Google Cloud Project and Enable API

  1. Go to Google Cloud Console
  2. Click "Select a project" dropdown at the top
  3. Click "New Project"
  4. Enter project name (e.g., "Calendar Integration")
  5. Click "Create"
  6. Wait for project creation to complete
  7. Enable Google Calendar API:
    • Go to "APIs & Services" > "Library"
    • Search for "Google Calendar API"
    • Click on it and click "Enable"

Step 2: Create OAuth 2.0 Credentials

  1. Go to "APIs & Services" > "Credentials"
  2. Click "Create Credentials" > "OAuth 2.0 Client IDs"
  3. If prompted, configure OAuth consent screen first:
    • Click "Configure Consent Screen"
    • Choose "External" (unless using Google Workspace)
    • Fill required fields: App name, User support email, Developer contact
    • Click "Save and Continue" through all steps
  4. Return to "Create Credentials" > "OAuth 2.0 Client IDs"
  5. Choose "Web application" as application type
  6. Enter name (e.g., "Calendar Sync")
  7. Under "Authorized redirect URIs", add:
https://developers.google.com/oauthplayground
  1. Click "Create"
  2. Save the Client ID and Client Secret that appear in the popup

Step 3: Generate Refresh Token

  1. Go to OAuth 2.0 Playground
  2. Click the gear icon (settings) in top right
  3. Check "Use your own OAuth credentials"
  4. Enter your Client ID and Client Secret from Step 2
  5. Click "Close"
  6. Select Calendar Scopes:
    • In the left panel, find "Calendar API v3"
    • Check the box for:
https://www.googleapis.com/auth/calendar.readonly
  1. Click "Authorize APIs" button
  2. Sign in with your Google account
  3. Grant permissions when prompted
  4. You'll be redirected back to the playground
  5. Click "Exchange authorization code for tokens"
  6. Copy the refresh_token from the response (starts with 1//)

Step 4: Get Calendar ID

For Primary Calendar

Use primary or your Gmail address (e.g., yourname@gmail.com)

For Specific Calendar

  1. Go to Google Calendar
  2. Find your calendar in the left sidebar
  3. Click the three dots () next to the calendar name
  4. Select "Settings and sharing"
  5. Scroll to "Integrate calendar" section
  6. Copy the Calendar ID (looks like primary or emailID or abc123@group.calendar.google.com)

Step 5: Configure Source

Use these credentials while creating source on DataGOL:

FieldValue
client_idFrom Step 2
client_secretFrom Step 2
refresh_token (or client_refresh_token_2)From Step 3
calendar_id (or calendarid)From Step 4

Step 6: Final Credentials Summary

You should have all four of the following:

Client ID:     [numbers]-[string].apps.googleusercontent.com
Client Secret: GOCSPX-[string]
Refresh Token: 1//[long-string]
Calendar ID: primary (or specific calendar ID)

Was this helpful?