Skip to content

n8n Integration

The official TemplateFox community node lets you generate PDFs from any n8n workflow — drop it after a webhook, a schedule trigger, an AI Agent, or any data source.

A TemplateFox node generating a PDF inside an n8n workflow

The node is published on npm as n8n-nodes-templatefox.

n8n-nodes-templatefox community node package on npm

You can also find it in the n8n integrations directory.

  1. Go to Settings > Community Nodes
  2. Select Install
  3. Enter n8n-nodes-templatefox
  4. Agree to the risks and click Install

Add the package to your N8N_CUSTOM_EXTENSIONS environment variable:

Terminal window
N8N_CUSTOM_EXTENSIONS="n8n-nodes-templatefox"

Grab your API key from your Dashboard, then in n8n go to Credentials > Add Credential, search for TemplateFox API and paste your key. Click Save — n8n will test the connection and confirm it works.

TemplateFox API credential in n8n with a successful connection test

2. Add the TemplateFox node and select the credential

Section titled “2. Add the TemplateFox node and select the credential”

Add the TemplateFox node to your workflow. In the Credential dropdown, pick the account you just created.

Selecting the TemplateFox account credential on a TemplateFox node in n8n

You’re ready to generate PDFs.

The Operation dropdown lists everything the node can do. The two you’ll use most are Generate PDF (synchronous, returns the signed URL right away) and Generate PDF (Async) (queues a job and returns a job_id immediately — best for long renders or large batches).

The full list of operations — including PDF utilities and read-only lookups — is in All node operations below.

Operation dropdown on the TemplateFox node showing Generate PDF, Generate PDF Async, Get and List PDF Jobs, Merge PDFs, Extract PDF Pages

The node automatically fetches every template in your TemplateFox account and lists them by name in the Template Name or ID dropdown — no copy-pasting IDs.

Template Name or ID dropdown listing templates from the user's account by name

Once a template is selected, the Data Input Mode dropdown offers two ways to pass data:

  • Use Template Fields — the node reads your template’s variables and renders one input per field.
  • JSON — you provide a single JSON object that matches the template’s data shape, arrays and nested objects included.
Data Input Mode dropdown with two options: Use Template Fields and JSON

Each template variable shows up as its own input. Map values from previous nodes the standard n8n way.

Use Template Fields mode showing individual inputs for each template variable

Pass one JSON object. Arrays and nested objects pass through unchanged — handy for invoice line items, tables, or repeating sections.

JSON Data editor on the TemplateFox node ready to receive a JSON object

Open the Options panel and click + Add Option to expose extra controls — set a custom filename, pin a template version, change the PDF variant, or upload directly to your S3 bucket.

Options panel on the TemplateFox node showing Filename and the Add Option menu with Expiration, PDF Variant, Template Version, Store on S3, S3 Filepath, and S3 Bucket
OptionDescription
Template VersionPin to a tagged version, or leave on Draft to use the live editor
PDF VariantGenerate a standards-compliant PDF/A-1b, PDF/A-2b, or PDF/A-3b archival PDF
FilenameCustom filename for the PDF (without .pdf extension)
ExpirationHow long the PDF URL stays valid (default: 24 hours)
Store on S3 / S3 Filepath / S3 BucketUpload the result to your own S3 bucket instead of the TemplateFox CDN. See Upload to S3 to configure the integration first.
FieldDescription
urlSigned URL to download the PDF
filenameThe PDF filename
credits_remainingCredits left in your plan
expires_inSeconds until the URL expires

Most workflows only need Generate PDF — the rest of the toolkit is available on the same node when you need it.

OperationDescription
Generate PDFSync generation. Returns a signed URL or a binary file output. Supports the PDF/A archival variant.
Generate PDF (Async)Queue a job and receive a job_id immediately. Use the Get PDF Job operation (or a webhook) to retrieve the result later. Best for long renders or large batches.
OperationDescription
Merge PDFsConcatenate 2+ PDFs (URL or base64) into one document.
Extract PDF PagesExtract a selection of pages using a 1-3, 5, 7-9 syntax.
Rotate PDFRotate every page by a single angle, or apply a per-page rotation map.
OperationDescription
Get PDF JobLook up an async job by ID.
List PDF JobsList recent jobs, optionally filtered by status.
Get AccountReturns remaining credits and account email.

The TemplateFox node is compatible with n8n’s AI Agent nodes (usableAsTool: true). This means you can attach it as a tool to any AI Agent, and the agent will decide when and how to generate PDFs based on the conversation or input data.

  1. Add an AI Agent node to your workflow (e.g. OpenAI, Anthropic)
  2. Attach the TemplateFox node as a tool
  3. The agent receives the template fields as its tool schema — it knows what data is needed
  4. When the agent decides a PDF should be generated, it calls the TemplateFox tool with the right parameters

The agent handles the reasoning: extracting data from unstructured text, picking the right values for each field, and triggering generation at the right moment.

An agent receives an email with order details in free text. It extracts the customer name, items, quantities, and totals — then generates an invoice PDF using your template. No manual parsing, no rigid field mapping.

This works for any document type: invoices from email threads, certificates from form submissions, shipping labels from order webhooks, receipts from payment events.

Stripe payment → Invoice PDF → Gmail + Drive

Section titled “Stripe payment → Invoice PDF → Gmail + Drive”

A ready-to-import workflow that listens for successful Stripe payments, retrieves the invoice and line items, generates an invoice PDF with TemplateFox, then emails it to the customer and archives a copy to Google Drive.