Prompt
How do I create and update events across Google and Outlook calendars?
Latest observation
Nov 14, 2026
OpenAI APIWeb search: off
To create and update events across Google Calendar and Outlook Calendar, the best approach is usually to integrate with both providers through their APIs and keep your app’s data in sync.
High-level approach
-
Authenticate each user with the calendar provider
- Google: OAuth 2.0 + Google Calendar API
- Microsoft: OAuth 2.0 + Microsoft Graph Calendar API
-
Store a provider-specific event mapping
- Save your internal event ID alongside:
- Google event ID
- Outlook event ID
- This lets you update the correct event in each system later.
- Save your internal event ID alongside:
-
Create events in both calendars
- When a user creates an event in your app, call:
- Google Calendar API
events.insert - Microsoft Graph
POST /me/eventsor/users/{id}/events
- Google Calendar API
- When a user creates an event in your app, call:
-
Update events in both calendars
- When an event changes, use:
- Google Calendar API
events.patchorevents.update - Microsoft Graph
PATCH /me/events/{event-id}
- Google Calendar API
- When an event changes, use:
-
Handle time zones, recurring events, and sync conflicts carefully
- Normalize times internally.
- Track
etag/sequenceor equivalent versioning if possible. - Use webhooks/subscriptions or polling to detect external changes.
Google Calendar
Create an event
Use:
events.insert
Example payload:
{
"summary": "Team Meeting",
"start": {
"dateTime": "2026-11-14T10:00:00-05:00",
"timeZone": "America/New_York"
},
"end": {
"dateTime": "2026-11-14T11:00:00-05:00",
"timeZone": "America/New_York"
}
}
Update an event
Use:
events.patchfor partial updatesevents.updatefor full replacement
Example patch:
{
"summary": "Updated Team Meeting",
"start": {
"dateTime": "2026-11-14T11:00:00-05:00",
"timeZone": "America/New_York"
}
}
Outlook Calendar / Microsoft Graph
Create an event
Use:
POST /me/events
Example payload:
{
"subject": "Team Meeting",
"start": {
"dateTime": "2026-11-14T10:00:00",
"timeZone": "Eastern Standard Time"
},
"end": {
"dateTime": "2026-11-14T11:00:00",
"timeZone": "Eastern Standard Time"
}
}
Update an event
Use:
PATCH /me/events/{event-id}
Example payload:
{
"subject": "Updated Team Meeting",
"start": {
"dateTime": "2026-11-14T11:00:00",
"timeZone": "Eastern Standard Time"
}
}
Keeping both calendars in sync
A common design is:
- Your app is the source of truth
- You push changes to Google and Outlook
- You listen for external changes from both providers and merge them back
Sync strategies
- One-way sync: app → calendars
- Two-way sync: app ↔ calendars
- Per-user preference: some users sync only Google, others only Outlook
Important implementation details
- Time zones: Google uses IANA names like
America/New_York; Outlook often uses Windows time zones likeEastern Standard Time. - Recurring events: recurrence rules differ slightly, so test carefully.
- Deleted events: track cancellations and propagate deletions.
- Conflicts: use
etag(Google) and@odata.etag(Microsoft Graph) when possible.
Recommended data model
Store something like:
{
"internalEventId": "evt_123",
"title": "Team Meeting",
"start": "2026-11-14T15:00:00Z",
"end": "2026-11-14T16:00:00Z",
"google": {
"calendarId": "primary",
"eventId": "google_event_abc",
"etag": "\"123abc\""
},
"outlook": {
"calendarId": "primary",
"eventId": "outlook_event_def",
"etag": "W/\"456def\""
}
}
Best practice tips
- Use OAuth with offline access if you need background syncing.
- Retry failed API calls with exponential backoff.
- Log provider responses for debugging.
- Build a reconciliation job to fix drift.
- Respect rate limits.
If you want, I can also give you:
- A full end-to-end architecture, or
- Code examples in Node.js, Python, or C# for Google + Outlook event creation and updates.