Articles on: Integrations

How to integrate PDF Generator API with n8n

From Data to Document in 5 Minutes: Your First n8n - PDF Generator API Workflow.


The true power of automation platforms like n8n is unlocked when you connect them to specialised external services like PDF Generator API. If you've ever needed to dynamically create invoices, reports, or certificates, the PDF Generator API is an excellent tool for the job. In this tutorial, we will build a simple but practical n8n workflow that authenticates and calls the PDF Generator API Generate document action, allowing you to create custom documents automatically.


Prerequisites


  • An active n8n instance.
  • An active PDF Generator API account (free SANDBOX account is great for getting started).
  • API Credentials: Workspace Identifier, API Key and Secret in the PDF Generator API "Settings".
  • A basic understanding of n8n concepts (workflows, nodes, expressions).



The Easiest Way to Create PDFs in n8n with the Official PDF Generator API Node


Step 1: Downloading the PDF Generator API Node


First, we need to add the official node to your n8n instance.


  1. Once at your n8n canvas, add a new node by navigating to "+" button.
  2. Search for "PDF Generator API" on the right side of the canvas.
  3. Select the node and click the install icon. The PDF Generator API node will be available in few seconds and ready to use.


Installing the PDF Generator API node



Step 2: Set Your Credentials


Next, securely connect your PDF Generator API account.


  1. Double-click the PDF Generator API node you just downloaded, select the Credentials to connect with
  2. Select + Create new credentials
  3. Fill in the fields with your API Key, Secret and Workspace Identifier which you can find in your PDF Generator API account settings.
  4. Click Save.


Credentials


Step 3: Configure the "Generate Document" Action


With your PDF Generator API module added to the workflow, it's time to tell it exactly what to create. This step involves selecting your template and providing the data to populate it.

As shown in the image, you will configure the following parameters:


  1. Credential to connect with: Ensure the PDF Generator account you connected in the previous step is selected here.
  2. Resource: Set this to Document.
  3. Document Operations: Choose the Generate option.
  4. Template: Select the specific template you want to use from your PDF Generator API account. In the example, a template named "Certificate (ID: 1458495)" is chosen.
  5. Data: This is the most critical part. You need to provide the dynamic content for your document in JSON format.

In this example, the following JSON data is used:


JSON

{
"name": "John",
"id": "123456",
"role": "Developer"
}


  1. Format: Select PDF as the output file format.
  2. Output: Choose File to ensure the final output of this step is a usable file for the next steps in your automation (like sending an email or saving to a drive).


Once configured, you can click "Execute step" to test it. The OUTPUT on the right shows a successful result: a document.pdf file has been generated and is ready to be used.


"Generate Document" Action


The key (e.g., "name") must match the placeholder name in your PDF template (e.g., {name}). The value (e.g., "John") is the information that will replace that placeholder.




Updated on: 08/10/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!