1. Invoice intake: PDF → extracted → posted
AP clerks open each supplier invoice PDF, type the vendor, amount, GST and line items into the ERP, then file it — slow, and error-prone at month-end volume.
Trigger: Email (AP inbox) or Webhook (upload)
How the workflow runs
- Trigger
Invoice arrives. An Email trigger on the AP inbox (or an upload Webhook) catches each invoice with its PDF attachment.
- Agent
Extract the fields. An Agent node reads the document and pulls vendor, invoice no., date, amounts, tax and line items into structured data.
- Condition
Validate + match PO. A Condition node checks totals, tax and 3-way match against the PO; clean ones flow on, mismatches branch to review.
- Approval
Approver signs off exceptions. An Approval node routes anything over a threshold or with a mismatch to the right approver.
- Tool (MCP)
Post to the ERP. A Tool (MCP) node creates the AP entry in your accounting system.
Channels & connectors
- Approval / HITL
- Tool (MCP → ERP)
- Webhook
Outcome
Invoices are captured, validated and posted with humans touching only the exceptions.
Why it helps
Eliminates manual data entry and the transcription errors that cause payment disputes; approvals become the only human step.
Build spec
1 agent — 1 extraction agent; PO-match, approval routing and the ERP post are workflow nodes.
System prompt (paste-ready)
You are an accounts-payable clerk. From the invoice document, extract strict JSON {vendor, invoice_no, invoice_date, currency, subtotal, tax, total, line_items[{desc, qty, amount}], po_number?}. Copy values exactly — never compute or 'fix' a total; if it doesn't add up, set needs_review=true with the discrepancy. Do not guess a PO number.MCP connectors
- ERP / accounting system (Tally, Zoho, SAP…) — via a Tool (MCP) node
- AP inbox — via Email trigger
Built-in tools
- document parsing (PDF/scan → text)
- http_request (3-way PO match)
Guardrails
- No computed totals — the agent only transcribes; any mismatch forces needs_review (stops silent errors)
- Amount/mismatch over threshold → Approval node (the right approver) before posting
- Duplicate-invoice check (vendor + invoice_no) before the ERP write — never post the same bill twice
Output & delivery
Extracted JSON → Condition validates totals + 3-way PO match → exceptions go to the Approval node → clean invoices are posted to the ERP by a Tool node via MCP, with the source PDF linked.