Shared Drive Deletion Monitor is a project of Hack for LA. Hack for LA is a project of Civic Tech Structure, Inc. This tool helps Google Workspace administrators detect and respond to large-scale file deletions across Shared Drives. It uses daily file ID snapshots to compare yesterday’s and today’s contents, flagging deletions above a configurable threshold. Alerts are sent by email or Slack, and a dashboard tracks activity trends
This project was developed after repeated incidents of accidental high-volume file deletions by users with Manager access. Many third-party tools priced monitoring on a per-user basis, making them cost-prohibitive. By leveraging Google Apps Script and Sheets, this system is free to run within Google Workspace quotas.
- [Full background and context document]
- Code of Conduct
- Google Apps Script — automation logic and API calls
- Google Sheets — data storage, logging, and dashboard
- Google Drive API — file listing and metadata access
- Slack API (optional) — deletion alerts
You can help in several ways:
- Join the conversation on Hack for LA Slack in the [#shared-drive-monitor] channel.
- Help with testing by setting up the script in your own Google Workspace and reporting issues.
- Improve the dashboard design or report formatting.
- Contribute to the code by following the steps below.
- Make a copy of the [Shared Drive Monitor Google Sheet Template].
- Open Extensions → Apps Script in the copied Sheet.
- Paste the project’s code from
/srcinto the Script Editor. - In the Config tab of the Sheet, add the Shared Drive IDs to be monitored and adjust thresholds or notification settings.
- Authorize the script to access your Google Drive and Sheets.
- Set a daily time-based trigger to run the main monitoring function.
- (Optional) Configure Slack webhook URL in the config if using Slack alerts.
- To report a bug: [Open a new GitHub issue] with the label
bug. - To request a feature: [Open a new GitHub issue] with the label
enhancement. - To contribute to an existing issue, comment in the thread and coordinate with the assignee.
- Fork this repo before making changes.
- Create a new branch for each feature or fix (
feature/your-feature-nameorfix/your-fix-name).
- Submit PRs to the
mainbranch. - Assign at least one reviewer.
- Ensure your PR description clearly states the problem and solution.
- Manually test by deleting test files in a monitored Shared Drive.
- Confirm that deletions are logged in the Sheet and that alerts are sent.
- Use small drives for initial testing to stay under quota limits.
[Add details]