Create and email XRechnung e-invoices using forms, data tables and SMTP
Ready for 3.0What this workflow does
This workflow has 30 nodes and runs when someone submits an n8n form (“Create an e-invoice”) (plus 2 other triggers). It uses only n8n's built-in nodes.
How it runs
Trigger: When someone submits an n8n form (“Create an e-invoice”) (plus 2 other triggers).
- Invoice settings (Edit Fields (Set)): sets 20 fields: sellerName, sellerStreet, sellerPostcode…
- Sample invoice (Edit Fields (Set)): sets 5 fields: testRun, customerNumber, serviceDate…
- Create xr_customers table (Data table): create (table)
- Create xr_invoices table (Data table): create (table)
- Continue with the invoices (Code): runs custom JavaScript code
- Loop over invoices (Loop Over Items (Split in Batches)): loops over the items in batches
- Results for the calling workflow (Edit Fields (Set)): sets 6 fields: customerNumber, orderId, invoiceNumber…
- Find the customer (Data table): get (row)
- Check invoice data (Code): runs custom JavaScript code
- Invoice data complete? (If): checks a condition and branches into true / false
…plus 17 more steps. See the full node list below.
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (10)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Data table
n8n-nodes-base.dataTable - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Crypto
n8n-nodes-base.crypto - Send Email
n8n-nodes-base.emailSend
From the author
Quick overview This workflow creates German XRechnung 3.0 (UBL) e-invoices inside n8n, without a paid API, from an n8n Form or a calling workflow. It checks customer and line data in n8n Data Tables, e-mails the XML via SMTP and keeps a register of invoice…