Actions39
- Account Actions
- Client Actions
- Document Actions
- Product Actions
- Receipt Actions
- Store Actions
- Supplier Actions
Document → Create Document
AI-generatedOverview
This node integrates with the Vendus API to create new documents such as invoices, quotes, orders, or receipts within a business management and invoicing system. It is useful for automating document creation workflows in sales, accounting, or inventory management processes. For example, you can automatically generate an invoice document when a sale is completed or create a quote document based on customer requests.
The "Create Document" operation allows specifying detailed document information, including client association, document type, itemized products with pricing and tax details, and output format preferences. This enables seamless generation of official business documents directly from n8n workflows.
Properties
| Name | Meaning |
|---|---|
| Document Type Name or ID | Select the type of document to create (e.g., Invoice, Quote, Receipt). You can choose from a list loaded dynamically from Vendus or specify an ID via expression. |
| Client Name or ID | Optionally select the client associated with the document. Loaded dynamically from Vendus clients or specified by ID/expression. |
| Document Information | Collection of optional fields describing the document: - Date: Document date (YYYY-MM-DD), defaults to current date if empty. - Date Due: Payment due date. - Date Supply: Supply date, defaults to current date. - External Reference: Custom external reference string. - Notes: Additional notes about the document. - Register ID: Identifier for the register used. |
| Document Items | One or more items included in the document, each with: - Discount: Discount percentage. - Product Name or ID: Select product from Vendus or specify ID. - Product Reference (Alternative): Use this code instead of product ID if needed. - Quantity: Number of units. - Tax Rate: Tax category (Exempt, Intermediate, Normal, Others, Reduced). - Unit Price: Price per unit. |
| Document Options | Options affecting document processing: - Output Format: Format of printable output (Auto, ESC/POS, HTML, PDF, PDF URL, TPA SIBS). - Stock Operation: How stock is adjusted (Decrement, Don't Change, Increment). |
| Custom JSON | Raw JSON input allowing advanced customization of the document payload sent to the API. |
| Options | Additional options: - Enable Debug Logging: Enables detailed logging for troubleshooting API calls. |
Output
The node outputs the response from the Vendus API as JSON in the json field of the output data. This typically includes the created document's details such as its unique identifier, status, and any generated URLs or references.
If the selected output format involves binary data (e.g., PDF), the node may provide a link or encoded content depending on the API response, but this is handled transparently through the JSON response.
Dependencies
- Requires an API key credential configured in n8n to authenticate with the Vendus API.
- The node depends on the Vendus API base URL and authentication token provided via credentials.
- Dynamic option loading (e.g., document types, clients, products) requires network access to Vendus endpoints.
- Optional debug logging can be enabled for detailed request/response tracing.
Troubleshooting
- Missing Required Parameters: If required parameters like document type or product ID are not provided, the node throws errors indicating which parameter is missing.
- API Authentication Errors: Invalid or missing API credentials will cause authentication failures. Ensure the API key and base URL are correctly set in credentials.
- Network Issues: Connectivity problems to the Vendus API will result in request failures. Check network access and API availability.
- Invalid Data Format: Providing incorrectly formatted dates or invalid product IDs may cause API rejections. Use correct formats (e.g., YYYY-MM-DD for dates).
- Debug Logging: Enable debug logging to get detailed insights into request construction, parameter substitution, and API responses to help diagnose issues.
Links and References
- Vendus API Documentation (official site referenced in node description)
- n8n Expressions Documentation – for using expressions in property values
- Vendus document types and tax rates correspond to standard business document categories and tax classifications used in Portugal and similar markets.