Back to Blog
AutomationHow To

Mail Merge in Google Docs: The Complete Guide (2026)

OgtayOgtay

Google Docs is one of the best platforms for creating document templates — but it doesn't have a built-in mail merge feature. To generate multiple personalized documents from a Google Docs template, you need to connect it to a data source (usually Google Sheets) and use a merge tool.

This guide covers everything you need to know about mail merge in Google Docs: how it works, which tools to use, and a complete step-by-step walkthrough.


What Is a Google Docs Mail Merge?

A Google Docs mail merge takes a template document and replaces placeholder tags with real data from a spreadsheet — generating a unique document for each row.

Example: You have a Google Doc invoice template with {{Client Name}}, {{Invoice Number}}, and {{Amount Due}}. Your Google Sheet has 50 rows of client data. A mail merge generates 50 individual invoices, each with the correct client details — saved as PDFs in Google Drive.

Works for any document type:

  • Invoices and billing statements
  • Certificates and diplomas
  • Offer letters and employment contracts
  • Personalized reports
  • Event confirmations

How to Do a Mail Merge from Google Sheets to Google Docs

Step 1 — Set Up Your Google Sheet

Create a spreadsheet with column headers in row 1 — these become your merge tags.

First NameLast NameCompanyInvoice #Amount

John

Smith

Acme Inc

INV-001

$1,200

Sara

Lee

Beta Corp

INV-002

$850

You can use multiple tabs from the same sheet in a single job. SheetMergy also lets you choose which row is the header in each tab — useful when your sheet has a summary row above the actual headers.

Step 2 — Create Your Google Docs Template

Open Google Docs and write your document. Use double curly braces for merge tags matching your column headers exactly:

INVOICE

Client: {{First Name}} {{Last Name}} Company: {{Company}} Invoice #: {{Invoice #}} Amount Due: {{Amount}}

Tags are case-sensitive and must match your column headers exactly, including spaces.


Tool Option 1: SheetMergy (Recommended)

SheetMergy is the most capable tool for Google Sheets to Google Docs mail merge. It handles the full workflow — merge, generate, save to Drive, email to recipients — from one place.

How to Use SheetMergy

  1. Sign in at sheetmergy.com with your Google account (or open the Google Workspace Add-on inside Google Sheets)
  2. Click New Job and select your Google Sheet as the data source
  3. Select your Google Docs template — or upload a DOCX file if you're working in Word format
  4. SheetMergy auto-detects all {{tags}} and maps them to your columns automatically
  5. Set optional filters (e.g., only rows where Status = "Approved")
  6. Choose output mode:
    • One document per row — a separate file per row
    • Single document mode — all rows in one document (great for tables and reports)
  7. Choose output format: PDF or Google Doc
  8. Set your output folder in Google Drive
  9. Click Generate Now or set a scheduled run

Email Delivery

After generating, SheetMergy can automatically email each document to the recipient in that row:

  • To: any email column in your sheet
  • Subject: personalized with {{tags}}
  • Body: full HTML email support
  • CC / BCC: fixed or dynamic
  • Attachment: generated PDF attached automatically

Data Joins

If your document needs data from multiple tabs (e.g., client details from one tab, order data from another), SheetMergy's data joins link them via a common key column — no VLOOKUP needed.

Grouping and Aggregates

Need one document per client listing all their orders? Use SheetMergy's grouping to group rows by a field value or by month. Inside the grouped document, use:

  • {{_sum}} — total of a numeric column across the group
  • {{_count}} — number of rows in the group
  • {{_avg}} — average value

Scheduling

Set the job to run hourly, daily, weekly, or monthly. SheetMergy stores a full run history and logs so you can track every execution and rerun jobs anytime.


Tool Option 2: AutoCrat Add-On (Free)

AutoCrat is a free Google Sheets add-on for basic Google Docs mail merge.

