Generate ZUGFeRD/Factur-X e-invoices from webhook orders with PolyDoc and email
UnknownWhat this workflow does
This workflow has 7 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Polydoc (community).
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Valid order? (If): checks a condition and branches into true / false
- Build e-invoice (Code): runs custom JavaScript code
- Reject (422) (Respond to Webhook): sends the response back to the webhook caller
- Generate ZUGFeRD PDF (Poly Doc): einvoice
- Email invoice to buyer (Send Email): sends an email over SMTP
- Return PDF (Respond to Webhook): sends the response back to the webhook caller
Services it uses
Before you upgrade to n8n 3.0
We can't fully verify this one: it relies on 1 community package, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
- Check that n8n-nodes-polydoc is verified or supports 3.0 (used in Generate ZUGFeRD PDF).
Nodes used (6)
- Webhook
n8n-nodes-base.webhook - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - Poly Doc
n8n-nodes-polydoc.polyDoc - Send Email
n8n-nodes-base.emailSend - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick Overview This workflow receives an order via webhook, builds an EN 16931 invoice payload and HTML, generates a ZUGFeRD/Factur-X (PDF/A-3 + embedded XML) e-invoice using PolyDoc, emails the PDF to the buyer, and returns the PDF in the webhook response.…