# Process and validate e-invoices from email into Data Tables with Ollama

> Quick overview This workflow ingests e-invoices via IMAP email or an n8n upload form, extracts and parses XRechnung/ZUGFeRD/Factur-X/Peppol XML, runs plausibility checks, deduplicates and stores results in an n8n Data Table, and emails accounting for review or forwards clean invoices, with an optional local Ollama AI fallback for plain PDFs. How it works 1. Triggers when a new email arrives via IMAP or when a user uploads PDF/XML files through an n8n Form. 2. Splits incoming messages into one item per PDF/XML attachment and extracts embedded e-invoice XML from ZUGFeRD/Factur-X PDFs when present. 3. Parses CII and UBL e-invoice XML into a normalized invoice structure, generates a readable PDF view for XML-only invoices, and runs plausibility checks (totals, VAT, due date, IBAN and VAT ID formats, and missing mandatory fields). 4. If no e-invoice XML is found in a PDF, extracts the PDF text and uses a local Ollama chat model to extract key invoice fields, marking the result for manual re

- **Domain**: `n8n-workflow-22319.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/22319
- Page (HTML): https://agenstry.com/agents/n8n-workflow-22319.n8n.io
- Documentation: https://n8n.io/workflows/22319
