Overview
This node integrates with the Carbone API to manage report templates and generate reports. It supports creating new templates (either by uploading a file or using an existing template), generating reports from templates with provided data, checking the status of report generation, and downloading generated reports.
Common scenarios include automating document generation workflows such as creating invoices, contracts, or personalized reports in various formats (PDF, DOCX, XLSX, PPTX, HTML) based on dynamic data inputs.
For example, you can upload a new invoice template file, then generate PDF invoices by feeding customer data into that template, check the generation status, and finally download the completed invoice files.
Properties
| Name | Meaning |
|---|---|
| Template Source | Choose whether to use an existing template or upload a new one. Options: "Existing Template", "Upload New Template" |
| Existing Template | Select a template from the list of existing templates (shown if "Template Source" is "Existing Template") |
| Template File | Path to the template file to upload (supported formats: DOCX, XLSX, PPTX, ODT, etc.) (shown if "Template Source" is "Upload New Template") |
| Template Name | Name to assign to the template being created |
Output
The node outputs JSON data representing the response from the Carbone API for each operation:
- For Create Template, it returns details about the newly created or registered template.
- For Generate Report, it returns information about the initiated report generation.
- For Get Report Status, it returns the current status of the specified report.
- For Download Report, it outputs binary data containing the generated report file (e.g., PDF) along with JSON metadata including the report ID and success flag.
The binary output contains the actual report file content ready for further processing or saving.
Dependencies
- Requires an API key credential for authenticating with the Carbone API.
- The node expects the Carbone API URL and API key to be configured in the credentials.
- The node uses HTTP requests to interact with the Carbone API endpoints.
Troubleshooting
- Uploading Template File: The code logs the path of the template file but does not show actual file reading or base64 encoding logic. Users must ensure the file content is properly encoded and passed; otherwise, the upload will fail.
- API Errors: If the API key or URL is incorrect or missing, requests will fail with authentication errors.
- Report Download: If the report ID is invalid or the report is not yet generated, downloading will fail or return empty data.
- Continue On Fail: The node supports continuing execution on failure per item, returning error messages in the output JSON.
Common error messages:
- Authentication failures due to invalid API keys.
- Template not found when using an existing template.
- Invalid file path or unsupported file format during upload.
Resolving these typically involves verifying credentials, template IDs, and ensuring correct file paths and formats.