You have a list in Google Sheets (course attendees, clients, employees) and you need one document per person: a certificate, an invoice, a letter. Google Sheets and Google Docs can do this together with one short Apps Script file. You don’t need Autocrat or a paid add-on, and there’s no monthly document cap.
This guide uses Sheets Doc Merge, a free, MIT-licensed script. Setup takes about 5 minutes.
Design the document the way you want every copy to look: logo, fonts, borders, signature image. Wherever a value should change per row, type the column name in double braces:
This certifies that {{Name}} completed {{Course}} on {{Date}}.
Placeholders work in the body, header and footer, and they keep the formatting you give them. For a certificate, set File → Page setup to landscape.
Put headers in row 1 that match your placeholders exactly. Two optional columns do extra work:
| Name | Course | Date | File Name | |
|---|---|---|---|---|
| Ana Lopez | First Aid | Oct 24, 2026 | Certificate - Ana Lopez | ana@example.com |
| Ben Okafor | First Aid | Oct 24, 2026 | Certificate - Ben Okafor | ben@example.com |
Values come through exactly as the sheet displays them, so format dates and amounts in the sheet first.
Code.gs and click Save.Choose 📄 Doc Merge → Create PDFs and paste the link to your template. The first time, Google asks for permission. Because it’s your own unpublished script, it shows “Google hasn’t verified this app”: click Advanced → Go to (your project name) → Allow.
The PDFs are saved in a new Drive folder next to the template, and a Merged PDF column in the sheet links to each one.
Your {{Course}} certificate.Every row with an email address gets its own PDF attached.
ERROR: ... is retried on the next run.Is it free? Yes. It’s MIT licensed and runs on your own Google account.
How is it different from Autocrat? Autocrat is a free but closed-source add-on with its own job setup screens. This is one readable script inside your sheet: no add-on gets access to your Drive, and you can change anything. See the full comparison.
Can I make invoices with it? Yes. Put {{Invoice Number}}, {{Amount}} and similar placeholders in the Doc and give each row a File Name like Invoice 1042.
Can I keep Google Docs instead of PDFs? The script exports PDFs and removes the temporary Doc. To keep the Docs, delete the copy.setTrashed(true); line.
Can I redo one row? Clear its Merged PDF cell and run it again.
Get the script on GitHub · Also free: Mail Merge for Google Sheets · Deadline reminders from Google Sheets