DynamicDocumentAPI

n8n

Render PDFs, images and e-invoices from your templates in n8n workflows, use the PDF tools, and start workflows when renders finish, with the Dynamic Document API community nodes.

View as Markdown

The Dynamic Document API nodes for n8n fill your templates with data from any earlier node and pass the finished file on as binary data: attach the invoice to an email, upload the certificate to a drive, post the image to a chat. The trigger starts a workflow when a render succeeds or fails, a batch completes, a template gets a new version, or another workspace event happens.

The package is @dynamic-document-api/n8n-nodes-dynamic-document-api on npm, published with provenance from its public repository. It contains two nodes:

  • Dynamic Document API: renders documents and images, runs the PDF tools, creates e-invoices, batches and signed URLs, and reads renders, templates and usage. It also works as a tool for n8n's AI Agent.
  • Dynamic Document API Trigger: starts a workflow on webhook events.

Install

In a self-hosted n8n, an owner or admin installs it under Settings → Community Nodes → Install with the package name:

@dynamic-document-api/n8n-nodes-dynamic-document-api

The nodes are waiting for n8n's verification. Until they are verified, n8n Cloud can't install them; every self-hosted n8n can.

Credentials

Create an API key under API keys in the dashboard at https://app.dynamicdocumentapi.com (free plan, no card needed). In n8n, add a Dynamic Document API credential with the key and your workspace's region.

The key decides whether renders are test renders: a test key (dda_test_…) makes free renders with a TEST watermark, which is the right choice while you build a workflow. A live key (dda_live_…) makes final renders that count against your plan.

The key's scopes decide which operations work. The Render only preset covers rendering, the PDF tools, e-invoices, batches and reading renders and templates. Add signed_links:write for signed URLs, account:read for the account and usage, renders:delete for deleting files, and webhooks:write for the trigger, or use a key with full access.

Operations

ResourceOperations
Document (PDF)Create from template, HTML, URL or Markdown
ImageCreate from template, HTML or URL (a screenshot of the page)
PDF ToolMerge, split, rotate, protect, unlock, get or update metadata, convert to PDF/A
E-InvoiceCreate an XRechnung, EN 16931 or Factur-X / ZUGFeRD XML (e-invoicing)
BatchCreate, get, get items (batches)
RenderGet, get many, wait, delete files
TemplateGet, get many, get schema
Signed LinkSign a URL that renders an image or PDF when opened (signed links)
AccountGet the plan and renders left, get usage

Renders from n8n show the source n8n in the dashboard's render list and usage breakdown.

Fill a template

Choose the template from the list (published templates) or by ID. Data Entry then offers two ways to send its data:

  • Map Each Field lists the template's data fields from its schema. Nested fields show as Customer › Name; arrays such as invoice lines take JSON, for example an expression with the previous node's items.
  • Using JSON sends the whole data object, for example {{ $json }} of the previous node.

Document → Create From Template can also embed an e-invoice: keep the template's own setting, embed one with a profile and the invoice from the data or as JSON, or turn it off for a plain PDF.

Files and waiting

With Download File on (the default), the file arrives as binary data in data, and further files, such as the parts of a split, in data_2, data_3 and so on. The JSON output has a signed file_url that stays valid for 24 hours. Turn off Simplify for the full render object.

The API answers a render step within 25 seconds. A render that takes longer keeps running, and the node asks for it again every two seconds until it is done or Max Wait (default 120 seconds) has passed; then the item carries the status processing and a hint. Render → Wait picks it up later, and so does the trigger.

A failed render fails the item with the API's error, including the render ID; with On Error set to continue, the workflow goes on with the error in the item. A retried node doesn't render twice: each item sends an idempotency key made from the execution, the node and the item.

PDF tools take each input PDF from a binary field of an earlier node (uploaded for 24 hours), a public URL, or an earlier render.

Trigger

Activating a workflow with the trigger creates a webhook endpoint in your workspace, listed under Webhooks in the dashboard as "n8n: workflow name". Deactivating the workflow deletes it, and changing the events or templates replaces it. Every delivery's signature is checked against the endpoint's secret.

  • Your n8n must be reachable over https on port 443 (or 80, 8080, 8443): Dynamic Document API doesn't deliver webhooks to other ports or to private addresses. Set n8n's WEBHOOK_URL to that public address.
  • Listen for test event asks Dynamic Document API to send a sample of the first selected event right away, so you can map its fields without rendering.
  • Templates limits render and batch events to these templates. Renders without a template (HTML, URL, PDF tools) then don't match.
  • Renders made in n8n are skipped by default, so a workflow that renders in its own steps can't start itself again and again. Include them only with a template filter that leaves out the templates the workflow renders.
  • Test renders can be included, skipped, or be the only ones.
  • Fetch Fresh Render (on by default) loads the render again, so the event carries working file links.

Each active workflow with the trigger uses one of the workspace's 20 webhook endpoints.

Plans and limits

Every plan, Free included, can render PDFs and images, use the PDF tools and run the trigger. Signed URLs and batches need the Starter plan or higher; e-invoices, PDF/A and PDF/UA need Growth or higher. Your plan's rate limits apply to the requests from n8n.

The requests come from your n8n server, so an IP allowlist on the key or the workspace must include its address.

On this page