Skip to main content

One post tagged with "handlebars"

View all tags

Power Automate PDF Generation from a SharePoint List: A Handlebars Template plus HTML to PDF Invoice Workflow

· 27 min read
SEO and Content Writer

PDF4me Generate Document Single is a Power Automate action that renders a Handlebars HTML template plus a JSON payload into a finished HTML document, which the paired Convert HTML to PDF action then paginates into A4. A new SharePoint list row fires the flow, Compose assembles the JSON, and Dropbox stores the invoice PDF named after the invoice number. No premium connector, no code.

Every finance team hits the same wall in Power Automate. The native Convert File action requires a premium license and refuses to touch an HTML template. Adobe PDF Services costs. Encodian costs. matthewdevaney's popular workaround skips HTML entirely and locks you into Power Apps. The pattern below is the one nobody in the top ten of the SERP shows end to end: a SharePoint list column set becomes a JSON payload, a real Handlebars template file lives in /Shared Documents/, and two PDF4me actions do the rendering and pagination for the free-tier connector cost.

Handlebars template rendering: PDF4me vs the alternatives

The comparison every Power Automate architect makes before picking a connector for invoice PDFs:

Approach vs PDF4meHandlebars templating?HTML to PDF paginator?Connector tierNotes
PDF4me (this blog)Yes, Generate Document SingleYes, Convert HTML to PDFStandardTwo single-purpose actions, no premium license needed
Adobe PDF ServicesNoYesPremiumCost per user, no template engine, HTML only
EncodianNo native templatingYesPremiumPopular but paid per invocation
matthewdevaney Power Apps routeWord template onlyN/AStandardSkips HTML entirely, locked to Power Apps front-end
Native Convert FileNoWord / Excel only, not HTMLPremiumCannot render an HTML invoice at all
The flow at a glance
1. When an item is created
SharePoint trigger on the Invoices list. Fires per new row, hands every column to the flow as dynamic content.
2. Compose
Builds one JSON payload from the row: invoice, customer, items[], totals, notes. The exact shape the Handlebars template expects.
3. Get file content using path
SharePoint /Shared Documents/invoice_template.html. The Handlebars template lives beside the data, versioned in the same site.
4. PDF - Generate Document (Single)
PDF4me action. Template File Type Html (Handlebars Syntax), Document Data Type Json, Output Type Html.
5. Convert HTML to PDF
PDF4me action. A4, portrait, scale 0.8, 40px margins, print backgrounds Yes.
6. Create file
Dropbox /. File Name Title.pdf, so INV-1005 is saved as INV-1005.pdf.