Document → Generate
AI-generatedSummary
Generate a document from a template using the Diro API.
Inputs
- templateId (required) — Identifier of the template to use for document generation
- templateFields (required) — Mapper defining field values to populate the template
- arrayFields — JSON object for array fields like lineItems
- format — Output format for the generated document (pdf or png)
- width — Custom page width in pixels; 0 to use template default
- height — Custom page height in pixels; 0 to use template default
Output shape
a generated document record
The node returns the document data directly; no pagination wrapper is included.
Examples
Example 1: Create a PDF invoice from a template
Set Template to 'InvoiceTemplate', map required fields via Template Fields, leave Array Fields empty, choose Format pdf, Width and Height 0, then connect to next node.