PDFKraft icon

PDFKraft

Generate PDFs and images with PDFKraft

Generate Document

AI-generated

Summary

Creates a document from a published PDFKraft template, supplying payload data and optional filename and metadata. By default, waits for generation to finish and downloads successful output as binary data; you can turn waiting off to return the creation response immediately.

Inputs

  • Template (required) — Select a published template or provide its ID using an expression.
  • Payload Input — Choose JSON (default) or key-value pairs to provide data merged into the template. Values beginning with { or [ in key-value mode are parsed as JSON when valid; otherwise they remain strings.
  • Payload (JSON) / Payload — Supply the template data as JSON, or as key-value fields. Reference fields in the template with {{ variable_name }} syntax.
  • Filename — Set the output filename; {{variable}} placeholders use payload values. Leave blank to use the template default.
  • Wait For Completion — Defaults to true. When enabled, poll for completion and download the file automatically. When disabled, queue generation and return the create response without polling or downloading.
  • Timeout (Seconds) — When waiting, set how long to poll before the operation fails (default 60 seconds; UI range 5–300).
  • Output Field Name — When waiting, name the binary field for a successfully downloaded file (default data).
  • Meta — Optionally attach arbitrary JSON metadata to the document; defaults to an empty object.

Output shape

One output item per input item processed.

With waiting disabled, the JSON output is the API response for the created document. With waiting enabled, the node polls until success or failure: successful documents return the document record in JSON plus the downloaded file in the configured binary field; failed documents return the document record in JSON without binary data. If the document does not finish before the timeout, the operation errors.

Links

Discussion