Prompt
How do I connect Google and Outlook calendars in one app?
Latest observation
Oct 15, 2026
OpenAI APIWeb search: off
To connect Google Calendar and Outlook Calendar in one app, you usually build an app that can sign in to each provider separately and then read/write events through both APIs.
High-level approach
-
Create a calendar integration layer
- Your app should abstract calendars behind one interface like:
listCalendars()listEvents()createEvent()updateEvent()deleteEvent()
- Your app should abstract calendars behind one interface like:
-
Authenticate separately with each provider
- Google Calendar: use OAuth 2.0 with Google.
- Outlook Calendar: use OAuth 2.0 with Microsoft identity platform / Microsoft Graph.
-
Store tokens securely
- Save access tokens and refresh tokens encrypted.
- Refresh them when expired.
-
Map both providers to your common data model
- Normalize event fields like:
- title/subject
- start/end time
- timezone
- location
- attendees
- recurrence
- reminders
- Normalize event fields like:
-
Sync data if needed
- One-way sync: show both calendars in a unified view.
- Two-way sync: push changes back to the source calendar.
APIs you’ll use
- Google Calendar API
- OAuth scopes like:
https://www.googleapis.com/auth/calendar.readonlyhttps://www.googleapis.com/auth/calendar.events
Outlook
- Microsoft Graph Calendar API
- OAuth scopes like:
Calendars.ReadCalendars.ReadWriteoffline_access
Typical architecture
Frontend
- User clicks “Connect Google”
- User clicks “Connect Outlook”
- App redirects to each provider’s login consent screen
Backend
- Handles OAuth callback
- Exchanges auth code for tokens
- Calls Google/Microsoft APIs
- Stores normalized calendar/event data
Database
- Users
- Connected accounts
- Access/refresh tokens
- Calendar mappings
- Sync state / cursor / delta tokens
Example flow
1. User connects Google
- Redirect to Google OAuth consent
- Receive authorization code
- Exchange for tokens
- Call Google Calendar API to fetch calendars/events
2. User connects Outlook
- Redirect to Microsoft OAuth consent
- Receive authorization code
- Exchange for tokens
- Call Microsoft Graph
/me/calendarsand/me/events
3. Show unified calendar
- Merge events from both sources
- Tag each event with its provider:
source = googlesource = outlook
Important details
Time zones
- Normalize to a single internal format, usually UTC plus original timezone metadata.
Recurring events
- Google and Microsoft represent recurrence differently, so you need translation logic.
Deleted/updated events
- Use sync tokens or delta queries:
- Google: incremental sync with
syncToken - Microsoft: delta query on Graph
- Google: incremental sync with
Webhooks
- For near real-time updates:
- Google push notifications
- Microsoft Graph change notifications
If you only want “one view” and not full sync
Simpler option:
- Connect both accounts
- Read events from both
- Display them together
- Don’t write back changes
That’s much easier than full two-way synchronization.
Recommended stack
- Backend: Node.js, Python, or Go
- Auth: OAuth 2.0
- Google API: Google Calendar API client
- Microsoft API: Microsoft Graph SDK / REST
- Database: PostgreSQL
- Queue/worker: for background sync jobs
Minimal implementation checklist
- Register app in Google Cloud Console
- Register app in Azure Portal
- Configure OAuth redirect URIs
- Implement Google OAuth flow
- Implement Microsoft OAuth flow
- Store tokens securely
- Build provider adapters
- Normalize event schema
- Add sync logic
- Handle refresh and revocation
If you want, I can also give you:
- a Node.js example for both APIs,
- a Python example,
- or a database schema for storing Google + Outlook calendar connections.