Generate Report Modded
AI-generatedSummary
Populates a DOCX template with JSON data and returns the generated report as a binary field. Optionally converts the report to PDF, which requires LibreOffice in the n8n runtime.
Inputs
- Template Binary Field (`sourceKey`) (required) — Name of the incoming binary field containing the non-empty DOCX template. Defaults to
template. - Output Binary Field (`destinationKey`) (required) — Name of the binary field for the generated file. Defaults to
report; the output is added alongside any existing binary fields. - Template Data (`data`) (required) — A JSON object used to populate the template. Nested object properties are flattened into dotted keys; arrays and other values are passed through as values. Template tags use
«and»delimiters, with#and/for container tags. - Output File Name (`outputFileName`) (required) — Base name for the generated file. An existing
.docxor.pdfsuffix is replaced to match the output format; invalid filename characters are replaced, and the base name is limited to 200 characters. Defaults toReport. - Convert to PDF (`convertToPDF`) — When enabled, converts the generated DOCX to PDF. Defaults to
false; requires LibreOffice installed and executable in the n8n runtime.
Output shape
One output item per input item, preserving its JSON and existing binary data and adding the generated report under the configured output binary field.
The report is DOCX by default and PDF when conversion is enabled. Each output retains item pairing. If Continue On Fail is enabled, failed items retain their input binary data and JSON with an
errorfield; otherwise an error is raised.