Actions8
Generate PDF
AI-generatedSummary
Generate a PDF document from a selected TemplateFox template by supplying data either as individual mapped fields or raw JSON, with options to customize PDF output, storage, and version.
Inputs
- Template Name or ID (required) — Select a template from your TemplateFox account by name or ID, or provide an expression to specify the template.
- Data Input Mode (required) — Choose how to provide data for the template variables: either map each field individually ('Use Template Fields') or supply a raw JSON object ('JSON' mode), recommended for complex nested data.
- Template Fields (required) — If using 'Use Template Fields' mode, provide values for each template variable. The node dynamically loads the available fields for the selected template.
- JSON Data (required) — If using 'JSON' mode, supply JSON-formatted data matching the template variables to fill the PDF.
- Options — Optional settings to customize PDF generation, including expiration time for the generated PDF URL (60 to 604800 seconds), custom filename (without .pdf extension), PDF/A variant for archival compliance, specific template version, and whether to store the PDF on a configured S3 bucket (including S3 path and bucket overrides).
Output shape
a single JSON object containing a URL to the generated PDF, or an uploaded S3 location if configured
The node returns a JSON response containing the URL to the generated PDF file. The URL remains valid for the specified expiration duration. If 'Store on S3' is enabled, the PDF is uploaded to the configured S3 bucket and the returned URL points there.
Examples
Example 1: Generate a PDF from an invoice template with customer data supplied as mapped fields.
Set 'Template Name or ID' to the invoice template, 'Data Input Mode' to 'Use Template Fields', fill customer name and invoice items in 'Template Fields', and optionally set a custom filename.
Example 2: Generate a PDF asynchronously from a complex report template using JSON data input.
Set 'Template Name or ID' to the report template, 'Data Input Mode' to 'JSON', provide the full JSON data structure in 'JSON Data', and optionally set PDF variant and expiration options.