🧾 Generate ZUGFeRD e-invoice PDFs with webhook and Fly.io API
⚡ 1 views · 🧾 Invoice Processing
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/generatewith anX-API-Keyheader. - 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.pdfwithContent-Type: application/pdf.
Setup
- Deploy/verify access to the ZUGFeRD generation API at
https://e-rechnung-api.fly.dev/v1/invoice/generateand obtain an API key. - Set the
ZUGFERD_API_KEYenvironment variable in n8n (or replace theX-API-Keyheader 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.
🔗 Nodes Used
Send Email, HTTP Request, Webhook, Stripe Trigger
📥 Import
Download workflow.json and import into n8n:
Workflow menu → Import from File