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 for | IT admins and automation engineers maintaining document hygiene across a Workspace domain. |
|---|---|
| APIs | Drive API, Gmail API |
| Typical scopes | drive.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
- List all user-owned documents using the Drive API with a delegated service account.
- Check the 'viewedByMeTime' metadata to identify files not opened in the past 90 days.
- For each stale document, fetch the owner's email address.
- Send a personalised notification to the owner via the Gmail API, summarising the stale files.
- 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.
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 guideRelated 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.