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 | Required | Combined dropdown that picks both the ZUGFeRD specification version (1.0, 2.0, etc.) and the shape of your invoice data (XML, JSON, CSV) in a single setting. The value drives which Invoice Data field appears below and which Conformance Level set is offered. | 2.0-XML |
| Output Mode | Required | XmlWithPdf returns the canonical hybrid PDF/A-3 file with the XML embedded inside. XmlOnly returns the XML invoice file alone. PDF File Content and File Name are only required for XmlWithPdf. | XmlWithPdf |
| Invoice XML Data | Conditional | Required when the Input Format part of the combined dropdown is XML. Map your ZUGFeRD XML payload from a previous action (Get file content, Compose, etc.). | File Content |
| Invoice JSON Data | Conditional | Required when the Input Format part is JSON. Map a structured invoice JSON object that PDF4me converts to the ZUGFeRD XML schema before embedding. | File Content |
| Invoice CSV Data | Conditional | Required when the Input Format part is CSV. Map a tabular CSV row that PDF4me converts to the ZUGFeRD XML schema before embedding. | File Content |
| Conformance Level | Required | Profile that controls how rich the invoice data must be. BASIC is the entry-level profile with line items, suitable for most B2B receivers. COMFORT adds additional fields for richer content. EXTENDED is the largest set, used for industry-specific scenarios beyond the EN 16931 baseline. | BASIC |
| Render Invoice on PDF | Required | When set to Yes (default), PDF4me visually renders the invoice content on the PDF pages using your invoice data. Set to No when you supply a pre-designed background PDF and only need the XML embedded without redrawing the content. | Yes |
| PDF File Content | Conditional | Required when Output Mode is XmlWithPdf. Map the background PDF bytes from a previous action (Get file content from SharePoint / OneDrive / Outlook / Dataverse). Skip for XmlOnly. | File Content |
| File Name | Conditional | Required when Output Mode is XmlWithPdf. The source PDF filename with extension. Used for trace and naming context. | abc.pdf |
| Output File Name | Optional | Filename of the generated hybrid file or XML. Use .pdf for XmlWithPdf and .xml for XmlOnly. Helps when the downstream Create file action expects an explicit name. | Zugferd-output.pdf |
| Language | Optional | Advanced parameter. Locale used for invoice labels in the rendered PDF. Default de. Accepted codes: de, en, fr, it, es, nl, pl, pt, cs. The XML data itself stays language-neutral. | de |
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 | Binary | The generated PDF/A-3 hybrid file (XmlWithPdf) or the standalone XML invoice (XmlOnly). |
| FileName (header) | String | Suggested output filename returned in the response headers. |
| PageCount (header) | String | Page count of the generated PDF, returned when Output Mode is XmlWithPdf. |
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