Use cases → Email operations
Send personalised bulk email with mail merge
Generate and send custom emails to many recipients by merging spreadsheet data with message templates via a service account.
| Who it is for | Operations, comms, or HR teams sending tailored updates to large internal or external lists. |
|---|---|
| APIs | Gmail API, Sheets API |
| Typical scopes | gmail.send, sheets.readonly |
The problem
Manually sending hundreds of individualised emails is error-prone and unscalable. Doing it from a user’s mailbox risks throttling, missed personalisation and audit gaps.
How it works
- Prepare a Google Sheet with recipient rows and merge fields.
- Author an email template with merge tags for personalisation.
- Read the sheet data with the service account using Sheets API.
- Generate a personalised draft for each row and send via Gmail API as the relevant user.
- Log send status per recipient for audit and retries.
What changes
Bulk personalised emails are sent from the correct mailbox, with each message tailored to the recipient’s data.
Watch it explained
“Ditch Generic Emails! Learn Google Workspace Mail Merge!” — Paul O'Malley on YouTube. Third-party video, included because it covers this ground well. We are not affiliated with the channel.
Questions people ask
Can you send attachments with the merged emails?
Yes, but you must base64 encode and attach them for each message. Watch for larger files: Gmail size limits apply and are not always reported clearly in the API response.
How do you avoid duplicate sends if the process is interrupted?
Log message IDs or recipient states after each successful send, and resume only unsent rows on rerun. The Gmail API does not prevent duplicate messages.
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
Route form and system notifications to a case owner
Parse machine notifications, work out who owns the record, and put it in front of them.
Automate contract renewal reminders via delegated email
Send timely, auditable reminders for contract renewals by scheduling delegated emails from a service account.
Distribute and track mass surveys via Gmail
A delegated service account sends survey invitations to large recipient lists and tracks responses, centralising delivery and engagement data for reporting.