Skip to main content
Loopfour
Workflow templates

ACCOUNTS PAYABLE & INVOICE PROCESSING

From inbox to ERP, with the PO match done before anyone looks.

Pull invoices out of a shared AP inbox, read them with a scoped AI step, match against the purchase order in your ERP, and post the bill with an exception queue for anything that does not agree.

Email (webhook)Agent (AI)NetSuite / QuickBooksSlack
How it is built
1

Webhook trigger fires when an invoice email arrives in the AP inbox

2

Agent block extracts vendor, amount, line items, and invoice number from the attachment

3

Transform block maps the extracted fields to your ERP schema

4

NetSuite / QuickBooks block looks up the matching purchase order

5

Condition block compares the extracted total to the retrieved PO

6

Approval block routes any variance over threshold to a human on Slack

7

NetSuite / QuickBooks block posts the vendor bill once the check passes or the approval clears

01

The problem

The problem

A finance team receiving invoices as email attachments usually keys them in by hand: open the PDF, read the vendor and amount, look up the purchase order, and type it all into the ERP. Consider a team processing 3,000 invoices a month. At a couple of minutes each, that is a standing part-time job that exists only because the systems do not talk to each other.

The failure mode is not just the time. It is the invoices that get posted before anyone checks them against the PO, and the duplicates that slip through because a human was moving fast.

02

How it is built

How it is built
  1. 1Webhook trigger starts the run the moment an invoice email hits the AP inbox.
  2. 2Agent block reads the attachment and extracts vendor, invoice number, line items, and total. This is the one probabilistic step, and it is scoped to reading, not deciding.
  3. 3Transform block maps the extracted fields to your ERP schema so the values line up with the account structure you already use.
  4. 4NetSuite or QuickBooks block looks up the matching purchase order so the comparison runs against a real record, not an assumption.
  5. 5Condition block compares the extracted total to the retrieved PO. Within tolerance, it continues. Outside tolerance, it branches.
  6. 6Approval block posts the variance to a Slack channel with approve and reject buttons, and waits for a named approver.
  7. 7NetSuite or QuickBooks block posts the vendor bill only after the check passes or the human approves.

03

What the controller sees

What the controller sees
StepBefore automationWith this template
Data entryManual, per invoiceExtracted and mapped by code
PO matchAfter the fact, if at allRuns before posting
ExceptionsFound in a later reviewRouted to Slack in the moment
EvidenceReconstructed at auditLogged field by field per run

Nothing posts without a rule, and nothing posts without a trail. The AI step reads the document; the coded blocks decide what happens next, the same way every time.

Want this workflow built and maintained for your finance stack?

Book a demo