domainwidedelegation.comStart free

Use casesScheduling

Scheduled backup of user calendars via delegation

Regularly export all users' primary calendars to a safe location using a delegated service account to guard against accidental deletion or sync errors.

Who it is forAdmins responsible for business continuity and retention of user calendar data.
APIsCalendar API, Drive API
Typical scopescalendar.readonly, drive.file

The problem

Calendar events are lost if a user deletes them or an integration misfires, and Google Workspace offers no native point-in-time calendar restore. Relying on users to export their own data is unreliable and does not scale across a domain.

How it works

  1. Schedule a regular job as a delegated service account with calendar.readonly scope.
  2. Enumerate all active users, impersonating each to fetch their primary calendar events via the Calendar API.
  3. Export events in a standard format (e.g. iCal), storing each user's backup in a managed Drive folder.
  4. Log backup status and failures for audit and alerting.
  5. Rotate and prune old backups to manage storage and compliance.

What changes

You gain a recoverable archive of user calendars that can be restored or referenced after accidental loss, migration, or user departure.

The trap in this one. The Calendar API's sync tokens (for incremental backup) silently expire if not used for more than 30 days or after some API-side changes, causing the next sync to return a 410 Gone with no events—unless you detect this, you will miss deletions and modifications since the last good backup. Always handle 410 responses by falling back to a full export, and do not assume incremental sync is reliable over long intervals.

Watch it explained

Google Calendar API Tutorial | Connect Calendar With PHP | Display And Add Events | 2019” — Unpossible POG on YouTube. Third-party video, included because it covers this ground well. We are not affiliated with the channel.

Questions people ask

Can I back up secondary and shared calendars too?

You can, but you must enumerate them per user and handle ACLs—some shared calendars may not be visible to the service account even with delegation.

How do I restore events from a backup?

You'll need to re-insert events via the Calendar API, handling potential conflicts and duplicates, and respecting the original organiser and attendee data.

Want this built?

This is a pattern we run in production. We will set up the delegation and build this on top of it — $500 per hour, most of it working the same day.

Talk to us Or read the setup guide

Related use cases

Turn a finished meeting into follow-up automatically

Detect that a meeting happened, pull the notes, and draft the follow-up before anyone opens their laptop.

Turn a booking into a record everywhere it matters

When a meeting is booked, create the record, the folder and the confirmation in one pass.

Build a real picture of team availability

Read calendars across the domain to answer who is free, who is overloaded and where the week actually went.