Skip to main content

How Do You Create a ZUGFeRD Invoice in Power Automate? A Dropbox + JSON Step-by-Step Workflow.

· 15 min read
SEO and Content Writer

This guide shows a full Power Automate workflow that reads a base PDF and invoice JSON from Dropbox, generates a ZUGFeRD/Factur-X invoice using PDF4me Create ZUGFeRD Invoice, and writes the final file back to Dropbox.

The screenshot sequence uses these sample paths:

  • Base PDF: /blog data/zugferd invoice/simplepdf.pdf
  • JSON: /blog data/zugferd invoice/sample-invoice.json
  • Output folder: /blog data/zugferd invoice/output
The short version

1. Manually trigger flow → 2. Get Base PDF File (Dropbox) → 3. Get JSON File (Dropbox) → 4. Create ZUGFeRD Invoice (PDF4me, Input Format = JSON, Output Mode = Pdf With Xml) → 5. Create file (Dropbox output folder).

Remember this when you configure step 4

Set Input Format = JSON, then map only Invoice JSON Data. Keep Invoice XML Data and Invoice CSV Data empty in this run. For Pdf With Xml, PDF File Content is required and must come from the base PDF step.

What you are building

You produce a hybrid invoice PDF from a template PDF and structured JSON data. The output is suitable for teams that need readable PDF output with machine-readable invoice data packaged via ZUGFeRD/Factur-X conventions.


At a glance: all five steps

1Trigger
2Get PDF
3Get JSON
4Create ZUGFeRD
5Save output

Why this workflow layout works

Separated inputs

PDF and JSON are fetched independently, so you can update payload files without touching the visual PDF template flow.

Single generation step

Create ZUGFeRD Invoice receives both content sources in one place and returns a file output directly usable by Dropbox Create file.

Easy to branch later

After generation, you can add validation, notifications, ERP/API delivery, or archive routing without restructuring the core flow.


Before you start

Checklist

Input files used in this walkthrough

Base PDF document preview used as PDF input for Create ZUGFeRD Invoice action

Base PDF input file.

Invoice JSON payload content showing invoice fields mapped to ZUGFeRD generation

Invoice JSON payload input.


The flow at a glance (five steps)

  1. Manually trigger a flow — Run on demand while configuring.
  2. Get Base PDF File (Dropbox) — Reads the template PDF bytes.
  3. Get JSON File (Dropbox) — Reads invoice JSON bytes/content.
  4. Create ZUGFeRD Invoice (PDF4me) — Combines inputs using JSON mode.
  5. Create file (Dropbox) — Stores generated output in target folder.

Flow overview

Power Automate flow: Manually trigger a flow, Get Base PDF File, Get JSON File, Create ZUGFeRD Invoice, Create file

Complete flow chain used for this ZUGFeRD generation pattern.


Step 1: Get Base PDF File (Dropbox)

Flow so far: Trigger → Get Base PDF File.

  1. Add Dropbox action to fetch file content by path.
  2. Set File Path to the base template PDF (example: /blog data/zugferd invoice/simplepdf.pdf).
  3. In advanced options, keep Infer Content Type = Yes.
  4. Save and test this step; ensure it returns file content/binary output.
Dropbox Get Base PDF File action showing file path blog data zugferd invoice simplepdf.pdf and Infer Content Type Yes

Step 1 screenshot: base PDF path and content inference configured.


Step 2: Get JSON File (Dropbox)

Flow so far: Trigger → Get Base PDF → Get JSON File.

  1. Add another Dropbox file-content action.
  2. Set File Path to your invoice data JSON (example: /blog data/zugferd invoice/sample-invoice.json).
  3. Keep Infer Content Type = Yes.
  4. Save and test; confirm JSON content is available for mapping in step 3.
Dropbox Get JSON File action showing file path blog data zugferd invoice sample-invoice.json and Infer Content Type Yes

Step 2 screenshot: JSON source file from Dropbox.


Step 3: Create ZUGFeRD Invoice (PDF4me)

Flow so far: Trigger → Get Base PDF → Get JSON → Create ZUGFeRD.

Configure PDF4me – Create ZUGFeRD Invoice as shown:

  1. File Name — source PDF name (example: Test.pdf).
  2. PDF File Content — map from Get Base PDF File.
  3. Output File Name — desired output file name (example: Zugferd Invoice.pdf).
  4. Input Format — set to JSON.
  5. Output Mode — set to Pdf With Xml.
  6. Invoice JSON Data — map from Get JSON File.
  7. Conformance Level — example: BASIC.
  8. ZUGFeRD Version — example: 1.0 (or your required version).
  9. Render Invoice on PDF — example: Yes.
Create ZUGFeRD Invoice action showing File Name, PDF File Content, Output File Name, Input Format JSON, Output Mode Pdf With Xml, Invoice JSON Data, Conformance BASIC, ZUGFeRD Version 1.0, Render Invoice on PDF Yes

Step 3 screenshot: full parameter mapping for JSON-based ZUGFeRD generation.


Step 4: Create file (Dropbox)

Flow so far: Trigger → Read PDF + JSON → Generate ZUGFeRD → Save file.

  1. Add Dropbox – Create file.
  2. Folder Path — output target folder (example: /blog data/zugferd invoice/output).
  3. File Name — map output filename from Create ZUGFeRD Invoice.
  4. File Content — map generated file content from Create ZUGFeRD Invoice.
  5. Save and run the full flow.
Dropbox Create file action with folder path blog data zugferd invoice output and mapped file name and file content from Create ZUGFeRD Invoice

Step 4 screenshot: output file write-back to Dropbox.


Output verification

Open output examples
Generated ZUGFeRD invoice PDF visual output after Create ZUGFeRD Invoice action

Generated invoice PDF output.

Output opened with attachment panel showing embedded XML data in generated ZUGFeRD invoice PDF

Attachment view showing embedded structured invoice data.


Quick reference

#StepKey mapping
1Get Base PDF FileFile path to template PDF + Infer Content Type = Yes
2Get JSON FileFile path to invoice JSON + Infer Content Type = Yes
3Create ZUGFeRD InvoicePDF File Content from step 1, Input Format = JSON, Invoice JSON Data from step 2
4Create fileFile Name and File Content from Create ZUGFeRD Invoice output

Deep parameter references: Create ZUGFeRD Invoice, Validate PDFA.


Troubleshooting

Generation fails because of input mapping

If Input Format = JSON, map only Invoice JSON Data. Clear XML/CSV fields for this run.

Output mode mismatch

With Pdf With Xml, missing PDF File Content causes errors. Map file bytes from the base PDF step.

401, 402, or connection issues

See PDF4me Troubleshooting for API key, credits, and connector authorization checks.


What to try next

Optional hardening: add a Condition after step 3 to check output presence, then branch to success/failure notifications before final file write.