Create ZUGFeRD Invoice in n8n
What this node does
PDF4me — Create Zugferd Invoice generates fully compliant ZUGFeRD hybrid e-invoices — a PDF/A-3 document with structured XML invoice data embedded inside — directly inside your n8n workflow. Convert XML, JSON, or CSV invoice data into a single hybrid file ready for the German B2B e-invoicing mandate, EU-wide EN 16931 compliance, or the German XRECHNUNG public-sector profile. Supports every ZUGFeRD version from 1.0 to 2.4 and all six conformance levels in one node.
Authenticating Your API Request
Every PDF4me node in n8n requires a valid Credential to connect with. Create or select one that holds your PDF4me API key so the workflow can authenticate ZUGFeRD invoice generation requests securely.
Important Facts You Should Not Miss
Parameters
Required in the n8n UI: Credential to connect with, Input Data Type, Document Name (always required — even when Input Data Type is None, used as document name fallback), Output Mode, Zugferd Version, Render Invoice On PDF, Language, Input Format, and Invoice Data Input Type. Conformance Level is shown and required based on the Zugferd Version branch — different field name and option set for 1.0 vs 2.0/2.1/2.2/2.4 vs Custom. The matching invoice data field (Invoice XML/JSON/CSV Data, Binary Property, Base64 Content, or Data URL) is required based on Invoice Data Input Type. Runtime validation enforces non-empty content on the chosen path with errors like "Invoice … data is required" or "Invoice base64 content is required".

Full Parameters view — use with the table below to locate each field in the node.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Input Data Type | Yes | How the background PDF (the visual layer of the hybrid invoice) is supplied. None creates the PDF from invoice data alone. Binary Data reads from a previous n8n node. Base64 String accepts encoded content. URL downloads from a public link. | Binary Data |
| Binary Property Name | Conditional | Name of the binary field from the previous node. Required when Input Data Type is Binary Data. | data |
| Base64 Content | Conditional | Base64-encoded PDF string. Required when Input Data Type is Base64 String. | JVBERi0xLjQK... |
| File URL | Conditional | Public URL to the source PDF. Required when Input Data Type is URL. | https://example.com/invoice.pdf |
| Document Name | Yes | Filename of the source PDF document. Always required in the UI — including when Input Data Type is None (used as document name fallback in the payload). Include the .pdf extension. | invoice.pdf |
| Output Mode | Yes | XML Only generates a pure XML file. XML With PDF generates the full hybrid ZUGFeRD file — a PDF/A-3 document with structured XML embedded inside. XML With PDF is the canonical ZUGFeRD output. | XML With PDF |
| Zugferd Version | Yes | ZUGFeRD specification version. 1.0 is legacy and does not satisfy the German B2B mandate. 2.0 through 2.4 all support EN 16931. 2.2 and 2.4 add the latest XRECHNUNG profile updates. Custom enables advanced version handling. | 2.0 |
| Zugferd Version Custom | Conditional | Custom ZUGFeRD version identifier. Shown and required only when Zugferd Version is Custom (the execute step throws if empty). | 2.3.1 |
| Custom Conformance Rules | Conditional | Rule set used to validate custom versions. Shown and required when Zugferd Version is Custom. Choose legacy (for v1.0-style rules) or v21plus (for v2.1+ rules). | v21plus |
| Conformance Level | Conditional | Profile controlling which invoice fields are required. Shown when Zugferd Version is 1.0 (legacy options). Switches to Conformance Level (Above 2) for versions 2.0/2.1/2.2/2.4 (MINIMUM, BASICWL, BASIC, EN16931, EXTENDED, XRECHNUNG). Two further variants exist for Custom version branches. | EN16931 |
| Language | Yes | Display language for invoice labels in the rendered PDF. Options: German, French, Italian, English, Spanish, Dutch, Polish, Portuguese. The XML data itself remains language-neutral. | German |
| Render Invoice On PDF | Yes | Toggle (ON/OFF). When enabled, PDF4me visually renders the invoice content on the PDF using your invoice data. When disabled, only the structured XML is generated and embedded — useful when you supply a pre-designed background PDF. | true |
| Input Format | Yes | Format of the invoice data you are providing. XML for pre-built ZUGFeRD XML or UBL data. JSON for structured invoice objects. CSV for tabular batch exports. | XML sampleJSON sampleCSV sample |
| Invoice Data Input Type | Yes | How the invoice data reaches the node. Direct Text accepts pasted or mapped data inline. Binary Data reads from a previous file node. Base64 String for encoded payloads. URL downloads from a public link. | Direct Text |
| Invoice XML / JSON / CSV Data | Conditional | The actual invoice content. Appears as Invoice XML Data, Invoice JSON Data, or Invoice CSV Data — matching the chosen Input Format. Required when Invoice Data Input Type is Direct Text. Runtime also throws "Invoice … data is required" if empty. | XML sampleJSON sampleCSV samplePaste, map, or load via Binary / Base64 / URL — match the format you chose above. |
| Invoice Binary Property Name | Conditional | Name of the binary field holding the invoice data file. Required when Invoice Data Input Type is Binary Data. | data |
| Invoice Base64 Content | Conditional | Base64-encoded invoice data. Required when Invoice Data Input Type is Base64 String. Runtime also throws "Invoice base64 content is required" if empty. | PGludm9pY2U+... |
| Invoice Data URL | Conditional | Public URL to the invoice data file. Required when Invoice Data Input Type is URL. | https://example.com/invoice.json |
| Output File Name | No | Filename for the generated ZUGFeRD invoice. Default provided and normalized in execute (e.g. extension matched to Output Mode). Use .pdf for XML With PDF and .xml for XML Only. | zugferd_invoice.pdf |
| Output Binary Field Name | No | Name of the binary field holding the generated ZUGFeRD file. Defaults to data. Used to reference the file in subsequent workflow nodes. | data |
Advanced Options
All fields inside the Advanced Options collection are optional. Add them via Add Option in the node UI.
profilesInput Data Type Options
Controls how the background PDF document (the visual layer of the hybrid invoice) is supplied to the node.

