Kütüphane / Finans, Faturalar ve Muhasebe
Finans, Faturalar ve Muhasebe
NIF doğrulamalı Moloni taslak fatura-makbuzları oluştur
Portekiz NIF numaralarını ve KDV oranlarını kontrol etmek, müşteriyi eşleştirmek veya oluşturmak ve Moloni'de taslak bir fatura-makbuz oluşturmak için manuel olarak çalışır.
Ne yapar
## Create draft invoice-receipts in Moloni with Portuguese NIF validation ### Who's it for Businesses in Portugal that invoice in Moloni and want to try its API from n8n. ### How it works 1. Sample payment data holds one payment: customer, NIF (Portuguese tax ID), amount with VAT and VAT rate. 2. The NIF is checked with the Portuguese check-digit rule. Without a valid NIF, the draft is made out to the final consumer (consumidor final). 3. The workflow gets a Moloni access token and confirms that each configured VAT tax_id has the right percentage. 4. It finds the customer by NIF, or creates it. 5. It creates a draft invoice-receipt (fatura-recibo) and shows its document ID. ### Setup 1. Create a Custom Auth credential with your Moloni API details and select it in Moloni: get access token: { "qs": { "client_id": "…", "client_secret": "…", "username": "…", "password": "…" } }. The developer ID and client secret are in Moloni under Configurações → Developers. 2. In Configuration, enter your company, document set, product, payment method, maturity date and language IDs, and the tax_id of each VAT rate in taxas_iva (the Moloni API …/getAll methods list them). 3. Edit Sample payment data and click Execute workflow, first on Moloni's demo account. ### Requirements - A Moloni account with API access. - Tested on n8n 2.41.6 (self-hosted) with a simulated Moloni API built from the official docs; not yet tested on a real Moloni account. ### Customization tips Replace the manual trigger with a Webhook or Form trigger. Field names are Portuguese: nome (name), valor (amount with VAT), taxa_iva (VAT rate). ### Full version The full version on Gumroad issues the final invoice right after a Stripe or webhook payment, emails the PDF, never duplicates invoices and alerts you by email when something fails. Em português: valida o NIF e cria um rascunho de fatura-recibo na Moloni.
Adımlar
- Run with sample data
- Sample payment data
- Configuration
- Prepare payment
- Validate payment and NIF
- Moloni: get access token
- Moloni: list VAT rates
- Check configured VAT rates
- Moloni: find customer by NIF
- Read customer search result
- Customer exists?
- Moloni: create customer
- Read created customer
- Build draft invoice-receipt
Toplam 17 adım.
Benzer otomasyonlar