Mail Merge
Generate Google Docs™ or Slides™ files from spreadsheet data with previews, calculated tags, PDF output, and saved workflows.
Use Mail Merge when you want to generate one Google Docs™ or Google Slides™ file per spreadsheet row.
You can open the feature in Google Docs™, Google Slides™, or Google Sheets™. The add-on helps you choose the source spreadsheet, match template tags to source columns, preview one generated file, and then run the full job with saved workflow settings.
Before You Start#
- Put your source headers in the first row of the spreadsheet.
- Use one record per row under those headers.
- Add placeholders in the template such as
{ClientName}or>. - Use Advanced Options when you need a specific source sheet, A1 range, output folder, or output file name pattern.
- Use
[RowNumber]in the file name pattern when you need guaranteed unique file names.
Quick Start#
- Open Mail Merge & Variables from More tools or from Document Tools > Merge.
- Confirm the detected context:
- in Docs, the current document is the default template
- in Slides, the current presentation is the default template
- in Sheets, the current spreadsheet is the default data source
- Choose the missing file:
- Choose Spreadsheet if you still need the data source
- Choose File or Use Sample Template if you still need the template in Sheets
- Choose another document as template (Docs) or Choose another presentation as template (Slides) if you want a template other than the open file
- Open Tag Mapping. The add-on lists the tags it finds in the template automatically. Click the refresh icon (↻) to reload the tags and source columns after you change either file.
- Review the detected tags and fix any wrong column matches. Apply Suggestions accepts the suggested matches.
- If needed, click Create Formula to add a calculated tag for values such as subtotals, tax, or remaining balance. Describe Formula and Draft Formula let AI write the formula for you.
- Click Create single document to generate one preview.
- Open the preview and check the replacements, formatting, and file name.
- Click Create all documents only after the preview looks correct.
Quick Actions#
The Quick Actions section at the top helps you get started:
- Load existing workflow... loads a setup you saved earlier.
- Load Sales Quotation Example, Load Sales Invoice Example, Load Training Certificate Example, and Load Report Card Example copy a prepared template and source spreadsheet into your Drive and load them into the sidebar.
- Create from current document... (Docs) or Create from current presentation... (Slides) analyzes the open file and builds a placeholder template plus a Google Sheets™ source for it. This step uses AI.
Generation Settings#
- Row scope: choose All rows or Selected rows.
- Output file name pattern: supports
{Column Header}(for example{Full Name}) and[RowNumber]. Auto-suggest proposes a pattern using AI. - Source Data Selection: Auto detect finds the data table for you. Turn it off to choose a Worksheet and an optional A1 Range.
- Output Folder: choose a folder in Google Drive™, or click Use template folder to save next to the template.
Best First Example#
If you are learning the feature for the first time, start in Google Docs™ and use Load Sales Quotation Example.
That example:
- copies a prepared Google Docs™ quotation template
- copies a prepared Google Sheets™ source spreadsheet
- loads both files directly into the current mail merge session
Use it to inspect the tags in Tag Mapping, create a single preview, and then compare the generated file with the source row data.
Tip: Start with a very small source sheet, ideally two or three rows. It is much easier to catch mapping or formatting problems before you generate a large batch.
Results and PDF Output#
After a run, the Results section shows the generated files.
- Open Document and Open Folder open the file or its folder.
- Convert to PDF (single result) or Convert all to PDF (full run) saves PDF copies to Google Drive™. Open PDF and Open all PDFs open them.
- Delete Document and Delete All Created Documents remove the files created in the run.
Save a Workflow#
Click Save for Next Use, name the workflow (for example "Employee certificates"), and save. You can keep up to 50 saved workflows. Load one again with Load existing workflow....
AI in Mail Merge#
Most of Mail Merge runs without AI. These parts use it:
- Smart Report Paragraph variables use one AI request per generated file.
- Draft Formula for calculated tags.
- Auto-suggest for the output file name pattern.
- Create from current document... and Create from current presentation....
On the Free plan, AI requests count against your 25 AI requests per 30 days.
Workflow Tips#
- Always run Create single document before Create all documents.
- Keep source header names stable after you save a workflow.
- Review unmatched or low-confidence mappings in Tag Mapping.
- Use calculated tags when you need derived values but do not want to change the source sheet.
- Reopen the feature later to restore the latest run state, continue a run, or clean up created documents.
Smart Variables#
Smart Variables are optional placeholders such as {$IssueDate} or {$SignatureBlock}. Use them when the value does not come directly from a source column.
For the full Smart Variables workflow, use the dedicated guide below.
- Smart Variables - See available variable types, setup steps, apply behavior, and current host limitations.
Related Links#
- Mail Merge & Variables - Return to the main overview page for this feature.
- Merge Documents - Use a different workflow when your goal is to combine existing Google Docs™ files into one file.
Example Blog Posts#
- Bulk Generate PDF Sales Quotations in Google Docs™ - Follow the built-in Sales Quotation example from preview to full PDF batch output.
- Bulk Generate PDF Student Report Cards in Google Docs™ - Use the Report Card example to generate student report documents and convert the batch to PDF.
- Bulk Generate PDF Training Certificates in Google Docs™ - Use the certificate example to create completion documents and convert the whole batch to PDF.