Processing E-Invoices (ZUGFeRD/XRechnung) with n8n
E-invoicing obligation 2025-2028 explained clearly: ZUGFeRD vs. XRechnung and how n8n automatically processes incoming e-invoices.
E-invoices in ZUGFeRD or XRechnung format can be automatically read into n8n using the built-in XML node or targeted JavaScript in the Code node, converted into structured data and forwarded to the accounting software. Since January 1, 2025, all domestic companies must be able to receive e-invoices in the B2B sector; for issuing them, transitional periods apply depending on prior-year turnover until the end of 2026 or the end of 2027 respectively, and from 2028 the e-invoice becomes mandatory for practically all domestic B2B transactions. Anyone who regularly checks many incoming invoices manually and transfers them into accounting can significantly speed up this step with an n8n automation. Software does not replace an individual tax review by a tax advisor. As of: July 2026.
Which deadlines currently apply to the e-invoicing obligation?
The obligation to receive e-invoices has applied since January 1, 2025; issuing them is subject to staggered transitional periods. According to the FAQ of the Federal Ministry of Finance companies may until the end of 2026 optionally still issue paper invoices or other electronic formats, provided the recipient agrees. For companies with a prior-year turnover of no more than 800,000 euros, this transitional period is extended until the end of 2027. From January 1, 2028, the last transitional rule expires, and the e-invoice then generally becomes mandatory in domestic B2B business. Invoices under 250 euros are exempt from the obligation. This information does not replace individual tax advice; for a binding assessment of your situation you should consult your tax advisor.
What is the difference between ZUGFeRD and XRechnung?
ZUGFeRD is a PDF file with embedded XML, while XRechnung is a pure XML document without its own visual representation. Both formats are based on the European standard EN 16931 and meet the VAT requirements, as confirmed by e-rechnung-bund.de for the B2B sector.
- XRechnung: Pure XML, not readable by humans without additional software, but optimal for automated processing.
- ZUGFeRD (from version 2.0.1, except for the MINIMUM and BASIC-WL profiles): PDF/A-3 file with embedded XML attachment, directly readable by humans and machine-readable at the same time.
For an automated processing system like n8n, this means: XRechnung can be read in directly, while for ZUGFeRD the embedded XML must first be extracted from the PDF file.
How does n8n technically read incoming e-invoices?
n8n offers two built-in tools for this, the XML node for pure format conversion and the Code node for individual processing logic. According to the n8n documentation on the XML node it converts data between XML and JSON and offers options such as Property Name, Attribute Key and Character Key, as well as, in XML-to-JSON mode, Explicit Array, Explicit Root and Ignore Attributes. For an XRechnung it is sufficient to process the incoming XML file in XML-to-JSON mode; the invoice number, amounts and line items are then available as a structured JSON object. For ZUGFeRD, the XML is embedded as an attachment inside a PDF/A-3 file, which requires an additional extraction step, usually solved with a PDF library in the Code node. The Code node runs your own JavaScript or Python within the workflow; on self-hosted n8n instances additional npm modules can be imported for this, which is not possible on n8n Cloud.
What happens after parsing?
After conversion into a JSON object, the invoice data can be forwarded via an HTTP Request node or a suitable accounting node to systems such as DATEV or Lexoffice. It is also advisable to check for mandatory fields according to EN 16931, such as invoice number, tax ID and gross amount, before data is automatically accepted, so that faulty or incomplete invoices do not slip through unnoticed. For companies with a high invoice volume, manually reviewing every line item is barely feasible anymore; a properly set up n8n workflow handles this step reliably and can be adapted to your existing accounting software. How robust the automation actually runs depends heavily on how cleanly the incoming invoices are structured; especially with ZUGFeRD files from different sources, sufficient testing is worthwhile.
Frequently asked questions about e-invoices with n8n
Is ZUGFeRD still permitted after 2026?
Yes, ZUGFeRD from version 2.0.1 remains a permitted e-invoice format even after 2026, as long as the MINIMUM or BASIC-WL profiles are not used. The transitional periods do not concern the choice of format itself, but only by when you must switch to a structured electronic format at all. From 2028, every B2B invoice must have an EN 16931 compliant format; ZUGFeRD and XRechnung both meet this requirement.
Can n8n process PDF invoices without embedded XML?
Only to a limited extent, because the XML node requires actual XML data and not pure image or text content. A classic PDF invoice without embedded XML can at most be roughly evaluated in n8n via text recognition or an external AI service, but this is significantly more error prone than the structured processing of a genuine e-invoice. For reliable automation, you should aim for ZUGFeRD or XRechnung as the incoming format.
Does an n8n automation replace the review by the tax advisor?
No, an n8n automation handles the technical reading and forwarding of the invoice data but does not replace a tax or legal review. Questions about deadlines, exceptions or the correct VAT treatment of individual invoices should still be clarified with your tax advisor. The automation reduces the manual effort; the substantive responsibility remains with you.
Do I need n8n Cloud or a self-hosting solution to process e-invoices?
Both variants generally work, but for more complex ZUGFeRD extraction with additional libraries, self-hosting is often more practical. On n8n Cloud, external npm modules cannot be imported in the Code node, which limits some PDF extraction steps. With a self-hosted instance, you have full access to additional libraries and more control over your data.
NordFlux UG (haftungsbeschränkt)
NordFlux builds digital employees for organisations: automations and AI agents that take over repetitive work. You stay in control.
Concrete questions about automation or AI?
In a free initial analysis we discuss your case directly. No strings attached.