Use cases → Documents and Drive
Remove expired shared Drive links across the domain automatically
Clean up old shared links in Drive by scanning for and revoking access to files and folders past their expiry, using delegated domain-wide authority.
| Who it is for | IT admins responsible for data exposure and external sharing hygiene. |
|---|---|
| APIs | Drive API |
| Typical scopes | drive |
The problem
Links shared externally are rarely cleaned up, so ex-partners and vendors retain access to sensitive data long after it is needed. Manual audits are slow, error-prone and incomplete.
How it works
- Schedule a regular scan of all files and folders with external sharing permissions.
- For each permission, check for an explicit expiration date or infer expiry by policy.
- Impersonate the file owner to enumerate and modify sharing permissions.
- Revoke or update any permissions that have expired or violate policy.
- Log all changes and notify file owners as appropriate.
What changes
Expired external access is removed consistently, reducing the risk of data leakage and satisfying audit requirements.
Questions people ask
How do we identify externally shared links?
List file permissions and filter for those with 'anyone with the link' or specific external email addresses. The API exposes these via the 'type' and 'domain' fields.
Can we automate notifications to file owners?
Yes, but batching is important—owners may have hundreds of files touched in a sweep. Summarise changes per owner to avoid notification spam.
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
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.
Sort incoming files into the right place automatically
Watch a drop folder, work out what each file is, and file it where it belongs with a consistent name.