Documents
Automate Invoice Generation
If the customer, agreed price and completed work are already recorded, typing them again into an invoice adds another chance for error. Invoice generation automation uses those approved records to prepare a consistent draft and gives your team a clear point to check it before sending.

Key takeaways
Use an approved billing event rather than every edited spreadsheet row.
Separate draft creation, approval and sending.
Keep one billing key so a retry cannot issue a second invoice.
Trigger invoice generation from an approved billing event, validate the customer and line items, reserve a unique invoice reference, fill the template and create a draft PDF or accounting record. Review the draft, send through the agreed channel and record the result against the source order.
- Mark a job, milestone or order as ready to bill.
- Validate customer details and approved line items.
- Create one draft using the billing event ID.
- Check the rendered invoice and obtain approval.
- Send the approved version and save the invoice reference.
Choose exactly what makes work ready to bill
A completed job, an approved delivery or an agreed milestone can be the trigger. Pick the event your business actually uses. A CRM deal marked won may start onboarding but may not yet mean the customer should receive an invoice.
Record the event ID, customer account, billing contact, currency, agreed price source and required approval. If a job is reopened, the automation should inspect the existing invoice state before generating anything new.
Decide whether the first version creates a draft in the accounting system or produces a document for review. Both can be useful. The important distinction is whether the output is merely prepared or has actually been issued.
Use approved values instead of rebuilding pricing logic
Read prices and discounts from the approved order or billing record. Avoid copying a price from an old email when the current agreement lives elsewhere. If required data is missing, send the record back to its owner with a specific reason.
Have the business's responsible finance adviser define required invoice wording, tax treatment and rounding for its jurisdiction. The automation applies those approved rules; this article does not set tax or accounting policy.
Google provides an Apps Script example that fills a Sheets invoice template, creates a PDF in Drive and can send it by email. It is a useful technical starting point, but a business implementation still needs duplicate controls, approved recipients and a review step.
| Input | Owner | Generation rule |
|---|---|---|
| Billing event | Operations | One approved event creates one draft |
| Customer and recipient | Account owner | Use confirmed billing details |
| Lines, rate and discount | Commercial owner | Use the approved version |
| Tax and required wording | Finance owner | Apply the agreed policy |
| Template and branding | Business owner | Use a recorded template version |
Worked example: bill a completed service milestone
Consider an illustrative project with two agreed stages. Stage A is approved for 600 and Stage B for 400, in the same chosen currency. Only Stage A is complete. The source record identifies project P-104, milestone A and the approved billing amount.
The automation creates a draft tied to P-104:A, fills the customer's billing details and describes Stage A. It leaves Stage B unbilled. A reviewer checks the rendered document, recipient and applicable finance settings before issuing it.
If the job record is saved again, the workflow finds the same billing key and returns the existing draft. If the amount changes before approval, it creates a tracked revision for review. An already issued invoice goes through the business's correction process instead of being silently overwritten.
Treat sending as a separate, recorded step
Store the draft file or accounting ID before asking for approval. Tie approval to that version. When approved, send only to the confirmed billing contact and record the channel's acceptance result.
A successful email action does not prove the customer opened the invoice or paid it. Use accurate states such as Draft, Approved, Sent and Delivery issue. Payment status should come from the authorised accounting or payment record.
If a send response is lost, inspect the existing send record or message reference before retrying. Keep automatic retries bounded and alert a person when the result remains uncertain. This prevents the customer receiving several copies because a workflow could not see its first success.
Check the document people will actually receive
Preview a short invoice and a long one with many line items. Check page breaks, totals, addresses, currency labels, logo quality and readable descriptions. Test accented names and long company names as well as the usual examples.
Use a test recipient while validating the flow. The Google sample includes an email override for this purpose. Compare the output with a manually checked expected invoice, then test an edited milestone, missing billing contact and repeated trigger.
Start with one billing pattern and keep the old manual process available during the trial. Expand only after every draft, approval and send can be traced back to its original billing event.
Have Automations For Business build your invoicing flow
We can tailor invoice generation to your CRM, spreadsheet, order form, document template and supported accounting tools. The custom work includes the trigger, field mapping, approval route, numbering handover, file naming and delivery record.
Send a redacted source order and an example of the invoice you want to produce. Tell us which steps must remain manual. We can design the automation around those requirements and confirm connection and licensing needs before implementation.
Your ready-to-use checklist
0 of 6 checked
Make the next step clear.
Invoice generation planning sheet
Free templateConnect this with the rest of your workflow
Sources and notes
Sources checked on October 28, 2026.
- Google: generate and send PDFs from Sheets
An official example of filling an invoice template, creating PDFs and testing email delivery.
- Microsoft: Word Online (Business)
Another possible template-filling route, with connector requirements and limitations.