Google Calendar
Adding Google Calendar as data source
Do the following to add Google Calendar as data source:
- From the left navigation panel, click Lakehouse and then click Data Sources.
- From the upper right corner of the page, click the + New Data Source button to start the process of adding a new database.
- In the New Data Source page, click the Google Calendar icon.
- 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.
| Field | Description |
|---|---|
| Connection Name | Enter a unique name for the connection. |
| Calendar ID | Specify the Google Calendar ID you wish to sync (e.g., primary or an email address). |
| Client ID | Enter your Google OAuth Client ID. This is obtained from the Google Cloud Console. |
| Client Secret | Enter your Google OAuth Client Secret. |
| Refresh Token | Provide the OAuth refresh token generated for your Google account to allow persistent access. |
- 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
- Go to Google Cloud Console
- Click "Select a project" dropdown at the top
- Click "New Project"
- Enter project name (e.g.,
"Calendar Integration") - Click "Create"
- Wait for project creation to complete
- 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
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth 2.0 Client IDs"
- 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
- Return to "Create Credentials" > "OAuth 2.0 Client IDs"
- Choose "Web application" as application type
- Enter name (e.g.,
"Calendar Sync") - Under "Authorized redirect URIs", add:
https://developers.google.com/oauthplayground
- Click "Create"
- Save the Client ID and Client Secret that appear in the popup
Step 3: Generate Refresh Token
- Go to OAuth 2.0 Playground
- Click the gear icon (settings) in top right
- Check "Use your own OAuth credentials"
- Enter your Client ID and Client Secret from Step 2
- Click "Close"
- Select Calendar Scopes:
- In the left panel, find "Calendar API v3"
- Check the box for:
https://www.googleapis.com/auth/calendar.readonly
- Click "Authorize APIs" button
- Sign in with your Google account
- Grant permissions when prompted
- You'll be redirected back to the playground
- Click "Exchange authorization code for tokens"
- Copy the
refresh_tokenfrom the response (starts with1//)
Step 4: Get Calendar ID
For Primary Calendar
Use primary or your Gmail address (e.g., yourname@gmail.com)
For Specific Calendar
- Go to Google Calendar
- Find your calendar in the left sidebar
- Click the three dots (⋮) next to the calendar name
- Select "Settings and sharing"
- Scroll to "Integrate calendar" section
- Copy the Calendar ID (looks like
primaryoremailIDorabc123@group.calendar.google.com)
Step 5: Configure Source
Use these credentials while creating source on DataGOL:
| Field | Value |
|---|---|
client_id | From Step 2 |
client_secret | From 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?