domainwidedelegation.comStart free

Use cases → Email operations

Automate onboarding welcome emails via service account

Send onboarding emails as new users are created, directly from a real mailbox, without human intervention or missed recipients.

Who it is forIT or onboarding teams automating user setup communications.
APIsGmail API, Admin SDK
Typical scopesgmail.send, admin.directory.user.readonly

The problem

Manual onboarding emails are error-prone and easy to forget, especially with bulk hires or staff changes. Automating this via delegation lets you ensure every new user receives the same critical information, but only if the automation is tightly coupled to user creation.

How it works

  1. Monitor for new user creation events via Admin SDK or periodic polling.
  2. When a new user is detected, prepare a personalised email from a standard template.
  3. Use the service account to impersonate a real sender and send the email via the Gmail API.
  4. Log each send with the user ID, timestamp, and the Gmail message ID for traceability.

What changes

Every new user receives a consistent welcome email, and you have a record of every send tied to the source event.

The trap in this one. Admin SDK user creation events can take several minutes to propagate; polling too frequently or firing on incomplete data means emails may be sent before the user's mailbox is provisioned, which the Gmail API rejects with 'Mailbox not found'. This fails silently if not explicitly handled, so always retry with exponential backoff and confirm mailbox readiness before sending.

Questions people ask

Why not send immediately after user creation?

Provisioning a user and their mailbox is not synchronous; the Gmail API can reject sends for up to several minutes after creation. Waiting or retrying is required.

How can I ensure no user is missed?

Log every processed user and cross-check with your source of truth. Idempotent processing is safer than assuming one-shot delivery.

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 guide

Related use cases

Bulk update user email signatures with a service account

Set consistent Gmail signatures across many users using domain-wide delegation, while handling update limits and propagation quirks.

Send onboarding welcome emails as a delegated service

Automate welcome emails for new users by sending from a delegated account, ensuring consistency and timely delivery for every new joiner.

Standardise email signatures across the company

Set and enforce consistent Gmail signatures for all users by updating profiles via a delegated service account.