domainwidedelegation.comStart free

Use cases → Documents 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

Automate expiry alerts for compliance documents in Drive

Monitor expiration dates on compliance files and notify document owners before key certifications or policies lapse.

Notify users before shared Drive documents expire

Detect upcoming expiry of shared Drive documents and notify owners or collaborators so they can take action before access is lost.

Send reminders for unread shared documents

Automatically notify users who haven't opened a document shared with them after a set period, using a delegated service account.