How to Make Invoices or Certificates from Google Sheets Rows Automatically (2026)

Invoices and certificates are the most common "one document per row" jobs. The steps are the same for both: a template, a tidy sheet, and a merge.

Watch the 2-minute walkthrough on YouTube. Short on time? Watch the 50-second version.

Step 1: build the template in Google Docs

Step 2: format values in the sheet, not the template

Merges insert text, so a raw date can arrive as a long timestamp and 1200 won't become $1,200.00. Add helper columns with TEXT():

// In the sheet, add helper columns so the merge uses clean text:
// InvoiceDateText:  =TEXT(C2, "mmmm d, yyyy")
// AmountText:       =TEXT(D2, "$#,##0.00")
// InvoiceNumber:    ="INV-" & TEXT(ROW()-1, "0000")
// Then run the mergeRows() script from our row-to-PDF guide with a template containing
// {{ClientName}}, {{InvoiceNumber}}, {{InvoiceDateText}}, {{AmountText}}.

Sequential invoice numbers from ROW() shift if you sort or delete rows. For real invoices, type the number in once (or paste values) so it never changes.

Step 3: generate one PDF per row

Use the free script in our row-to-PDF guide. It reads displayed values, so your TEXT() columns come through exactly. Set the file name to something like client plus invoice number by editing the name line, for example row[1] + ' ' + row[0].

Step 4: send them (optional)

To email each PDF, add MailApp.sendEmail(row[emailCol], 'Invoice ' + row[numCol], 'Attached.', {attachments: [copy.getAs(MimeType.PDF)]}) inside the loop. Consumer Gmail accounts have a lower daily recipient quota than Workspace accounts; see Google's quotas page.

Caveats

Permissions caveat: because this script calls DriveApp and DocumentApp.openById, Google will ask you to allow it to "see, edit, create and delete all of your Google Drive files" and all your Docs. That is fine for a script you wrote and own, but it is the same broad access most mail-merge add-ons request. If that matters for your organisation, look for a tool that uses the drive.file scope, which only touches files you pick or the tool creates.

Want this without maintaining a script? SheetWeave (disclosure: we make it) is a Google Sheets add-on that fills a Google Docs {{placeholder}} template from each row and saves Docs, PDFs or both into a Drive folder you choose, writing the output links back to the sheet. It uses narrow, non-restricted scopes only (spreadsheets.currentonly, drive.file, script.container.ui, and script.external_request for the license check), so it cannot browse your whole Drive or read Gmail, and your sheet and document content never leaves your Google account. 14-day free trial with no credit card, then $8/month or $59/year. It is live on the Google Workspace Marketplace.
See SheetWeave

Related Google Sheets guides

Third-party details come from each vendor's own site and Google Workspace Marketplace listing, checked November 5, 2026. Not affiliated with Google, New Visions, Digital Inspiration, Tofu Labs or any other vendor named here. Google Sheets, Google Docs and Google Drive are trademarks of Google LLC. Features and prices change, so verify before you buy. Questions or corrections: hello@loomwise.app.