AI Vision Agent for NetSuite Vendor Bills from PDF Invoices

NetSuiteAIAccounts PayableVision AgentsClauden8n

The earlier posts in this series were voice agents. This one doesn't make a call. It reads.

Every AP team I've worked with has the same time sink. A vendor invoice lands in the inbox as a PDF, someone opens it, reads off the vendor, the line items, the amounts, the GL codes, and keys all of it into a vendor bill. Dozens a day at a mid-size company. It's the most repetitive data entry in finance.

I built an agent that does the reading and the typing.

How it works

A vendor invoice comes in as a PDF. The agent hands it to Claude, which reads the document and returns structured data: vendor name, invoice number, dates, the PO it references, and every line item with its quantity, rate, and GL account.

There's no template behind this. The agent isn't grabbing the total from fixed coordinates the way old OCR did. A different vendor's invoice, in a different layout, comes back parsed the same way.

From there n8n takes the extracted data, looks up the vendor in NetSuite, pulls the matching purchase order, and builds the vendor bill: the item lines coded to the right accounts, the freight line booked as an expense.

Then it does the part that makes AP people look up. It compares the bill against the PO. This invoice had a delivery charge that wasn't on the original PO. Instead of paying it quietly, the agent flagged the discrepancy and opened a task for someone to review before payment.

One detail that took some figuring

NetSuite doesn't apply sales tax on its own when you create a vendor bill through the API. The bill posted at the pre-tax subtotal, which didn't match the invoice total. So the agent reads the tax amount off the invoice and books it as its own line. Now the bill ties to the invoice to the cent.

Small thing, but it's the difference between a number an AP clerk trusts and one they have to go fix.

The stack

  • NetSuite: vendor, purchase order, and the vendor bill it writes back
  • Claude: reads the PDF, returns structured invoice data
  • n8n: orchestration, PO matching, discrepancy logic, NetSuite write-back

The hard parts were NetSuite auth across the HTTP calls and the PO-matching logic. The reading, which used to be the impossible part, is now the easy part.

Demo's on LinkedIn.