Populate Word (.docx) Templates & Mustache Loops in Power Automate Without Word Online Business

Documents & Compliance • 6 min read • Updated 2026-04-24

Common Power Automate Bottleneck

Microsoft’s built-in "Populate a Microsoft Word template" action requires Premium licensing, forces makers to manually configure legacy Developer Content Controls in Desktop Word, and struggles with split XML runs or dynamic HTML/text loops.

Zetaleap Edge Solution

Pass any Base64-encoded .docx file containing simple {{Tag}} text (or a Mustache HTML/Markdown template with {{#items}} arrays) to POST /api/pp/template-merge and receive a ready-to-save .docx Base64 binary in <25ms.

Download Flow Template & OpenAPI 2.0 Connector

Import directly into Power Automate or open the interactive simulator.

Flow Template (.json) Swagger 2.0 Open Power Automate Utility Toolkit
1

Write Simple {{Placeholders}} in Any Standard Word (.docx) Document

Open Microsoft Word, type plain {{InvoiceNumber}}, {{CustomerName}}, and {{TotalAmount}} tags anywhere in the document, and upload the .docx template to SharePoint or Zetaleap Drive.

2

Send File Content Base64 + JSON Data to POST /api/pp/template-merge

In Power Automate, pass body('Get_file_content')?['$content'] as docxBase64 along with your Dataverse or SharePoint fields in data. Zetaleap normalizes split <w:t> runs, escapes XML entities, and repacks a valid .docx archive.

POST /api/pp/template-merge — Word (.docx) Mode
{
  "mode": "docx",
  "docxBase64": "@{body('Get_file_content')?['$content']}",
  "data": {
    "InvoiceNumber": "INV-2026-1042",
    "CustomerName": "Contoso Manufacturing GmbH",
    "TotalAmount": "EUR 18,450.00"
  }
}
3

Save the Populated .docx Binary to SharePoint or Attach to Outlook

Pass base64ToBinary(body('HTTP')?['mergedDocxBase64']) directly into SharePoint "Create file" or Outlook "Send an email (V2)" Attachments Content.