n8n Workflow: Parse Incoming XRechnung via IMAP & Archive XML
n8n Workflow: Parse Incoming XRechnung via IMAP & Archive XML
Regular price
£19.99
Regular price
£19.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Workflow: Parse Incoming XRechnung via IMAP & Archive XML
Regular price
£19.99
Regular price
£19.99
Sale price
Unit price
/
per
Parse and validate incoming XRechnung invoices automatically (IMAP → archive → reporting)
This n8n workflow monitors an IMAP mailbox for incoming invoice emails, extracts attached XRechnung (UBL) XML files, validates mandatory EN 16931 fields and totals, archives the XML to the appropriate folder, and logs results to an n8n Data Table—alerting accounting when something goes wrong.
What this workflow does
- Reads new emails via IMAP and downloads attachments from the configured mailbox.
-
Detects XRechnung XML attachments: searches for a
.xmlfile and ignores emails without an XML attachment. - Parses and normalizes the invoice: extracts the XML text, converts it to JSON, and parses UBL Invoice fields into a normalized invoice object.
- Reports processing errors for non-UBL/invalid XML so issues are visible and actionable.
- Validates against EN 16931 requirements, recalculates totals and tax breakdowns, and checks for inconsistencies.
-
Archives XML files:
- Valid invoices are saved to a “gueltig” folder.
- Invalid invoices are saved to a “fehlerhaft” folder.
- Logs key invoice metadata and amounts into an n8n Data Table named “Rechnungseingang”.
- Sends email notifications to accounting when validation fails (including an error list), and—if enabled and the sender is not a no-reply address—sends a follow-up request to the original sender for correction.
Use cases
- Automating XRechnung intake for accounts payable by validating EN 16931 fields immediately upon receipt.
- Reducing manual invoice handling using IMAP-based email attachment processing with clear “gueltig/fehlerhaft” audit trails.
- Providing accounting teams with structured invoice data in an n8n Data Table for reporting and reconciliation.
Technical details
- IMAP email polling + attachment download
- Nodes/logic: if, set, xml, code, no op, data table
- XML → JSON conversion, UBL invoice field parsing, total/tax recalculation checks
- Archiving to “gueltig” and “fehlerhaft” folders
- SMTP email notifications for accounting and optional sender follow-ups
Setup summary: configure IMAP for invoice mail retrieval, configure SMTP for notifications, and create/select the “Rechnungseingang” Data Table with mapped columns.
