domainwidedelegation.comGet it set up

Use casesDocuments and Drive

Notify the owner when a document is untouched for 90 days

Alert document owners before files are forgotten by tracking Drive activity and sending targeted notifications when a document hasn't been opened in 90 days.

Who it is forIT admins and automation engineers maintaining document hygiene across a Workspace domain.
APIsDrive API, Gmail API
Typical scopesdrive.metadata.readonly, gmail.send

The problem

Documents accumulate and become stale, increasing clutter and risk of outdated information being referenced. Owners rarely self-audit, so important files go unreviewed, while obsolete ones persist indefinitely. Manual reviews are impractical at scale.

How it works

  1. List all user-owned documents using the Drive API with a delegated service account.
  2. Check the 'viewedByMeTime' metadata to identify files not opened in the past 90 days.
  3. For each stale document, fetch the owner's email address.
  4. Send a personalised notification to the owner via the Gmail API, summarising the stale files.
  5. Repeat the process on a scheduled basis to maintain ongoing hygiene.

What changes

Owners are prompted to review or archive rarely accessed documents, reducing clutter and improving information accuracy across the domain.

The trap in this one. The Drive API’s 'viewedByMeTime' only updates when the owner opens the file, not when collaborators do. Documents actively used by others but never opened by the owner will trigger false positives, causing owners to receive notifications about files that are still in regular use.

Questions people ask

Can I detect activity by collaborators?

No, 'viewedByMeTime' is specific to the owner. To detect broader activity, you'd need to process Drive audit logs, which requires additional APIs and admin privileges.

Will this catch shared drives?

No, this pattern only works for user-owned files. Shared drives require a different approach, as ownership and activity tracking differ.

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

Route inbound CVs into a hiring pipeline folder

Automatically collect candidate CVs from email and place them in a shared Drive folder for the hiring team.

Create a client folder structure the moment a deal closes

Provision a consistent Drive folder tree, seeded with templates and shared with the right people, automatically.

Generate documents from a template and real data

Produce agreements, letters and reports from a Docs template with fields filled from your systems.