Use cases → Reporting and data
Generating weekly status documents from Admin SDK activity
Automate weekly status reports by extracting user activity via the Admin SDK Reports API and formatting results into Google Sheets for consistent, up-to-date visibility.
| Who it is for | Workspace automation engineers maintaining cross-tenant reporting. |
|---|---|
| APIs | Admin SDK, Sheets API |
| Typical scopes | admin.reports.audit.readonly, admin.directory.user.readonly |
The problem
Weekly status documents are often generated from stale Sheets exports or missed logins, so managers act on incomplete activity snapshots—especially when user accounts are moved or renamed mid-project, breaking manual processes. Manual compilation is error-prone, and changes to user accounts mid-week (renames, suspensions, deletions) often result in missing or duplicated entries. This leads to wasted time chasing down the real activity trail and undermines trust in the data.
How it works
- Configure a service account with domain-wide delegation and the required Admin SDK scopes.
- Enumerate active users using the Admin SDK Directory API (users.list), filtering out suspended and recently deleted accounts.
- Query each user's activity using the Reports API (activities.list) for the relevant application and date range.
- Aggregate results and write them into a structured template in Google Sheets via the Sheets API, linking each row to the corresponding user.
- Trigger the workflow using a scheduled Cloud Function or Apps Script, and log document links by week for auditability.
What changes
Status documents reflect actual user activity for the week, and new or renamed accounts are automatically included. Manual errors and omissions are reduced, and managers get a consistent, up-to-date view.
Watch it explained
“How to track and manage edits in Google Workspace documents” — Damson Cloud on YouTube. Third-party video, included because it covers this ground well. We are not affiliated with the channel.
Questions people ask
Does the Reports API include activity for suspended or recently deleted users?
No, the API will return empty results for these users, even if they were active earlier in the reporting period. You need to cross-reference user status from the Directory API.
How do I ensure renamed users are not double-counted or missed?
Always use the immutable user ID from the Directory API rather than email addresses as your key. This prevents accidental duplication or omission.
Can this workflow handle multiple domains or tenants?
Yes, but you must authenticate against each tenant separately and maintain separate status documents and service account delegations.
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
Send a daily digest that catches problems early
One scheduled email that checks the things that fail quietly and reports only what changed.
Run automation from a spreadsheet non-engineers can edit
Keep rules, templates and routing in a Sheet so the operations team changes behaviour without a deploy.
Reconcile records between two systems automatically
Compare what your tracking sheet says against what the source system says, and report the differences.