While
Setup

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.

Quick Reference Checklist

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

  1. Open the Google Calendar API page
  2. 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.

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:

  1. Return to OAuth consent screen page
  2. Click Edit App
  3. Navigate to the Scopes section (or click "Add or Remove Scopes")
  4. Add these scopes:
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/calendar

You'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.

  1. 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

  1. Go to APIs & Services > Credentials
  2. Click Create Credentials > OAuth client ID
  3. Select Web application
  4. Enter name: Notion Calendar Sync Web

Authorised JavaScript origins

Add these URIs (replace your-app with your Vercel domain):

https://your-app.vercel.app

For local development, also add:

http://localhost:3000

Authorised redirect URIs

Add this URI (replace your-app with your Vercel domain):

https://your-app.vercel.app/api/auth/callback/google

For local development, also add:

http://localhost:3000/api/auth/callback/google
  1. Click Create
  2. Copy the Client ID and Client Secret

Keep your Client Secret secure. Never commit it to version control.

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:

  1. Go to the Auth Audience page
  2. Under Publishing status, click Publish App
  3. 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:

VariableDescriptionYour Value
Your OAuth client ID
Your OAuth client secret

Troubleshooting

On this page