Use cases → Email operations
Apply Gmail labels in bulk across user accounts
Add or update labels for many users at once using a delegated service account, without manual browser work.
| Who it is for | IT teams handling compliance, migrations, or inbox organisation for multiple users. |
|---|---|
| APIs | Gmail API |
| Typical scopes | gmail.modify |
The problem
Manually creating or updating labels for each user is time-consuming and error-prone, especially at scale. Even with admin access, the Gmail UI does not support bulk label actions across accounts.
How it works
- Enumerate target users from the directory or a provided list.
- Impersonate each user with the service account using domain-wide delegation.
- Check for the existence of the label; create it if missing.
- Apply or update the label on relevant threads or messages as required.
What changes
Labels are present and consistent across all targeted inboxes, with no manual intervention per user.
Watch it explained
“Create multiple labels in Gmail with Google Apps Script” — saperis on YouTube. Third-party video, included because it covers this ground well. We are not affiliated with the channel.
Questions people ask
Can I guarantee labels have the same colour and nesting for all users?
No. Label colour and nesting must be set individually per user. The API does not support a 'global label definition'.
Will users see the new labels immediately?
Usually yes, but label propagation in the Gmail UI can lag by several minutes, especially after bulk changes.
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
Draft replies automatically in a shared inbox
A delegated service account reads an incoming enquiry, drafts a researched reply in the mailbox, and leaves it for a human to approve and send.
Triage and route inbound mail across a domain
Classify every inbound message, label it, and forward the ones that matter to the person who owns them — without touching a single mail rule.
Send mail as a shared alias from automation
Deliver notifications, confirmations and campaign replies from a branded address like support@ or updates@ without a human in the loop.