Google OAuth Setup
Configure Google Cloud for Calendar API access
This guide walks through creating a Google Cloud project and configuring OAuth. A single OAuth client handles both dashboard authentication and Google Calendar API access.
Token Expiration Warning
OAuth tokens expire every 7 days while your app is in "Testing" mode. You'll need to re-authenticate weekly unless you publish your app. This is a Google security measure for unpublished apps.
Step 1: Create Google Cloud Project
Create Project
Click the project dropdown at the top, then New Project
Name Project
Enter a name like Notion Calendar Sync and click Create
Select Project
Wait for creation, then select your new project from the dropdown
Step 2: Enable Google Calendar API
- Open the Google Calendar API page
- Click Enable
If the API is already enabled, you'll see "Manage" instead of "Enable". No action needed. Otherwise, wait a few seconds for confirmation before proceeding.
Step 3: Configure OAuth Consent Screen
Select User Type
Choose External (unless you have Google Workspace, then choose Internal) and click Create
Configure App Info
- App name:
Notion Calendar Sync - User support email: Your email
- Developer contact email: Your email
Click Save and Continue through the remaining wizard steps until complete.
Add Scopes (After Creation)
After the consent screen is created:
- Return to OAuth consent screen page
- Click Edit App
- Navigate to the Scopes section (or click "Add or Remove Scopes")
- Add these scopes:
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/calendarYou'll see "Your app requires verification" - ignore this. Verification is only required for apps with many external users. For personal use, no review is needed.
- Click Save and Continue
The scopes section may not appear during initial setup. You can always add scopes by editing the consent screen after creation.
Step 4: Create OAuth Credentials
- Go to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- Select Web application
- Enter name:
Notion Calendar Sync Web
Authorised JavaScript origins
Add these URIs (replace your-app with your Vercel domain):
https://your-app.vercel.appFor local development, also add:
http://localhost:3000Authorised redirect URIs
Add this URI (replace your-app with your Vercel domain):
https://your-app.vercel.app/api/auth/callback/googleFor local development, also add:
http://localhost:3000/api/auth/callback/google- Click Create
- Copy the Client ID and Client Secret
Keep your Client Secret secure. Never commit it to version control.
Step 5: Publish App (Recommended)
This step prevents weekly re-authentication. In "Testing" mode, OAuth tokens expire after 7 days, requiring you to sign in again.
To publish your app and get longer-lived tokens:
- Go to the Auth Audience page
- Under Publishing status, click Publish App
- Confirm the warning about moving to production
What "Publishing" means:
- For personal use: Google will show an "unverified app" warning once, but tokens won't expire weekly
- No Google review required: Since you're the only user, no verification process is needed
- Same functionality: Publishing doesn't change what your app can do
Staying in Testing Mode
If you prefer testing mode, just re-authenticate every 7 days. The While dashboard will show a warning when your token is approaching expiration.
Environment Variables
After completing this setup, you'll have:
| Variable | Description | Your Value |
|---|---|---|
| Your OAuth client ID | ||
| Your OAuth client secret |