Read → Match WO → Suggest GL Code → Route to Approver → Log

Invoice Intake and Coding and Approval Router

Reads each vendor invoice, matches it to the work order, suggests a GL code from the expense type and property, and routes it to the right approver by your rules, so AP reviews a prepared invoice instead of building one.

The Problem

Twenty minutes per invoice. Coding wrong at month-end.

A vendor invoice arrives by email. Your AP person downloads it, reads the line items, looks up the property code, checks the work order, picks a GL code, enters it into the system, and forwards it for approval. Twenty minutes. The approval sits in an inbox for two days because it went to the wrong person. The GL code turns out to be wrong at month-end.

What Changes

Coded, matched, routed. AP reviews in two minutes.

The agent reads the invoice, matches it to the work order, suggests the GL code based on expense type and property, and routes it to the right approver based on your rules - amount thresholds, property assignment, expense type. Your AP person reviews the agent's suggestion - 2 minutes instead of 20. The approval reaches the right person the same day.

Humans stay in control: Your AP person reviews every coding suggestion and your approver still approves. The agent does the reading, the matching, the coding suggestion, and the routing. It prepares the invoice, your team decides.

HOW THE AGENT WORKS

TRIGGERLLMAPIDECISIONACTIONWAIT
TRIGGERInvoice ArrivesVendor invoice by email or upload
LLMExtract FieldsLLM reads vendor, amount, line items, dates
APIMatch Work OrderFind the matching WO / PO in the PMS
LLMSuggest GL CodeCode from expense type + property
DECISIONMatch Found?
LLMPick ApproverApply routing rules - amount, property, type
ACTIONRoute for ApprovalSend to the right approver
ACTIONLog to APRecord coding + routing for month-end
The agent doesn't approve the invoice. It prepares the invoice for approval - coded, matched, and routed. Your AP person still reviews the coding. Your approver still approves. The agent removes the data entry and the routing guesswork.

HOW TO BUILD IT

Three levels of depth. Pick the one that matches where you are.

For the ops person who needs to understand what's involved and brief their team.

Your InvoicesEmail, upload, vendor portal
The AgentWorkflow engine + LLM
Your AccountingGL, work orders, approvals

WHAT YOUR TEAM PROVIDES ONCE

  • Chart of accounts - the GL codes and what each covers
  • Property codes - so invoices map to the right entity
  • Approval routing rules - amount thresholds, property owners, expense types
  • Work order / PO access - so invoices can be matched
  • Coding examples - a sample of correctly coded past invoices
What happens day-to-day: Vendor invoices arrive the way they always do. The agent reads each one, matches the work order, suggests the code, and routes it to the right approver. Your AP person reviews a prepared invoice in two minutes and the approval lands with the right person the same day.

For the IT person or technical lead who needs to scope the integration.

INQUIRY SOURCES

Email inbox
PDF upload
Vendor portal

WORKFLOW ENGINE (N8N)

Trigger
LLM - Extract invoice fields
Accounting API - Match WO
LLM - Suggest GL code
Rules - Pick approver
Approval system - Route
Log to AP ledger

CONNECTS TO

Accounting / PMS (Yardi / AppFolio)Read: WOs, GL, properties. Write: coded invoice
Email / upload intakeRead: incoming invoices + attachments
OCR / document parserExtract structured fields from PDF invoices
Approval workflow (email / Slack)Route to the right approver, capture decision
WITHOUT PMS API

Agent extracts and codes from the PDF and outputs a coded line to a sheet for AP to import. No live WO match, but the reading and routing work still disappears.

WITH PMS API

Agent matches invoices to live work orders and writes coded entries straight to AP. Routing uses real approval rules. Best experience.

For the person who wants to build this agent step by step. Each node below maps to an n8n workflow node.

TRIGGERNode 1
Trigger - Invoice Arrives
IMAP on the AP inbox with attachment capture, OR an upload webhook.
Output: { vendor_email, subject, pdf_attachment, received_at }
LLMNode 2
LLM - Extract Invoice Fields
Vision-capable model reads the PDF and returns structured invoice data.
Output: { vendor, invoice_no, date, line_items[], total, po_ref }
You read a vendor invoice (provided as a PDF/image) and extract structured fields.

