Skip to content

Invoice from order lines (PDF)

An invoice is a header and a variable number of lines. The query returns one row per line with the invoice's own details and totals alongside (window functions work them out), the layout repeats the line row with {{#each}}, and the finished PDF is written straight to a file store under the invoice's number.

The pipeline

This is the actual graph the template creates — 2 steps.

Connects to

  • SQLite
  • Local files

Also includes

  • Rendered documents

How you know it worked

demo-documents/invoices/INV-2026-0419.pdf appears next to the DataFlow API: four lines, a subtotal of 755.00, VAT of 151.00 and a total due of 906.00.

Try this template

Used in: Retail & e-commerce

Stop moving data by hand.

Start free with three projects, or talk to us about running it across your organisation.