Supplier invoice capture from email with AI Builder and three-way match checks

Invoices arriving in the AP mailbox are read by AI, matched to the PO, and queued for approval.

TriggerOffice 365 Outlook — When a new email arrives (V3) in the ap@ shared mailbox, with attachments only
ConnectorsOffice 365 Outlook · AI Builder · SharePoint · Approvals · Microsoft Teams
CategoryFinance

The problem

Accounts payable retypes hundreds of supplier invoices each month and pays late.

The outcome

Invoice data extracted automatically, mismatches flagged, and clean invoices ready to post in minutes.

Before you start

  • AI Builder credits in the environment.
  • A PO list or ERP access to look up PO values.

Build it step by step

  1. Collect attachments — Loop attachments and keep PDFs and images only.
    Expression / setting
    or(endsWith(toLower(items('Apply_to_each')?['name']), '.pdf'), endsWith(toLower(items('Apply_to_each')?['name']), '.jpg'))
  2. Extract invoice data — AI Builder Extract information from invoices returns vendor name, invoice number, date, PO number, subtotal, tax and total.
  3. Check confidence — If confidence for total or invoice number is below 0.8, route to a human review queue.
  4. Match the PO — Look up the PO and compare totals (allow a small tolerance for rounding).
    Expression / setting
    less(abs(sub(float(outputs('Invoice_total')), float(outputs('PO_total')))), 1)
  5. Approve and file — Matched invoices go to the budget owner for approval; save the PDF to AP/<vendor>/<yyyy-MM> with metadata.

Connector action names are shown as they appear in Power Automate at the time of writing; Microsoft and Adobe occasionally rename actions or add new versions.

Error handling

  • Duplicate invoices: check vendor + invoice number against existing items before creating a new one.

Licensing

  • AI Builder is premium and consumes credits per page processed.

Variations

  • Pair with your e-Invoice middleware: for suppliers already on MyInvois, read the validated e-Invoice instead of using OCR.

Common in: Manufacturing · Retail · Logistics