Return:
- vendor: the vendor name
- invoice_no: invoice number
- date: invoice date (ISO)
- po_ref: any PO or work order number referenced, or null
- line_items: [{ description, amount }]
- total: numeric total

Respond ONLY with valid JSON. No explanation.
INPUT
[PDF: ACME Plumbing, Inv #4471, WO-2231, 'Clear main line blockage unit 214 - $285.00', total $285.00]
OUTPUT
{
  "vendor": "ACME Plumbing",
  "invoice_no": "4471",
  "date": "2026-06-09",
  "po_ref": "WO-2231",
  "line_items": [{ "description": "Clear main line blockage unit 214", "amount": 285.00 }],
  "total": 285.00
}
APINode 3
HTTP Request - Match Work Order
Look up po_ref (or vendor+unit+date) in the PMS to find the matching work order and its property.
Output: { wo_id, property_code, wo_trade, wo_status } or no_match
LLMNode 4
LLM - Suggest GL Code & Approver
Suggests a GL code from expense type + property and picks the approver from your routing rules.
Output: { gl_code, gl_reason, approver, route_reason }
You code a vendor invoice and choose its approver.

Use the invoice, the matched work order, the chart of accounts, and the routing rules.
- gl_code: pick from CHART OF ACCOUNTS, matching expense type and property
- gl_reason: one line a reviewer can check
- approver: pick from ROUTING RULES using amount, property, expense type
- route_reason: one line explaining the routing

INVOICE: {invoice_json}
WORK ORDER: {wo_json}
CHART OF ACCOUNTS: {chart_of_accounts}
ROUTING RULES: {routing_rules}

Respond ONLY with valid JSON.
OUTPUT
{
  "gl_code": "5120-PLUMB",
  "gl_reason": "Plumbing repair tied to WO-2231, expensed to property MF-214.",
  "approver": "regional_pm_west",
  "route_reason": "Under $500, property in West region → regional PM, not VP."
}
DECISIONNode 5
Condition - Match Found?
IF a work order matched → route with full confidence. ELSE → flag to AP as unmatched for manual coding before routing.
Output: Branch: MATCHED (route) or UNMATCHED (flag to AP)
ACTIONNode 6
Route for Approval
Send the coded invoice to the chosen approver with the matched WO and coding attached, one-tap approve.
Output: Invoice routed. Status: "Pending approval - coded".
APINode 7
Log to AP Ledger
Write the coding and routing decision to AP so month-end reporting is clean and auditable.
Output: AP record updated with code, approver, and timestamp.
MVP vs Advanced — Where To Start
MVP — START HERE
  • Email inbox trigger
  • LLM field extraction
  • Manual WO match
  • Rules-based coding suggestion
  • Route by email
  • Coded line to a sheet
ADVANCED — ADD LATER

    Full Video Walkthrough Coming Soon

    From PDF invoice to routed approval - step by step.

    Register to be notified

    Everything on this page is free to learn.

    When you're ready to build — do it yourself or bring us in.

    OTHER AGENTS IN LEASING & MARKETING

    Standardises repair approval with cost, options, and decision logging
    Bulk invoice processing with consistent GL coding
    Monitors trust accounting controls, catches gaps before audits
    Flags anomalies and drafts variance explanations before month-end

    Frequently asked questions

    Invoice Intake and Coding and Approval Router is an AI agent that reads invoices, suggests GL codes, and routes to right approver.
    Twenty minutes per invoice. Coding wrong at month-end. The Invoice Intake and Coding and Approval Router addresses this — it reads invoices, suggests GL codes, and routes to right approver.
    No — your team stays in control. Your AP person reviews every coding suggestion and your approver still approves. The agent does the reading, the matching, the coding suggestion, and the routing. It prepares the invoice, your team decides.