Duplicate-send safety

Prevent duplicate mail merge emails in Google Sheets

Use more than an email-address dedupe. A safer mail merge binds approval to the exact resolved batch, locks concurrent executions, marks a row before sending, and refuses automatic retries when the provider outcome is uncertain.

The same recipient can legitimately appear on several rows—for example, one parent receiving different messages for two students. Detect exact outgoing payload duplicates, not email addresses alone.

Five guardrails

1. Exact preview

Resolve recipient, subject, body, CC, and BCC for every pending row before approval.

2. Batch fingerprint

Invalidate approval when a row, template, or configuration changes.

3. Document lock

Allow only one FormMerge send execution at a time for the spreadsheet.

4. Pre-send state

Write SENDING: and flush the sheet before calling the mail service.

5. Fail closed

Keep ambiguous rows at SEND_UNCERTAIN: until an owner checks the inbox.

What FormMerge blocks

The safety preview blocks exact duplicate outgoing payloads, batches over the current 50-row reviewed limit, rows without valid recipients, and rows already marked SENDING: or SEND_UNCERTAIN:. The approved preview expires after ten minutes and is consumed on the first send attempt.

This reduces duplicate risk but does not claim provider-level exactly-once delivery. Gmail and Apps Script quotas still apply.