TriggerOffice 365 Outlook — When a new email arrives (V3) in the
ap@ shared mailbox, with attachments onlyConnectorsOffice 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
- 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')) - Extract invoice data — AI Builder Extract information from invoices returns vendor name, invoice number, date, PO number, subtotal, tax and total.
- Check confidence — If confidence for total or invoice number is below 0.8, route to a human review queue.
- 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) - 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