Best way to automatically fill out a PDF form with backend data in n8n

Hi everyone,

I’m currently building an automated workflow in n8n where I need to fill out a standardized PDF form using data pulled from our backend.

The structure is always the same: the PDF has fixed fields, and the data such as title, date, lecturer name, etc., always goes into the same positions.

I’m trying to find the most effective and reliable way to:

  • Automatically insert backend data into an existing PDF form (with fillable fields, not just raw text placement)

  • Save or send the completed PDF

  • Avoid overly complex or fragile solutions

So far, I’ve considered:

  1. Using a Google Docs template, replacing placeholders, and exporting it as a PDF
    → Works technically, but not ideal when the official PDF form has to be used

  2. Using external services like PDF Generator API or pdf.co
    → Possible, but comes with API costs

  3. Manually defining PDF field mappings via an API or HTTP call
    → More complex and potentially error-prone

My question:
What is the best and most efficient approach in n8n to fill out an existing PDF form with data from another system?

Thanks in advance for any pointers or examples.

If you would rather not use costs, I would say 1. is your best option. If your self hosted perhaps you could install a node to do it for you, but if your on cloud the google docs is your best option. You could use the google docs and google drive nodes and download it as a pdf, like you suggested.

EDIT - if you go to google drive nodes and go to the download file node you can download it as a pdf by using the google file conversion option.

Create a google doc through n8n - write the text - download as pdf.

If you’d like i could make a workflow example for you if it’ll help you visualize it better.

I’d say the most reliable way is to go for an API, especially one that offerds Handlebars templates. This way you can host your HTML template of the report on the API’s service, and then just send an HTTP request containing the variable data (the fields you’ll dynamically fill in).

PDFMHTML does that. Check the bottom of the Documentation, they support hosting your templates, and then just receiving the dynamic data → You receive the printed PDF.

They also have a live previwe so you can debug your HTML design on screen.

1 Like

Is PDFHTML free? Then that might work well for him!

It has 50 free requests!

Then they’ve got different type of plans (on-demand or monthly sub)

1 Like

That might work! Hopefully he’ll see your response and like it!

1 Like