See llms.txt for all machine-readable content.

Back to Templates

Upload invoices via form and extract, validate, dedupe, and log to ledger

Quick overview

This workflow lets you upload a single PDF invoice via an n8n Form, extracts the PDF text, parses common invoice fields (supplier, dates, totals, VAT, currency) using built-in code logic, and returns the detected fields and checks as a JSON response.

How it works

  1. Receives an uploaded invoice PDF through an n8n Form trigger.
  2. Applies parsing settings like date order and a fallback default currency.
  3. Selects the uploaded file from the form submission and standardizes it into a binary field for processing.
  4. Extracts text from the PDF using n8n’s built-in PDF text extraction.
  5. Parses the text to identify invoice metadata (supplier, invoice number, invoice/due dates, currency, net/VAT/gross totals) and validates that net + VAT matches the total.
  6. Builds a human-readable summary plus a CSV-formatted ledger row and returns the full result as a JSON response to the form submission.

Setup

  1. Run the workflow in n8n and open the generated form URL for the “read-one-invoice” path.
  2. Upload a PDF invoice that contains a readable text layer (scanned/image-only PDFs may not extract text).
  3. Optionally adjust dateOrder and defaultCurrency in the Set Default Parameters node to match your invoice formats.
  4. No credentials, API keys or AI models are needed, and the workflow saves no files.

Requirements

  • An n8n instance with the Form Trigger node (self-hosted or Cloud)
  • PDF invoices with a text layer (no OCR for scans or photos)

Customization

  • Change dateOrder (auto, dmy or mdy) and defaultCurrency in the Set Default Parameters node
  • Add or change extracted fields in the Parse Invoice Data code node