Use cases → Scheduling
Set up team-wide calendar blockers from a service account
Block calendar slots for entire teams using delegated automation, ensuring no one books over key periods or events.
| Who it is for | IT admins or operations teams managing team-wide availability for holidays, all-hands or maintenance windows. |
|---|---|
| APIs | Calendar API, Admin SDK |
| Typical scopes | calendar, admin.directory.group.readonly |
The problem
Manually creating calendar events for every team member is slow and error-prone, especially as team rosters change. Automated scripts can create blockers, but group membership and calendar event propagation introduce edge cases.
How it works
- Fetch the target group’s membership using the Admin SDK.
- For each member, impersonate their account via domain-wide delegation.
- Insert the blocker event directly onto each user's primary calendar using the Calendar API.
- Optionally, detect and skip users with pre-existing blockers to avoid duplicates.
- Notify users or log the outcome for auditing.
What changes
All team members get the intended blockers, visible to others and preventing new bookings during those periods.
Questions people ask
Can this handle dynamic group membership?
Yes, but always query group membership at runtime. Cached lists miss recent joins or leaves, resulting in missed or unwanted blockers.
Is it possible to remove blockers later?
Yes, but only if you track the eventId used for each user. Otherwise, finding and deleting the correct events is unreliable.
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
Provision calendar events based on group membership
Create or update events for all members of a Google Group by impersonating users with a service account.
Cancel events across many calendars at once
Bulk-cancel meetings for multiple users after a team change, departure or incident, using domain-wide delegation.
Inject events into user calendars at scale
Create or update calendar events across all users in a domain using a delegated service account, without requiring user interaction.