Quickstart (n8n) - Creating a document in an n8n workflow
Here's how to create PDF documents in an n8n workflow with DocuPotion.
- Install the DocuPotion community node and add credentials
- Create a reusable template
- Trigger document generation in your n8n workflow
Install the DocuPotion node and add credentials
In any n8n workflow, search for the DocuPotion community node from the canvas and drop the Create a document action in.

Click the pencil icon next to the Credential input to add your DocuPotion API key.

Create your DocuPotion API key on the Integrations tab of your DocuPotion dashboard (click Create API key) and paste it into the API Key input. For your security, the full key is only shown once, so copy it before closing the window.

Create a reusable template
Navigate to the Templates section of your DocuPotion dashboard and click on the New Template button. You'll have 3 options for creating a new template:

Google Docs: Connect to your Google Drive and pick an existing Doc template or start from scratch. See this doc for full instructions.
Upload a PDF: Choose this option if you have an existing PDF and you want to add overlay fields that you can merge your data to. Fillable PDFs with form fields also accepted. See this doc for full instructions.
AI Builder: Create a template based on a prompt or choose one of our HTML library templates. You can also attach existing PDF or HTML files for reference. See this doc for full instructions.
Once you've picked an option, you'll be brought to the DocuPotion template editor.
Trigger document generation in your n8n workflow
Back in n8n, configure the Create a document action on your DocuPotion node.

Fields in the Create Document action
- Template ID - The ID shown next to the template name at the top of the template editor. Copy–paste it here
- Output - Pick one: File (recommended — hands n8n a binary file you can email, upload, etc.), URL (returns a signed link), or base64 (returns the raw encoded string)
- File Name - The filename for the generated PDF, e.g.
invoice-{{invoice_number}}.pdf. Supports n8n expressions. - Template Data - Add your template data as a JSON object. This is the data that will replace the
{{merge fields}}in your template.

Tip: You can copy the JSON for Template Data from the template editor: open Connect data, expand Developers and no-code tools and click Copy on Example data (JSON). You can then replace the values with output from previous steps in your n8n workflow.

Run the workflow. The node returns the generated PDF in whichever output format you picked. Pipe it straight into an email node, a Drive upload, a webhook, or anywhere else n8n can reach.