Create PDF document from HTML template in Zapier or Power Automate

This article demonstrates how to generate PDF documents from an HTML template with the help of Plumsail Documents processes.

The Processes are a user-friendly intuitive interface for creating documents from templates, converting them, and delivering to different systems for further management.

In this article, we will generate a PDF invoice based on some data. This is how our final PDF file will look:

Generated PDF invoice from an HTML template

Here is a step-by-step description of creating a process of generating PDF documents from an HTML template.

Configure Process

First, register or log in to your Plumsail account.

Create a new process

In your Plumsail account, open the Processes section.

In this example, we will use a sample template. Feel free to download an HTML template for invoices.

Click Add Process and select Upload a document.

Add Process menu with the Upload a document option for an HTML template

Enter the Process name, select PDF as the output format and click Create.

Configure the HTML template process name and PDF output format

If you prefer to create the template yourself, click Add Process, select Start from blank instead. Choose HTML for the template type.

Create a process from a blank HTML template

Preview the template

Once the process is created, you can preview the uploaded HTML template in the Editor.

Hint

To generate several documents from a single form submission, add multiple templates to your process. Learn more about the set of documents.

Templating syntax

You may see that the template has placeholders like {{Total}} and {{Quantity}}. The {{#each Items}} block iterates over invoice items, and the {{#with FieldValues}} block changes the context to each item’s FieldValues object.

Please read template syntax description for more information.

Test template

To visualize the document before saving it, click Test template.

Testing template button in HTML template process

This JSON data is used to populate the {{ }} placeholders in the template. Therefore, the data must correspond to the tokens in the template.

Test an HTML template with JSON data in Plumsail Documents

To test the template from our example, you can copy and paste the JSON data shown below.

Note

This is JSON for testing. You can pass data from an external system or web form to the process. See the Start process section.

{
    "InvoiceDate": "08/10/2026",
    "InvoiceNum": 1,
    "Total": 1098,
    "ClientCompany": "Contoso ltd.",
    "ClientName": "John Doe",
    "ClientAddress": "55 East 52nd Street 21st",
    "ClientCity": "New York",
    "ClientRegion": "US",
    "ClientZip": "10022",
    "Items": [
        {
            "FieldValues": {
                "Quantity": 1,
                "SubTotal": 499,
                "Title": "Product Name #1",
                "UnitPrice": "499"
            }
        },
        {
            "FieldValues": {
                "Quantity": 1,
                "SubTotal": 599,
                "Title": "Product Name #2",
                "UnitPrice": 599
            }
        }
    ]
}

Switch the process to Production mode to remove Plumsail watermarks from resulting documents.

Switch an HTML template process to Production mode

Template settings

Open the template settings to configure the output filename and PDF options:

Configure the output filename and PDF settings for an HTML template

Delivery

The next step is delivery. For demonstration purposes, we’ll store the result file in OneDrive. But there are other options.

You need to connect your OneDrive account to Plumsail. After that, specify the folder where you want to save the generated document. Here you can use tokens as well.

Configure OneDrive delivery for an HTML template process

You can configure as many deliveries as you need.

Start the Process

Now everything is ready, and you can start generating PDF documents from an HTML template. Click Run process to see the available options with a description of each.

Run an HTML template process and choose an integration option

You can run the process:

Use Power Automate Flow and Zapier to connect the process with other apps. It enables you to gather data from one app and pass it to the process to populate an HTML template. Thus, you can populate the HTML template from various web forms, CRM systems, SharePoint lists, and thousands of other web applications.