Input Data Type dropdown — controls how the background PDF reaches the node
NoneXML/JSON/CSV only — no background PDFBinary DataFile from previous node — most commondata).Base64 StringBase64-encoded file contentURLDownload from a public linkOutput Mode Options
Controls whether the node produces a pure XML file or the full ZUGFeRD hybrid (PDF/A-3 + embedded XML).

Output Mode dropdown — two options: pure XML or hybrid PDF/A-3 with XML embedded
XML OnlyPure XML — no PDF wrapper.xml.XML With PDFDefault — full ZUGFeRD hybrid fileZUGFeRD Version Options
The ZUGFeRD specification version embedded in the generated invoice.

ZUGFeRD Version dropdown — six version options including legacy 1.0 and the latest 2.4
1.0Legacy — does not satisfy 2025 mandate2.0Default — broad compatibility2.1Minor refinements2.2Updated XRECHNUNG profile2.4Latest — newest XRECHNUNG supportCustomAdvanced version handlingConformance Level Options
The conformance profile controls which invoice fields are required and validated — the most critical choice for compliance.

Conformance Level dropdown — six profiles from MINIMUM to XRECHNUNG, controlling field requirements and compliance scope
MINIMUMHeader only — not a valid invoiceBASICWLBasic Without Lines — VAT onlyBASICMinimum legal invoiceEN16931Default — European StandardEXTENDEDIndustry-specific extrasXRECHNUNGGerman public-sector mandatoryLanguage Options
Display language for invoice labels in the rendered PDF layer. The XML data itself is language-neutral.

Language — localized labels for the rendered PDF (German is typical for DE B2B and B2G).
German— Default, German B2B/B2GEnglish— International invoicingFrench— Factur-X workflowsItalian— Italian B2BSpanish— Spanish B2BDutch— Netherlands/BelgiumPolish— Poland B2BPortuguese— Portugal/BrazilInput Format Options
Format of the invoice data you supply to the node.

Input Format — choose XML, JSON, or CSV to match your invoice payload.
XMLPre-built XML invoiceJSONDefault — modern API sourceCSVTabular batch invoice dataInvoice Data Input Type Options
Controls how the invoice data (the XML, JSON, or CSV content) reaches the node.

