← Back to library

Turn emailed supplier invoices into checked purchase orders

Nova, a freelance automation builder writing on DEV Community, made an n8n workflow for a Dubai client that reads invoice emails, extracts PDF data with an AI model, validates it against inventory and creates purchase orders. The 23-node flow took three days, mostly on edge cases. About ninety percent of forty to fifty weekly invoices now run without manual work.

  • OutcomePull supplier invoices out of the inbox, read their contents, compare them with stock records and raise orders, with staff able to maintain the flow themselves.
  • SetupAn afternoon+
  • LevelIntermediate
  • CreditNova
View original
Works with
n8n

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 23, 2026

When should you use it?

  • Dozens of invoices arrive by email each week
  • Data entry into an ERP takes hours daily
  • Staff need to adjust rules without a developer

Not for: Very low invoice volumes; Systems with no API for inventory or orders

What do you need, and what do you get?

You need

  • A mailbox receiving invoices
  • An AI model for extraction
  • API access to inventory and ordering systems

You get

  • Structured invoice records
  • Validation results against stock data
  • Purchase orders created automatically

How does it work, step by step?

  1. Trigger on new emailWatch the invoices mailbox and pull attachments.
  2. Extract with a modelSend each PDF to the AI step for supplier, items, quantities and totals.
  3. ValidateCompare against inventory and vendor records before acting.
  4. Handle edge casesPlan for corrupt files, malformed model output and the ERP being down.
  5. Train an ownerHe spent about two hours teaching the client's operations manager to change rules and add vendors.

The prompt

Our own prompt, inspired by Nova and written to work in n8n. Values in lime are placeholders.

Prompt0 variables
When a new email arrives in [mailbox] with a PDF invoice, extract supplier, invoice number, date, line items, quantities, unit prices and total as JSON. Check each item against inventory in [system]. If everything matches and the total is under [limit], create a draft purchase order. Otherwise add the invoice to an exceptions list with the reason. Never delete emails.

Inspired by Nova: n8n Review 2026: I Used It for 8 Months to Build AI Agents (Honest Verdict). The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.

What can go wrong?

  • Complex flows can take minutes per run, which hurts real-time needs.
  • Pick the hosting tier carefully, because execution limits on cheap plans are low.

Our take

Nova's build sounds grounded, including the three days spent on edge cases like corrupted PDFs and bad model output, which is where most invoice automations actually fail. The most important step after the happy path works is the handover: an automation the client can maintain is worth more than a clever one only the builder understands. Add an exceptions queue that a person checks daily for invoices that failed extraction or validation, and require approval for purchase orders above a money threshold. Keep the extracted fields next to the original PDF for audit, and never delete the email attachment after processing. Train at least one client-side owner on how to read failed runs and restart them. Test deliberately with blank pages, wrong currencies and duplicate invoice numbers before go-live. Limit the workflow's credentials to creating draft purchase orders, not approving payment. Reconcile weekly totals against supplier statements so silent under- or over-ordering shows up quickly.

Where the time goes back: Manual extraction and order entry largely disappear, leaving staff to handle the small share of exceptions.

FAQ

How much time did it save?
The client went from about two hours a day of entry to roughly 8 to 10 hours saved weekly.
Can non-developers maintain it?
Yes, the operations manager now edits validation rules and vendors herself.

Source and credit

Inspired by Nova. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.

Inspired by
n8n Review 2026: I Used It for 8 Months to Build AI Agents (Honest Verdict)
Creator
Nova
Published on
DEV Community (dev.to)
Original date
Apr 1, 2026
License
Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
Originally for
n8n
AI dry run
Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in Finance & Accounting

All 62 Finance & Accounting playbooks →

Related playbooks

Finance & AccountingWorkflow✓ AI dry run

Cover bills, settles and refunds in one workflow

Each billing event your app sends (invoice, payment or refund) is handled exactly once, with records, PDFs and customer emails kept in step.

Credit: u/cuebicai on r/n8n_ai_agents

An afternoon+
Finance & AccountingWorkflow✓ AI dry run

Match supplier invoices to their purchase orders in Make

Each emailed invoice is read, paired with its purchase order and checked line by line, with matches approved and discrepancies or unclear lines escalated.

Credit: Philippe Larrue (@Philippe_LARRUE)

Under an hour
Finance & AccountingWorkflow✓ AI dry run

Create Xero purchase orders and invoices from board status

Change an item's status on your project board and have the purchase order, bill or client invoice created in Xero, with the PDF attached back to the item.

Credit: u/TableSad825 on r/mondaydotcom

An afternoon+
Finance & AccountingWorkflow✓ AI dry run

Harden a vendor-PDF to QuickBooks invoice pipeline

Get vendor PDFs turned into QuickBooks records with the original attached, new items learned and duplicates blocked.

Credit: Eamonn Cottrell

An afternoon+