Generate ZUGFeRD e-invoice PDFs with webhook and Fly.io API

Go to Workflow
0 views
Built by André Grunert André Grunert
Created on October 10, 2026

Description

Quick overview
This workflow receives invoice data via a webhook, sends it to a Fly.io-hosted ZUGFeRD/XRechnung generation API, and returns a generated PDF/A-3 invoice (with embedded ZUGFeRD XML) directly in the webhook response.

How it works
Receives a POST request with invoice JSON data via a webhook endpoint.
Sends the received JSON to the Fly.io API endpoint https://e-rechnung-api.fly.dev/v1/invoice/generate with an X-API-Key header.
Receives the generated invoice PDF as a binary file from the API.
Returns the PDF in the webhook response as a downloadable file named e-rechnung.pdf with Content-Type: application/pdf.

Setup
Deploy/verify access to the ZUGFeRD generation API at https://e-rechnung-api.fly.dev/v1/invoice/generate and obtain an API key.
Set the ZUGFERD_API_KEY environment variable in n8n (or replace the X-API-Key header value) so the HTTP request authenticates against the API.
Activate the workflow and copy the webhook URL, then configure your source system to POST the invoice JSON to /generate-zugferd-invoice.

This workflow was created by André Grunert and shared publicly on the n8n community template library. n8nFind indexes it for discovery — the workflow remains the property of its original creator.

Nodes Used (3)

Code
n8n-nodes-base.code
HTTP Request
n8n-nodes-base.httpRequest
Send Email
n8n-nodes-base.emailSend