Google Docs mail merge to individual PDF files

26 August 2026 · 7 min read

Short version

  • Docs has no built-in step that turns a sheet into one document per row.
  • Your options: an add-on such as Autocrat, thirty lines of Apps Script, or generating the PDFs from the spreadsheet without Docs in the middle.
  • The add-ons want access to your Drive and your Sheets, and they do the work on their servers. Whether that matters depends on whose data is in the rows.

What Docs does and does not have

Word has a mail merge that produces the wrong shape — one long document with every record inside it. Docs does not have one to produce the wrong shape with. Gmail's multi-send personalises the body of an email; it does not make you a folder of documents. There is no menu item anywhere in Docs that reads a sheet and writes a file per row.

So everybody reaches for the same three answers, and they are genuinely different from each other.

Three ways out

An add-on. Autocrat is the one most people land on, and it is good at what it does: point it at a template Doc and a sheet, map the tags, and it writes a Doc or a PDF per row into a Drive folder. It will email them too, which is the part nothing else on this page does. The price is access — you grant it your Drive and your Sheets, and the merge runs on somebody else's machine. It is also slow enough on long sheets that it batches the work and tells you when it is done.

Apps Script. Thirty lines: copy the template, replace each tag with a cell, export the copy as PDF, delete the copy. It works, it is free, and it stays inside your own account. You now own a script — it breaks when the template changes shape, the quota limits bite on long runs, and the person who inherits it will not read it.

Generate from the sheet directly. Skip the Doc. Read the spreadsheet, build a PDF per row, name each file, zip the lot. Nothing to grant, nothing to maintain, and no copy of a document being created and deleted three hundred times.

If your data lives in Sheets, changes often, and you want the results emailed as they are made, stop here and use Autocrat. That is the shape it was built for and this page is not going to talk you out of it.

Step by step, without an add-on

What follows uses boolkpdf, which is the tool we make. It runs in the browser.

  1. Export the sheet. In Google Sheets, File → Download → Comma-separated values, or Excel if you prefer. This is the only step Google is involved in.
  2. Load it. One row becomes one document, and the column names become the placeholders you drop into the text.
  3. Bring the template. If it started life in Docs, File → Download → Microsoft Word and import the .docx. Bold, italics, links, alignment, tables and the letterhead survive; page breaks stored as section breaks do not, and the app lists what it could not carry rather than letting you find it in the preview.
  4. Drop the placeholders in. Click a column name and it lands at the cursor. They are objects, not {{text}}, so half of one cannot be left behind by a stray backspace.
  5. Check the first row. The preview renders the real PDF with real values, which is where you catch a placeholder in the wrong sentence.
  6. Name the files, then generate. Every PDF is built and packed into one ZIP.

The tags are not the same thing

Autocrat matches text: you type <<client>> into the Doc and it swaps the characters for a cell value. That is why a typo in a tag fails silently — there is nothing to notice that <<clinet>> was meant to be a column.

Placeholders here are objects in the document rather than characters in it, so a name that has no column is something the app can see and say so about, in three places, before you generate a batch you have to throw away.

Name the files before you generate

A Drive folder of Untitled document copies is the same problem as a folder of document_1.pdf. Build the name from your own columns: Certificate_{{name}}_{{date}}.pdf. Two rows with the same name get (2) appended rather than one quietly replacing the other.

If you also need them sent

We do not send email, and there is no plan for it this year. This is the one place Autocrat is straightforwardly ahead. What we produce is a folder of correctly named PDFs, which is what the sending tools expect — Yet Another Mail Merge attaches a file per row of a sheet, and matches on the file name, so the two halves fit if you set the pattern above to match.

Questions

Does my spreadsheet get uploaded? No. It is read in your browser and the PDFs are made there. Open the network tab while you generate and watch nothing leave.

Do I have to leave Google Sheets behind? No. You export a copy when you want a batch. The sheet stays where it is and goes on being the sheet.

Do I need an account? Not for any of this. Generating and downloading are free, up to 25 rows in one batch. An account keeps the template so it is still there in six months.

Can I do 300 rows? Yes, in a couple of seconds, because your own machine does the work instead of a queue on someone's server.

Try it with your own spreadsheet →