Overview
The Carbone node's "Render Report" operation allows you to generate reports by rendering a template with dynamic data using the Carbone API. This is useful for automating the creation of documents such as invoices, certificates, or any templated report where the content varies per execution.
Common scenarios:
- Generating PDF reports from JSON data.
- Creating personalized documents (e.g., contracts, receipts) in bulk.
- Automating document workflows that require merging templates with user-provided data.
Practical example:
You have an invoice template and want to generate a PDF invoice for each customer based on their order details stored in n8n.
Properties
| Name | Type | Meaning |
|---|---|---|
| ID | String | The identifier of the template to use for rendering the report. |
| Body Type | Options | Determines how the report data is provided: as raw JSON ("Json") or as individual fields ("Per Field"). |
| Body | String | JSON string containing all the data needed to render the report. Used when Body Type is "Json". |
| Field Data | Fixed Collection | List of fields (name, type, value) to include in the report data. Used when Body Type is "Per Field". |
Output
- json:
- Contains the response from the Carbone API after rendering the report. Typically includes metadata about the rendered report, such as its ID, status, and possibly a download link or reference.
- binary:
- Not used in this operation. The output is strictly JSON; no binary file is returned directly by this operation.
Dependencies
- External Service: Requires access to the Carbone API.
- API Key: You must configure Carbone API credentials in n8n under the name
carboneApi. - n8n Configuration: No special environment variables are required beyond standard credential setup.
Troubleshooting
Common issues:
- Invalid Template ID: If the provided ID does not correspond to an existing template, the node will throw an error.
- Malformed JSON in Body: If "Body Type" is set to "Json" and the "Body" field contains invalid JSON, an error will be thrown indicating a parsing issue.
- Incorrect Field Data: When using "Per Field", if "Field Value" for an array type is not valid JSON, an error will occur during parsing.
Error messages and resolutions:
"No binary data exists on item!"– This should not occur in "Render Report", but indicates missing binary input in other operations."Unexpected token ... in JSON"– Indicates malformed JSON in the "Body" or "Field Value" (for arrays). Double-check your input formatting."No binary data property ... does not exist on item!"– Only relevant for operations requiring binary input.