Moloni Draft Invoice-Receipt Automation in n8n with NIF Validation
Moloni Draft Invoice-Receipt Automation in n8n with NIF Validation
Regular price
£16.99
Regular price
£16.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Moloni Draft Invoice-Receipt Automation in n8n with NIF Validation
Regular price
£16.99
Regular price
£16.99
Sale price
Unit price
/
per
Generate a Moloni Draft Invoice-Receipt in n8n—complete with Portuguese NIF validation
This n8n workflow takes sample payment data, validates Portuguese NIF/VAT configuration, then uses the Moloni API to create a draft fatura-recibo (invoice-receipt) with the correct customer, tax rates, and payment lines.
What this workflow does
- Runs manually (Manual Trigger) using the included sample payment payload.
- Normalizes and validates input: checks required configuration values, validates payment totals and the VAT rate, and performs Portuguese NIF check-digit validation.
- Validates Moloni tax configuration: requests an access token from the Moloni API, fetches the company’s VAT taxes, and confirms that each configured Moloni tax ID matches the expected percentage.
- Finds or creates the customer in Moloni by VAT/NIF. If the NIF is missing/invalid (based on configuration), it uses “Consumidor final”.
- Builds the Moloni invoice-receipt payload (product/payment lines and applicable taxes) and sends it to Moloni to create the document as a draft.
- Returns outputs for review, including the created Moloni document ID and any validation warnings so you can finalize it in Moloni.
Use cases
- Test and verify Moloni invoice-receipt automation before connecting real payments.
- Ensure Portuguese NIF validation and correct VAT mapping to avoid tax mismatches.
- SaaS operators prototyping an invoicing workflow that must create customers on-the-fly in Moloni.
Technical details
- n8n nodes/stacks: manual trigger, HTTP Request, Code, Set, If, and supporting notes (e.g., Sticky Note).
- Integrations: Moloni API via HTTP with n8n HTTP Custom Auth (client_id, client_secret, username, password).
- Core logic includes NIF check-digit validation, Moloni VAT tax fetching, customer lookup/creation, and draft fatura-recibo creation.
