Duplicate-send safety

Mail merge sent twice? Stop before sending again

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.

Diagnose the duplicate before you retry

Repeated every hour

Disable the scheduled trigger first. Then check whether the spreadsheet has more than one active trigger or merge job pointing at the same pending rows.

Status cell was cleared or copied

Preserve the current sheet before editing it. A cleared, duplicated, or formula-overwritten status column can make an already processed row look pending again.

Two executions overlapped

Do not start another manual run while a trigger may still be active. Use a document-level lock and expose an in-progress state before calling the mail provider.

Provider result is uncertain

Check Gmail Sent and the recipient result before retrying. Keep the row stopped for manual review instead of treating an unknown outcome as unsent.

Watch the duplicate-send blocker

This controlled 31-second copied-sheet proof shows a duplicate payload being blocked, corrected, previewed, approved, and sent once. It is not an exactly-once provider guarantee.

The YouTube player loads only after you press play. Controlled copied-sheet proof with synthetic data.

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.

Duplicate-send questions

Why did the same mail merge email send twice?

Check duplicate triggers, multiple active jobs, cleared or duplicated status columns, overlapping executions, and automatic retries after an uncertain provider result.

What if the same rows repeat every hour?

Disable the hourly trigger first. Preserve the sheet and status cells, then compare the repeated rows and inspect every active trigger before turning automation back on.

Should I clear SENT and retry?

No. First check Gmail Sent and the recipient result. Clearing the status can make an already delivered row eligible again.

Is the same recipient always a duplicate?

No. Compare the resolved recipient, subject, body, CC, BCC, and business key. One parent or team inbox may legitimately receive different row-specific messages.