Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Email Automation

Email Automation

Issue gapless sequential PDF invoices from Google Sheets with Google Docs and Gmail

On a schedule, it handles email using Gmail, Google Docs, Google Drive, Google Sheets.

What it does

## Issue gapless sequential invoice numbers and PDF invoices from Google Sheets with Gmail ### How it works Mark a row in your invoice sheet as Ready and it becomes a numbered PDF invoice in your client's inbox. The number is the point: in many countries invoice numbers must run in an unbroken sequence, and this workflow can't skip one or use one twice. 1. Every 15 minutes the invoice sheet is read: rows marked Ready with no number yet are due to be issued. 2. The existing numbers are audited first. A Code node checks that each series (for example INV-2026-) runs 1, 2, 3… with no gap, no duplicate and no hand-typed number in the wrong format. If anything is off, nothing is issued and you get an email that names the missing or repeated numbers. 3. New numbers continue from the ledger itself, the Invoice No column. There's no separate counter to drift out of step, and a new year starts a new series automatically. 4. Rows with missing details are skipped without using a number. A missing client, email or price marks the row *Needs details* with the reason. 5. The number is written to the sheet before the PDF exists. If a later step fails, the number is already recorded, so a retry can never hand the same number to a second invoice. 6. The PDF is made from your own Google Docs template. It's copied, its placeholders are filled in, it's exported as a PDF, emailed to the client and the row is marked Sent with a link to the document. Amounts are computed in integer cents: quantity × unit price, then tax at the row's rate. ### Setup steps Takes ≈15 minutes. 1. Create an invoice sheet with the columns Invoice No, Status, Client, Client email, Description, Quantity, Unit price, Tax rate %, Currency, Due in days, Issued at, Total, PDF link. Leave Invoice No empty; the workflow fills it. 2. Select that sheet in Read the Invoice Sheet, Reserve the Number in the Sheet, Flag the Incomplete Row and Mark the Invoice as Sent. 3. Create a Google Doc to use as your invoice template, with these placeholders where the values should go: {{number}}, {{client}}, {{description}}, {{quantity}}, {{unit_price}}, {{subtotal}}, {{tax_rate}}, {{tax}}, {{total}}, {{currency}}, {{issued}}, {{due}}. Select it in Copy the Invoice Template. 4. Connect Google Drive, Google Docs, Google Sheets and Gmail credentials, and put your own address in Email You That Numbering Stopped. 5. Open Assign the

The steps

  1. Every 15 Minutes
  2. Read the Invoice Sheet
  3. Assign the Next Invoice Numbers
  4. Is the Numbering Intact?
  5. Email You That Numbering Stopped
  6. Is the Row Complete?
  7. Flag the Incomplete Row
  8. Reserve the Number in the Sheet
  9. Copy the Invoice Template
  10. Fill In the Invoice
  11. Export the Invoice as PDF
  12. Email the Invoice to the Client
  13. Mark the Invoice as Sent

Similar automations