Description
n8n Lexware Integration



A comprehensive n8n community node package for seamless Lexware API integration. This package provides modular access to all major Lexware resources with full CRUD operations, robust error handling, and extensive testing coverage.
๐ Now Available on npm!
npm install n8n-nodes-lexware
๐ Resources
- Documentation: Lexware API Samples
- npm Package: https://www.npmjs.com/package/n8n-nodes-lexware
- GitHub Repository: https://github.com/adrijanb/n8n-node-lexware
- Improved Discount Handling: Fixed issue where simultaneous absolute and percentage discounts (even if 0) caused API errors.
- PDF Upload Fix: Enhanced multipart request handling for reliable PDF and file uploads.
- Smart Error Hints: Added descriptive hints for misleading Lexware API errors (e.g., the infamous
postingCategoryIderror). - Invoices Compliance: Removed unsupported “Delete” operation for invoices as per Lexware API limitations.
- Enhanced Validator: Robust validation logic for price, discount, and address fields.
- Articles: Full CRUD operations with type filtering and pricing management
- Contacts: Company & person management with VAT validation and role assignment
- Invoices: Invoice creation, management, and JSON-based line item support
- Dunnings: Dunning management with preceding voucher support and finalization
- Order Confirmations: Complete order confirmation workflow
- Quotations: Quote management with expiry dates, manual addresses, and flexible line item handling
- Voucher Lists: Voucher list retrieval with status filtering
- Vouchers: Comprehensive voucher management
- Print Layouts: Print layout configuration access
- Countries: Country data with international support
- Files: File upload/download with binary data handling
- โ 230+ Tests with 100% pass rate
- โ TypeScript support with full type definitions
- โ Robust Error Handling with retry mechanisms and rate limiting
- โ Pagination Support for large datasets
- โ Binary Data Handling for file operations
- โ VAT Validation for EU and Swiss VAT IDs
- โ Date/Time Utilities with timezone support
- โ Memory Efficient processing for large operations
โจ Features
๐ What’s New in v1.2.x
๐ข Complete Lexware API Coverage
๐ง Technical Features
๐ฆ Installation
For n8n Users (Recommended)
Install the package directly from npm:
npm install n8n-nodes-lexware
Then restart your n8n instance. The Lexware node will be available in your node palette.
For Development
git clone https://github.com/adrijanb/n8n-node-lexware.git
cd n8n-node-lexware
npm install
npm run build
npm test # Run the 230+ test suite
๐ Credentials Setup
Create a new Lexware API credential in n8n with the following information:
https://api.lexware.io)๐ฏ Quick Start
1. Add the Lexware node to your n8n workflow
2. Configure credentials using your Lexware API access token
3. Select a Resource: Choose from Articles, Contacts, Invoices, Dunnings, Order Confirmations, Quotations, Voucher Lists, Vouchers, Print Layouts, Countries, or Files
4. Select an Operation: Choose from Create, Get, Get Many, Update, Delete (depending on resource)
5. Configure parameters based on your specific use case
๐ก Pro Tips
Articles
– GET /v1/articles/{id}
– GET /v1/articles?page=0&[type=PRODUCT|SERVICE]
– POST /v1/articles
– PUT /v1/article/{id} (note the singular form for PUT in samples)
{
"title": "Lexware buchhaltung Premium 2024",
"description": "...",
"type": "PRODUCT",
"articleNumber": "LXW-BUHA-2024-001",
"gtin": "9783648170632",
"unitName": "Download-Code",
"price": {
"netPrice": 61.9,
"grossPrice": 73.66,
"leadingPrice": "NET",
"taxRate": 19
}
}
Contacts
– GET /v1/contacts/{id}
– GET /v1/contacts?page=0
– POST /v1/contacts
– PUT /v1/contact/{id} (note singular form for PUT per samples)
Invoices
– GET /v1/invoices/{id}
– GET /v1/invoices?page=0&status=PAID
– POST /v1/invoices
– PUT /v1/invoice/{id}
Dunnings
– GET /v1/dunnings/{id}
– POST /v1/dunnings?finalize=true&precedingSalesVoucherId={id} (query flags optional)
Order Confirmations
– GET /v1/order-confirmations/{id}
– GET /v1/order-confirmations?page=0
– POST /v1/order-confirmations
– PUT /v1/order-confirmation/{id}
– DELETE /v1/order-confirmations/{id}
Quotations
– GET /v1/quotations/{id}
– GET /v1/quotations?page=0
– POST /v1/quotations
– PUT /v1/quotations/{id}
– DELETE /v1/quotations/{id}
#### New Features (v1.1.0)
{
"title": "Software Development Quote",
"expiryDate": "2024-12-31T23:59:59.000Z",
"address": {
"name": "Berliner Kindl GmbH",
"street": "Jubilรคumsweg 25",
"city": "Berlin",
"zip": "14089",
"countryCode": "DE"
},
"totalPrice": {
"currency": "EUR"
}
}
Voucher Lists
– GET /v1/voucher-lists/{id}
– GET /v1/voucher-lists?page=0&status=...
Vouchers
– GET /v1/vouchers/{id}
– GET /v1/vouchers?page=0&status=...
– POST /v1/vouchers
– PUT /v1/voucher/{id}
– DELETE /v1/vouchers/{id}
Print Layouts
– GET /v1/print-layouts
๐ API Reference
Core Resources & Operations
| Resource | Create | Read | Update | Delete | List | Special Operations |
| ———————– | :—-: | :–: | :—-: | :—-: | :–: | :——————————– |
| Articles | โ
| โ
| โ
| โ
| โ
| Type filtering |
| Contacts | โ
| โ
| โ
| โ
| โ
| Company/Person, VAT validation |
| Invoices | โ
| โ
| โ
| โ | โ
| JSON line items, Status filtering |
| Dunnings | โ
| โ
| โ | โ | โ | Finalize, Preceding voucher |
| Order Confirmations | โ
| โ
| โ
| โ
| โ
| Pagination |
| Quotations | โ
| โ
| โ
| โ
| โ
| JSON line items, Expiry dates, Manual addresses |
| Voucher Lists | โ | โ
| โ | โ | โ
| Status filtering |
| Vouchers | โ
| โ
| โ
| โ
| โ
| Status filtering |
| Print Layouts | โ | โ | โ | โ | โ
| Configuration access |
| Countries | โ | โ | โ | โ | โ
| International data |
| Files | โ
| โ
| โ | โ | โ | Binary upload/download |
Advanced Features
๐ผ Example Workflows
See examples/workflow-lexware-articles.json for a complete example demonstrating:
๐งช Testing & Quality
This package includes a comprehensive test suite with 230+ tests covering:
npm test # Run all tests
npm run test:watch # Run tests in watch mode
npm run lint # Run linting
npm run build # Build the project
๐ ๏ธ Development
Architecture
GenericFunctions.ts with retry logicContributing
1. Fork the repository
2. Create your feature branch (git checkout -b feature/amazing-feature)
3. Run the test suite (npm test)
4. Commit your changes (git commit -m 'Add amazing feature')
5. Push to the branch (git push origin feature/amazing-feature)
6. Open a Pull Request
๐ License
MIT License – see the LICENSE file for details.
๐ค Support
๐ Credits
Developed by Adrijan Bajrami – A comprehensive n8n community node for the Lexware ecosystem.
—
Made with โค๏ธ for the n8n community