Create ZUGFeRD Invoice in Power Automate
Create ZUGFeRD Invoice is a Power Automate action by PDF4me that generates a ZUGFeRD-compliant hybrid e-invoice, a single PDF/A-3 file with structured XML embedded inside. Use it to satisfy Germany's B2B e-invoicing mandate, exchange EN 16931-aligned invoices with any ERP, or archive one file that both humans and machines can read.
What this action does
PDF4me Create ZUGFeRD Invoice builds a ZUGFeRD-compliant hybrid e-invoice, a single PDF/A-3 archival PDF with structured invoice XML embedded inside, directly in a Power Automate flow. Humans read the PDF; ERPs and clearing platforms parse the XML. The action satisfies Germany's B2B e-invoicing mandate (effective 1 January 2025 for receipt, full sending by 2028) and the underlying EN 16931 European Standard. Map invoice data as XML, JSON, or CSV from SharePoint, OneDrive, Outlook, or Dataverse, and route the hybrid output to your archive, your ERP, or your customer in one step.
How Do I Authenticate My Power Automate Flow?
To call PDF4me through Power Automate, the flow needs a valid PDF4me API key on the PDF4me Connect connector. Authentication ensures secure communication and validates your identity as an authorized user. Get or rotate your key from the developer dashboard.
Important Facts You Should Not Miss
XmlWithPdf output is one file: an archival PDF/A-3 with the structured ZUGFeRD XML attached inside it. Humans open the PDF; AP systems parse the XML. Set XmlOnly only when the receiving system consumes pure XML.Invoice XML Data, Invoice JSON Data, or Invoice CSV Data based on the format part of the combined dropdown. Map only the one that matches. Populating two data fields in the same run is the most common cause of validation failures.
Main Parameters tab. ZUGFeRD version and Input Format is a combined dropdown (here 2.0-XML).

