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
- Every 15 Minutes
- Read the Invoice Sheet
- Assign the Next Invoice Numbers
- Is the Numbering Intact?
- Email You That Numbering Stopped
- Is the Row Complete?
- Flag the Incomplete Row
- Reserve the Number in the Sheet
- Copy the Invoice Template
- Fill In the Invoice
- Export the Invoice as PDF
- Email the Invoice to the Client
- Mark the Invoice as Sent
Similar automations
Building Blocks & UtilitiesRun Sequential API Requests Against ReqRes4 stepsBuilding Blocks & UtilitiesOrchestrate sequential Notion task execution for participants with webhooks53 stepsFinance, Invoices & AccountingIssue 80G donation receipts from Razorpay payments with OpenAI and Gmail39 stepsForms & SurveysIssue GST e-invoices and e-way bills for Shopify orders via GSP and Google32 steps