Invoice Data Input Type — how the XML, JSON, or CSV payload is supplied (inline, binary from a prior node, base64, or URL).
Direct TextDefault — paste or map inlineBinary DataFile from previous nodeBase64 StringBase64-encoded dataURLDownload from a public linkOutput Fields
| Field | Type | What it contains |
|---|---|---|
fileName | String | Filename of the generated ZUGFeRD invoice, for example zugferd_invoice.pdf for XML With PDF output or zugferd_invoice.xml for XML Only output. |
mimeType | String | MIME type of the output file — application/pdf for hybrid output, application/xml for XML Only. Useful for content type validation in downstream HTTP or storage nodes. |
fileSize | Number | Size of the generated ZUGFeRD file in bytes. Useful for storage planning, bandwidth monitoring, and conditional routing in the workflow. |
success | Boolean | True when the ZUGFeRD invoice was generated successfully. False if validation failed or input data was malformed. Use this field to route error handling branches. |
message | String | Human-readable status message confirming success or describing the validation/parsing error encountered. Useful for logging and error notification steps. |
Quick Setup
- Add PDF4me to your n8n workflow. Set Resource to Invoice and Invoice Operations to Create Zugferd Invoice.
- In Credential to connect with, select your PDF4me credential or click Create New Credential and paste your API key.
- Set Input Data Type — connect a previous node (Binary Data), provide a Base64 string or URL for the background PDF, or select None when PDF4me should render the PDF from invoice data alone.
- Enter Document Name (for example
invoice.pdf). - Set Output Mode — XML With PDF for the standard hybrid ZUGFeRD output, or XML Only for pure XML.
- Choose Zugferd Version (use 2.0 as the safe default; 2.4 for the latest XRECHNUNG profile).
- Choose Conformance Level — EN16931 for general B2B, XRECHNUNG for German public-sector invoicing, EXTENDED for industry-specific fields.
- Set Language for the rendered PDF labels (German by default).
- Enable Render Invoice On PDF if you want PDF4me to render invoice content visually; disable when supplying a pre-designed background PDF.
- Choose Input Format (JSON, XML, or CSV) and Invoice Data Input Type (Direct Text, Binary Data, Base64 String, or URL). Paste or map the invoice data into the Invoice Data field.
- Set Output File Name to
zugferd_invoice.pdfand Output Binary Field Name todata. - Connect the output to your next node — email sender, cloud storage upload, government portal HTTP POST — and execute the workflow.
Workflow Examples
Workflow ExamplesCommon n8n workflow patterns using Create Zugferd Invoice.
- A Webhook Trigger fires when an invoice is finalized in the accounting platform (DATEV, sevDesk, lexoffice).
- The webhook payload contains invoice data as a structured JSON object.
- PDF4me Create Zugferd Invoice generates the hybrid invoice. Input Data Type is None (PDF4me renders the PDF from the JSON). Output Mode is XML With PDF, Zugferd Version is 2.0, Conformance Level is EN16931, Language is German, Input Format is JSON, Invoice Data Input Type is Direct Text mapped from the webhook payload.
- A Gmail node emails the ZUGFeRD PDF to the customer's accounts-payable address, satisfying the German B2B receive-mandate requirement.
- A PostgreSQL node logs the invoice number, ZUGFeRD version, and conformance level for audit and compliance reporting.
- A Schedule Trigger fires every weekday at 16:00 to process public-sector invoices.
- An SFTP node pulls newly generated ERP XML invoice files from the export folder.
- PDF4me Create Zugferd Invoice generates a compliant XRECHNUNG invoice. Input Data Type is None, Output Mode is XML With PDF, Zugferd Version is 2.4 (latest XRECHNUNG profile), Conformance Level is XRECHNUNG, Language is German, Input Format is XML, Invoice Data Input Type is Binary Data mapped from the SFTP file content.
- An HTTP Request node uploads the XRECHNUNG invoice to the federal ZRE (Zentrale Rechnungseingangsplattform des Bundes) or the relevant state portal.
- A Microsoft Outlook node sends a confirmation to the procurement team and a PostgreSQL node logs the submission reference.
- A Schedule Trigger fires on the 1st of every month to process the monthly billing run.
- A Google Drive node downloads the consolidated CSV billing export — one row per customer invoice.
- A Split In Batches node iterates over each CSV row. PDF4me Create Zugferd Invoice generates one ZUGFeRD invoice per customer. Input Data Type is None, Output Mode is XML With PDF, Zugferd Version is 2.0, Conformance Level is EN16931, Language varies per customer locale, Input Format is CSV, Invoice Data Input Type is Direct Text with the per-row CSV content.
- A Microsoft SharePoint node uploads each ZUGFeRD PDF to the customer's billing archive folder.
- A Gmail node sends each customer their hybrid invoice; a final PostgreSQL summary row records the batch run with invoice count and total amount.