Use cases → Email operations
Inject custom footers into outbound emails via API
Add or update standard disclaimers, signatures, or compliance footers to users’ sent mail by rewriting messages with domain-wide delegation.
| Who it is for | IT automation engineers responsible for compliance or branding across user email. |
|---|---|
| APIs | Gmail API |
| Typical scopes | gmail.modify |
The problem
Legal or branding policies often require a footer on every outbound email. Relying on user settings is unreliable, and updating signatures manually does not catch programmatic sends or mobile clients.
How it works
- Use a service account with domain-wide delegation and the 'gmail.modify' scope.
- Set up a watch on the 'Sent Mail' label to detect new outbound messages.
- Fetch recent sent messages for each user on a schedule.
- Rewrite the message body to append or update the footer, then use the 'messages.modify' endpoint to patch the message in place.
What changes
Every sent email, regardless of client or sending method, carries the correct footer as required by policy.
Questions people ask
Can this add footers to all outbound mail, including mobile and API sends?
Yes, as long as the message appears in the user’s Sent Mail and has not been delivered yet. However, race conditions mean some messages may escape modification.
Does modifying a sent message recall or re-send it?
No, the Gmail API only updates the stored copy in the user’s mailbox. If the message has already been delivered, recipients see the original version.
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.