Carbone icon

Carbone

Node for the Carbone API

Overview

The Carbone node's "Render Report" operation allows you to generate reports by rendering a template with provided data using the Carbone API. This is useful for automating document generation workflows, such as creating invoices, certificates, or any templated PDF/Office documents based on dynamic input data.

Common scenarios:

  • Generating personalized reports (e.g., invoices, contracts) from structured data.
  • Automating the creation of business documents in workflows.
  • Integrating with other n8n nodes to fetch data, render a report, and send it via email or store it.

Practical example:
You have a template for an invoice stored in Carbone. Using this node, you can supply customer and order data, render the invoice as a PDF, and then send it to the customer automatically.


Properties

Name Type Meaning
ID string ID of the template resource to use for rendering the report.
Body Type options Determines how the report data is provided: as raw JSON or per-field entries.
Body string JSON string containing all the data needed to fill the template (used if Body Type = Json).
Field Data fixedCollection List of fields and their values to include in the report (used if Body Type = Per Field).

Output

  • The output is a json object containing the result of the render operation.
  • The rendered report is always converted to PDF format.
  • The structure of the output json field typically includes metadata about the rendered report, such as its ID and status. Example:
{
  "success": true,
  "data": {
    "renderId": "abc123",
    "meta": { /* ... */ }
  }
}
  • Binary output: This operation does not directly return binary data; it returns metadata about the rendered report. To download the actual file, use the "Download Rendered Report" operation.

Dependencies

  • External Service: Requires access to the Carbone API.
  • API Key: You must configure Carbone API credentials in n8n under the name carboneApi.

Troubleshooting

Common issues:

  • Invalid JSON in Body: If the "Body" property contains invalid JSON, the node will throw a parsing error. Ensure your JSON is correctly formatted.
  • Missing Template ID: If the "ID" property is empty or incorrect, the Carbone API will not be able to find the template, resulting in an error.
  • Field Value Parsing: For "Per Field" mode, if a field is set as type "Array", ensure the value is valid JSON (e.g., ["item1","item2"]).

Error messages:

  • "Unexpected token ... in JSON at position ...": Indicates malformed JSON in the "Body" or "Field Value" (for arrays).
  • "No binary data exists on item!": Not relevant for this operation, but may appear if misconfigured.
  • "No binary data property ... does not exist on item!": Not relevant for this operation, but may appear if misconfigured.

How to resolve:

  • Double-check the template ID.
  • Validate your JSON before submitting.
  • For array fields, ensure the value is a valid JSON array string.

Links and References

Discussion