Библиотека / Финансы, счета и бухгалтерия
Финансы, счета и бухгалтерия
Создание счетов в Pennylane из данных вебхука с аутентификацией
Принимает данные счёта по аутентифицированному POST-запросу, находит или создаёт клиента в Pennylane, выставляет финализированный счёт, при необходимости отправляет его по почте и возвращает детали.
Что делает
# Create and send Pennylane invoices from webhook data ## Who is this for SMEs and freelancers using Pennylane who want to create invoices automatically from a CRM, form, or business application. ## What it does A protected POST webhook validates customer and line-item data, finds or creates the customer in Pennylane, creates a finalized invoice, optionally emails it through Pennylane, and returns the invoice details to the caller. ## Security and setup 1. Create an HTTP Basic Auth credential and select it on WH Receive Invoice Data. Never expose an unauthenticated invoicing webhook. 2. Create an HTTP Header Auth credential for Pennylane: name Authorization, value Bearer . 3. Select that Pennylane credential on all four PL HTTP Request nodes. 4. Configure sequential invoice numbering in Pennylane. 5. Test with send_email: false before enabling customer delivery. Email delivery retries Pennylane HTTP 409 responses once per minute, up to five attempts. 6. Activate the workflow and use its production webhook URL. Requires n8n 1.40+ and a Pennylane API token with customer_invoices:all and customers:all scopes. Import verified with n8n 2.31.5. Source and full payload documentation: https://github.com/Gauthier-Huguenin/n8n-pennylane-auto-invoicing Adapted from the original template © 2026 Gauthier Huguenin. Distributed under the MIT License; the complete notice is included in this workflow. --- ### Flow WH Receive Invoice Data → Code Validate Payload → PL Search Customer → IF Customer Exists → yes: Set Customer ID → no: PL Create Customer → Set Customer ID → Code Build Invoice Payload → PL Create Invoice → IF Send Email → yes: retry Wait PDF Generation → PL Send Invoice Email up to five times on HTTP 409 → no: Set Output Response → Set Output Response
Шаги
- WH Receive Invoice Data
- Code Validate Payload
- PL Search Customer
- IF Customer Exists
- PL Create Customer
- Set Customer ID
- PL Create Invoice
- Code Build Invoice Payload
- IF Send Email
- Set Output Response
- Wait PDF Generation
- PL Send Invoice Email
- Set Email Attempt
- IF Email Sent
Всего шагов: 17.