Carbone icon

Carbone

Operations with the Carbone document generator

Render

AI-generated

Overview

The node fills a DOCX template with the contents of a JSON document to generate a filled report. It is useful for automating the creation of documents such as invoices, reports, or letters by merging template files with dynamic data.

Use Case Examples

  1. Generating a sales report by filling a DOCX template with sales data in JSON format.
  2. Creating personalized letters by merging customer data into a letter template.

Properties

Name Meaning
Context JSON data used to fill the template.
Property Name Name of the binary property which holds the document to be used (template).
Property Name Out Name of the binary property which will hold the converted document (rendered output).
Options Additional options for rendering the document, including timezone, locale, extra data (complement), predefined alias, enumerations, and translations.

Output

Binary

Contains the rendered document as binary data under the specified output property name.

JSON

  • json - The JSON context data used to fill the template.

Dependencies

  • Requires the Carbone document generator library for rendering DOCX templates.
  • Requires an API or helper methods to handle binary data within n8n.

Troubleshooting

  • Error if the binary property does not contain a supported document type (DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XML, TXT, CSV). Ensure the input document is of a supported type.
  • Errors related to JSON parsing of the context data if the input is malformed.
  • Ensure the 'context' JSON data matches the placeholders in the DOCX template to avoid empty or incorrect output.

Links

Discussion