domainwidedelegation.comStart free

Use casesScheduling

Automate recurring cleanup of shared Workspace calendars

Use delegated access to remove old or orphaned events and calendars, keeping shared calendars manageable and accurate.

Who it is forIT admins responsible for shared calendar hygiene in large organisations.
APIsCalendar API
Typical scopescalendar

The problem

Shared calendars collect abandoned events, duplicated entries, and unused calendars over time. Manual cleanup is slow and inconsistent, and clutter can cause missed appointments and confusion over resource bookings.

How it works

  1. Impersonate a durable admin or calendar owner account using domain-wide delegation.
  2. Enumerate all shared calendars, filtering by naming convention or owner.
  3. For each calendar, search for events older than a set threshold or matching orphan patterns.
  4. Batch-delete outdated events and deprovision unused calendars.
  5. Log actions and optionally notify calendar owners of major changes.

What changes

Shared calendars remain accurate and uncluttered, making it easier for users to find and trust bookings and availability.

The trap in this one. The Calendar API's batchDelete for events is non-atomic: if you attempt to delete recurring events, exceptions are thrown for already-removed instances, but the response is partial and does not indicate which events failed. This results in silent orphaned series unless you re-query and cross-check after each batch, which costs quota and time.

Questions people ask

Can I delete calendars outright via API?

You can only delete calendars you own or have 'owner' access to. For resource calendars, removal requires specific admin privileges.

Will users be notified when events are deleted?

Not by default; you must send notifications separately if users need to be informed.

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

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.

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.