ZUGFeRD / Factur-X + pdfRest + n8n
Turn invoice files into a reviewed e-invoice package
Configure e-invoice processing with little or no code. Use pdfRest in n8n to create or validate a hybrid invoice, collect human approval, and download the PDF with its review record.
Requires n8n, the pdfRest API Toolkit node, and paid pdfRest access with e-invoicing operations and unredacted results. Redacted content-match details block approval.
What is n8n?
n8n is a low-code automation platform for connecting applications and services. This template brings pdfRest invoice processing and human review into one configurable workflow.
From source invoice to documented decision
- 01
Upload your invoice
Choose XML-only creation, PDF and XML pairing, or validation of a completed hybrid PDF. The form checks the file combination before processing.
- 02
Create and validate
pdfRest creates the hybrid invoice when needed. A separate validation step checks the finished PDF, embedded XML, and package conformance.
- 03
Review the result
Compare the PDF with your source invoice. Approve it or hold it for correction. Uncertain visual matches remain visible to the reviewer.
- 04
Download the record
Receive a ZIP labelled APPROVED, HELD, or BLOCKED, with the invoice and a report that records validation and human review separately.
Three ways to process an invoice
Create from XML
Upload CII XML from your invoicing system. pdfRest generates the visual invoice and embeds the structured data in a PDF/A-3 package.
Pair PDF and XML
Supply an existing visual invoice and its XML. Preserve the PDF when comparison succeeds, or explicitly allow replacement from XML when a regenerated invoice is acceptable.
Validate a hybrid PDF
Upload a completed ZUGFeRD or Factur-X invoice to inspect its embedded data and package without changing the uploaded file.
A hybrid invoice keeps a readable PDF and structured invoice XML together. The pdfRest e-invoicing tools support ZUGFeRD 2.5.2 and Factur-X 1.09.2 with MINIMUM, BASIC WL, BASIC, and EN16931 profiles. EXTENDED and XRECHNUNG profiles are not supported.
Import and connect your workflow
Import the connected workflow
Download the JSON, create a workflow in n8n, and choose Import from File in the editor menu. Install @pdfrest/n8n-nodes-pdfrest and confirm that both e-invoice creation and validation operations are available.
Connect pdfRest
Select the same working pdfRest credential in all four pdfRest nodes. The download contains no credentials. No OpenAI, Google Drive, or database account is required.
Prepare source files
Use UTF-8 CII CrossIndustryInvoice XML with authoritative invoice values, without DTD or entity declarations. The template does not convert UBL or invent missing tax and payment data. Upload one invoice per run, with each file no larger than 20 MB.
Set review expectations
Give reviewers access to the source invoice. Check seller, buyer, dates, currency, line items, tax, totals, and payment details before recording approval.
Node compatibility and credential connection points
Version 0.2.0 of @pdfrest/n8n-nodes-pdfrest includes Create ZUGFeRD / Factur-X PDF Invoice and Validate ZUGFeRD / Factur-X PDF Invoice. When using a newer version, confirm both operations remain available.
Select the same pdfRest credential in Generate invoice from XML, Pair XML and visual PDF, Validate generated invoice, and Validate uploaded invoice.
Cloud Starter and Container Trial apply evaluation watermarks or text redactions. This workflow blocks approval when content-match details are redacted. Choose access that includes the required operations and unredacted results; see pdfRest plans.
Validation, human approval, and the audit ZIP
VALID means the API’s package checks passed. CONFIRMED means visual matching was established; UNVERIFIED means the comparison could not confirm every relevant value. An unverified match needs careful human comparison before approval.
The template blocks release for invalid results, blocking findings, comparison errors, or redacted matching details. A reviewer can also hold an otherwise valid invoice. Approval records a decision; it never rewrites the validator’s result.
The audit ZIP includes the final PDF, source XML and original PDF when supplied, a JSON validation-and-review report, and a readable summary. Held and blocked PDFs carry a NOT_RELEASED_ filename prefix. API processing failures show a step-specific explanation and mark the execution failed.
Test and review before publishing
Start with a sample invoice and check every path you intend to use.
- Open Submit invoice, select its Test URL, and choose Execute Workflow to run the complete flow. Execute Step runs only the trigger.
- Complete upload, review, and download in the same form session.
- After testing, restrict form access, save and publish the workflow, and share its Production URL. See n8n’s Form Trigger instructions.
Recommended test checklist
- Create an invoice from supported CII XML, inspect it, and approve it.
- Repeat and choose Hold; confirm the result is not labelled approved.
- Pair a known-good PDF and XML with preservation selected.
- Test deliberate differences and separately test regeneration with explicit permission.
- Validate both a completed hybrid invoice and an ordinary PDF without embedded XML.
- Submit missing files and invalid totals to check correction and failure handling.
- Confirm the review PDF is accessible without workflow-editor access.
- Pair PDF and XML using invoice reference
source-invoice, then approve. Verify the ZIP contains bothinvoice_source-invoice.pdfandsource-invoice.pdf, with the correct distinct contents. Held or blocked results must useNOT_RELEASED_invoice_source-invoice.pdffor the finished invoice. - Use an
UNVERIFIEDcomparison result and confirm human comparison is required before approval. - Test redacted or unexpected validation responses and confirm they cannot produce an approved result.
- Test expired or inaccessible review links and confirm reviewers can recognize the problem and restart safely.
- Test pdfRest authentication and processing failures. Confirm the failed step is identified and no approved result is reported.
Know what to review
Will it preserve my existing invoice design?
Preservation depends on the API accepting the PDF/XML comparison. PDF labels and layout can affect field recognition. Investigate unexpected mismatch findings before changing invoice data. Choose Allow replacement only when a newly rendered PDF is acceptable.
Does it send invoices or submit them to a tax authority?
No. This template creates or validates invoices, records review, and returns a ZIP. Delivery, tax-platform submission, payment collection, and duplicate tracking require separate integrations.
Is the reviewer identity authenticated?
The reviewer name is self-entered. Protect the form through your deployment’s access controls and add identity verification if your approval process requires it.
Where do the files and results remain?
Files are processed by the selected pdfRest endpoint and pass through n8n. Configure execution-data retention and access controls for your deployment. Temporary review links can expire.
Put e-invoice review into your workflow
Import the template, connect pdfRest, and configure an invoice process your team can review.