How to use it:

  1. In Google Sheets, go to Extensions → Add-ons → Get add-ons
  2. Search "AutoCrat" and install
  3. Go to Extensions → AutoCrat → Open
  4. Click New Job, select your Google Docs template
  5. Map template tags to sheet columns
  6. Choose PDF or Google Doc output
  7. Click Run

AutoCrat is free and works for straightforward use cases. It lacks data joins, grouping, filtering logic, DOCX support, and reliable scheduling — but it's a reasonable starting point if your needs are simple.


Tool Option 3: Google Apps Script (Free, Technical)

javascript

function generateDocuments() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var data = sheet.getDataRange().getValues();
var headers = data[0];
var templateId = 'YOUR_GOOGLE_DOC_TEMPLATE_ID';

for (var i = 1; i < data.length; i++) {
var row = data[i];
var newDoc = DriveApp.getFileById(templateId).makeCopy(
'Document for ' + row[headers.indexOf('First Name')]
);
var doc = DocumentApp.openById(newDoc.getId());
var body = doc.getBody();
headers.forEach(function(header, index) {
body.replaceText('{{' + header + '}}', row[index]);
});
doc.saveAndClose();
}
}

Free but requires coding. No UI, no scheduling, no filtering, no grouping.


Common Use Cases

Bulk Invoice Generation

Generate individual PDF invoices for every client in your sheet. SheetMergy saves each to Drive, names them automatically, and emails them to each client in the same job.

Certificates and Diplomas

One certificate template in Google Docs + a sheet of names = hundreds of personalized certificates generated in seconds. Output as PDF for a professional final format.

Offer Letters

HR teams fill in candidate name, role, salary, and start date from a sheet into a standard offer letter template — eliminating manual editing and copy-paste errors.

Consolidated Invoices

Group all orders for one client into a single invoice document, with a line-item table and a {{_sum}} total at the bottom. One document per client, not one per order.

Monthly Reports

Schedule SheetMergy to generate per-person performance reports from your Google Sheet every month, delivered automatically to each recipient's inbox.


Tips for Better Results

Match tags exactly. {{First Name}} in your template must match the column header First Name in your sheet — spaces, capitalization, and punctuation all matter.

Test on one row first. Run a single-row test before processing the full list to confirm output looks right.

Use PDF for final documents. Invoices, certificates, and contracts should be PDFs — they're non-editable and look professional.

Use Single Document Mode for tables. If your document contains a data table with one row per item, use Single Document Mode to combine all sheet rows into one document.

Use filters to skip rows. Instead of manually deleting rows before each run, set filter conditions so SheetMergy only processes the rows you need.


Frequently Asked Questions

Does Google Docs have a built-in mail merge feature? No. You need a third-party tool or add-on. SheetMergy is the most complete option.

Can I use a DOCX file as my Google Docs mail merge template? Yes — SheetMergy accepts both Google Docs templates and uploaded DOCX files. AutoCrat only supports Google Docs templates.

Can I output merged documents as PDF? Yes. SheetMergy and AutoCrat both support PDF output. This is recommended for invoices, certificates, and contracts.

Can I merge data from multiple Google Sheets tabs? Yes — SheetMergy supports multi-tab data sources and data joins using a common key column. AutoCrat does not support this.

Can I generate one document for multiple rows (e.g., all orders per client)? Yes — SheetMergy's grouping feature groups rows by a field and generates one document per group. AutoCrat and Apps Script require custom workarounds for this.

How do I send merged documents by email? Enable email delivery in SheetMergy. It emails each generated document to the address in the corresponding row, with a custom subject, HTML body, and PDF attachment.

Is there a free Google Docs mail merge tool? AutoCrat is fully free. SheetMergy has a free plan with 100 documents/month and no credit card required.


Start Your Google Docs Mail Merge Today

The easiest way to get started is SheetMergy's free plan. Connect your Google Sheet, choose your Google Docs template, and generate your first batch of documents in under 5 minutes.

No credit card required. 100 documents free every month.

Get Started Free →