See llms.txt for all machine-readable content.

Back to Templates

Check supplier invoices for fraud with PaperOffice AI and human review

Quick Overview

This workflow collects an invoice PDF via an n8n form, archives and extracts it in PaperOffice AI, cross-checks it against historical documents for IBAN changes, duplicates, and order/delivery mismatches, and then queues it for human review before tagging the document based on a signed PaperOffice webhook decision.

How it works

  1. Receives an invoice PDF upload via an n8n form and validates required settings like the PaperOffice workspace ID and HITL agent UUID.
  2. Uploads the PDF to PaperOffice AI, then runs PaperOffice AI invoice extraction to read key fields such as supplier, invoice number, total, IBAN, and line items.
  3. Searches the PaperOffice AI workspace for earlier invoices by supplier, documents matching the order number, and documents with the same invoice number, and runs a PaperOffice AI duplicate check.
  4. Reads OCR text from selected historical and order-related documents, extracts evidence (including validated IBANs), and optionally extracts structured data from the purchase order and delivery note.
  5. Evaluates fraud and overbilling checks (extraction completeness, IBAN match/changed/unknown, possible duplicates, and ordered/delivered quantity mismatches) and writes a check report back onto the invoice document in PaperOffice AI.
  6. Optionally starts a PaperOffice AI AI-DMS Ultra deep check, then enqueues the invoice into the PaperOffice AI HITL review queue and returns a JSON response indicating the task is queued.
  7. Receives a signed PaperOffice AI review-decision webhook, verifies the HMAC signature, and tags the invoice in PaperOffice AI as either fraud-check:ready-for-payment or fraud-check:blocked.

Setup

  1. Create an HTTP Bearer Auth credential with your PaperOffice AI user token (po_ut_…) and use it for all PaperOffice AI HTTP Request nodes.
  2. Set your PaperOffice AI workspace ID and your HITL agent UUID in the Settings step.
  3. Configure your PaperOffice AI HITL agent to call the production URL of the review-decision webhook and set the same signing secret in the HMAC signature configuration.
  4. If you want optional deep checks, ensure your PaperOffice AI plan supports AI-DMS Ultra processing and keep the form option enabled for reviewers/requesters.