Advanced parameters. Language defaults to de; also accepts en, fr, it, es, nl, pl, pt, cs.
ZUGFeRD vs Factur-X vs XRechnung: pick the right profile
| Format | Where it is used | Output type | Pick when |
|---|---|---|---|
| ZUGFeRD | Germany, EU B2B, supplier-to-buyer invoicing | Hybrid PDF/A-3 + embedded XML | General B2B; you want one file for humans and machines. |
| Factur-X | France (sister format, technically identical to ZUGFeRD 2.x) | Hybrid PDF/A-3 + embedded XML | Cross-border FR<>DE invoicing; the same hybrid file works on both sides. |
| XRechnung | German public sector (federal, state, municipal) | Strict pure XML profile | You invoice a German public-sector authority; switch to an XRechnung-aligned profile when the receiver demands pure XML. |
Parameters
Required in the action: ZUGFeRD version and Input Format, Output Mode, the matching Invoice XML / JSON / CSV Data field, and Conformance Level. PDF File Content and File Name become required only when Output Mode is XmlWithPdf. Output File Name sets the filename of the generated hybrid file. Render Invoice on PDF defaults to true. Language lives under Advanced parameters and defaults to de.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| ZUGFeRD version and Input Format | Optional | ZUGFeRD version and the format of the invoice data you supply (XML, JSON or CSV). After you choose it, the fields for that combination are loaded into the action card. Options: 1.0-XML, 1.0-JSON, 1.0-CSV, 2.0-XML, 2.0-JSON, 2.0-CSV. Defaults to `2.0-XML`. | 2.0-XML |
| Output Mode | Optional | XmlWithPdf returns a PDF with embedded ZUGFeRD XML. XmlOnly returns only the XML invoice file. Options: XmlOnly, XmlWithPdf, CSV. Defaults to `XmlWithPdf`. | XmlWithPdf |
| Invoice Xml Data | Conditional | Invoice data as an XML file. Map it from the file content returned by a previous action. Shown when ZUGFeRD version and Input Format is 1.0-XML or ZUGFeRD version and Input Format is 2.0-XML. | @{body('Get_file_content')?['$content']} |
| Conformance Level | Optional | ZUGFeRD conformance level. Options: BASIC, COMFORT, EXTENDED. Defaults to `BASIC`. | BASIC |
| Render Invoice on PDF | Optional | Render invoice data visually on PDF pages. Applies only when outputMode is XmlWithPdf. Defaults to `Yes`. | Yes |
| Language | Optional | Language code for invoice localisation (e.g. de, en, fr, it, es, nl, pl, pt, cs). | your value |
| File Content | Optional | Content of the PDF to embed the invoice data into. Map it from the file content returned by a previous action, such as SharePoint or OneDrive Get file content. | @{body('Get_file_content')?['$content']} |
| File Name | Optional | Name of the PDF to embed the invoice data into, including its extension (for example `invoice.pdf`). Map it from the file name returned by a previous action. | invoice.pdf |
| Invoice Json Data | Conditional | Invoice data as a JSON file. Map it from the file content returned by a previous action. Shown when ZUGFeRD version and Input Format is 1.0-JSON or ZUGFeRD version and Input Format is 2.0-JSON. | @{body('Get_file_content')?['$content']} |
| Invoice Csv Data | Conditional | Invoice data as a CSV file. Map it from the file content returned by a previous action. Shown when ZUGFeRD version and Input Format is 1.0-CSV or ZUGFeRD version and Input Format is 2.0-CSV. | @{body('Get_file_content')?['$content']} |
Output Mode options
XmlWithPdfDefault. canonical ZUGFeRD hybrid fileXmlOnlyStandalone XML invoiceConformance Level ladder
BASICDefault. broadest receiver compatibilityCOMFORTRicher invoice contentEXTENDEDLargest set, industry-specificLanguage options (Advanced)
The Advanced parameters section exposes one field, Language. It controls only the locale used for labels drawn on the visual PDF; the XML data stays language-neutral. Default is de.
| Code | Language | Typical use |
|---|---|---|
de | German | Default. German domestic invoicing. |
en | English | Cross-border B2B in English-speaking markets. |
fr | French | France or French-speaking Switzerland (also pairs with Factur-X workflows). |
it | Italian | Italy or Italian-speaking Switzerland. |
es | Spanish | Spain and Spanish-speaking partners. |
nl | Dutch | Netherlands and Flemish Belgium. |
pl | Polish | Poland. |
pt | Portuguese | Portugal and Portuguese-speaking partners. |
cs | Czech | Czechia. |
Sample Invoice Files
Use these to test the flow with each input format before connecting your live data source. For German B2B production workflows aligned with the 2025 mandate, start with the JSON 2.0 EN16931 sample.
ZUGFeRD-invoice-sample.xmlZUGFeRD-invoice-sample-2.0.xmlsample-invoice-zugferd-2.0-en16931.jsonsample-invoice.jsontest-invoice.csvzugferd-invoice-2.0.csvInput and Output Decision Matrix
| If you select | Then map | You get |
|---|---|---|
| ZUGFeRD version and Input Format = 2.0-XML | Invoice XML Data | ZUGFeRD 2.0 hybrid output (or XML-only) from your existing XML payload |
| ZUGFeRD version and Input Format = 2.0-JSON | Invoice JSON Data | ZUGFeRD 2.0 hybrid from a structured JSON object converted to the schema |
| ZUGFeRD version and Input Format = 2.0-CSV | Invoice CSV Data | ZUGFeRD 2.0 hybrid from a flat CSV row converted to the schema |
| Output Mode = XmlWithPdf | PDF File Content + File Name (background PDF) | PDF/A-3 hybrid file with embedded XML |
| Output Mode = XmlOnly | Invoice data only (no PDF bytes needed) | Standalone ZUGFeRD XML invoice |
How Do I Set Up Create ZUGFeRD Invoice in Power Automate?
- Add Create ZUGFeRD Invoice to your flow as a new step.
- Sign in to PDF4me Connect with your API key.
- Pick ZUGFeRD version and Input Format (for example 2.0-XML, 2.0-JSON, or 2.0-CSV).
- Set Output Mode to XmlWithPdf for the hybrid file or XmlOnly for pure XML.
- Map only the matching invoice data field (XML, JSON, or CSV) from a previous action.
- Set Conformance Level (BASIC for compatibility tests, COMFORT or EXTENDED when your receiver confirms support).
- Leave Render Invoice on PDF as Yes unless you supply a pre-designed background PDF.
- For XmlWithPdf, map PDF File Content and File Name from a previous action (Get file content).
- Set Output File Name (
Zugferd-output.pdforZugferd-output.xml). - Under Advanced parameters, set Language if you need labels in a non-German locale.
- Route the File Content output into SharePoint Create file, OneDrive Create file, Outlook Send an email, or a Dataverse record. Optionally chain Validate PDF/A before archive.
Output
The action returns the generated file content plus metadata your flow can pass downstream.
| Field | Type | Description |
|---|---|---|
| File Content | File content | Content of the result: a PDF with the embedded ZUGFeRD XML, or the XML invoice file, depending on the output mode. Map it into the next action, for example the File Content field of SharePoint or OneDrive Create file. |
| File Name | Text | File name of the result, as returned by PDF4me. Use it as the file name when saving the file. |
| Page Count | Text | Page count reported by PDF4me for the processed document. Returned as text; wrap it in int() to use it as a number. |
Troubleshooting
If the Input Format part of the combined dropdown is CSV, map only Invoice CSV Data. Do not populate XML / JSON fields in the same run. Pick a single format per call.
PDF File Content must come from a step that returns complete file bytes (Get file content from SharePoint / OneDrive / Outlook attachment), not metadata-only references such as an item GET that lacks the file payload.
Start with BASIC for compatibility tests, then move up only after the receiving system confirms support. EXTENDED in particular can fail validation on receivers tuned for the EN 16931 baseline.
ZUGFeRD 1.0 does not satisfy the 2025 German B2B mandate. Pick the 2.0 family (or higher) in the ZUGFeRD version and Input Format dropdown for any mandate-sensitive workflow.
Workflow Examples
Workflow ExamplesOpen by default. Four common ZUGFeRD automation patterns in a 2x2 grid.
- Trigger when an invoice row is marked Approved in Dataverse (or ERP).
- Compose the invoice JSON from row columns and child line-item table.
- Get the layout PDF from a SharePoint document library template.
- Run Create ZUGFeRD Invoice with
2.0-JSON,XmlWithPdf,EN 16931-aligned conformance. - Save the returned File Content to the records library; chain Validate PDF/A before retention.
Impact: One file for humans and machines, strong fit for audit and long-term storage.
- Trigger on a new file landing in a SharePoint staging folder.
- Read the CSV file content for invoice lines.
- Pick
2.0-CSVin the combined dropdown; mapInvoice CSV Data. - Set
XmlWithPdf, route the result to an approved invoices library.
Impact: Repeatable batch generation without manual desktop tools.
- Upstream system produces invoice JSON.
- Run the action with
XmlOnly; skip PDF File Content. - POST the returned XML to SAP, an EDI broker, or an e-invoicing clearing house.
- Log correlation IDs for support traceability.
Impact: Clean handoff when the PDF shell is generated elsewhere.
- Finalise the invoice in your billing system.
- Generate the ZUGFeRD hybrid file (
XmlWithPdf). - Outlook Send an email with the PDF/A-3 attached to the customer.
- SharePoint Create file in the records library with metadata columns (invoice number, amount, due date).
Impact: Customer self-service and fewer "wrong format" support tickets.
Industry Use Cases & Applications
Industry Use Cases & ApplicationsExpand to see manufacturing, finance, public sector, and SaaS scenarios.
- Supplier invoices. hybrid PDF/A-3 + XML for buyers with strict AP rules
- Order-to-cash. automate invoice packages from ERP events
- Audit trail. one artifact per shipment or milestone
- Accounts receivable. compliant outbound e-invoices that satisfy the 2025 mandate
- Month-end. batch hybrid output from consolidated invoice data
- Archival. pair with PDF/A validation before records retention
- Structured exchange. XmlOnly for mandated clearing channels
- Transparency. embedded XML supports automated verification
- Retention. align with internal records policies
- Billing exports. generate ZUGFeRD from JSON / CSV you already emit
- Multi-tenant. separate invoice JSON / XML / CSV or templates per customer in your flow
- Customer success. fewer manual "send invoice again" loops