Use cases → Documents and Drive
Detect duplicate customer records across shared sheets
Use a delegated service account to scan multiple shared Sheets for duplicate customer entries, surfacing conflicts for human review before they propagate into downstream systems.
| Who it is for | Operations or data quality teams maintaining customer records in separate shared Sheets across departments. |
|---|---|
| APIs | Sheets API, Drive API |
| Typical scopes | drive, spreadsheets.readonly |
The problem
Customer data is often entered into separate shared Sheets by different teams, leading to subtle duplication — misspelled names, swapped fields or slightly different contact details. These duplicates silently break downstream reporting, billing and support processes, but are rarely noticed until they cause a conflict.
How it works
- A delegated service account enumerates target Sheets from a known Drive folder or list.
- For each Sheet, it reads relevant ranges and normalises key fields (e.g., email, name, phone) for comparison.
- It performs a cross-Sheet duplicate detection pass, flagging potential matches based on configurable similarity criteria.
- A summary report is written to a separate Sheet or sent to designated reviewers for manual resolution.
What changes
Duplicate records are surfaced before they trigger failures in dependent systems. Teams see possible conflicts in one place, rather than after the fact.
Watch it explained
“Find Duplicates - Google Apps Script” — Karl Kranich on YouTube. Third-party video, included because it covers this ground well. We are not affiliated with the channel.
Questions people ask
Does this require changing permissions on every Sheet?
No, domain-wide delegation allows the service account to access any Sheet the target users can access, as long as they are within the same Workspace tenant.
Can this handle thousands of rows across many Sheets?
Yes, but the Sheets API has read limits and performance will degrade with very large Sheets. Batch reads and careful filtering are required.
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
Automate and track onboarding with shared checklists
Create, assign, and monitor onboarding checklists for every new joiner using Drive and Sheets, so nothing gets missed and progress is visible.
Distribute company policy documents via delegated automation
Push policy updates to every employee Drive with a delegated service account, recording who received and acknowledged each version.
Track company policy acknowledgments at scale in Workspace
Automate sending, collecting, and recording policy acknowledgments using delegated access and Drive-linked Sheets.