Populate Word (.docx) Templates & Mustache Loops in Power Automate Without Word Online Business
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.
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.
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.
{
"mode": "docx",
"docxBase64": "@{body('Get_file_content')?['$content']}",
"data": {
"InvoiceNumber": "INV-2026-1042",
"CustomerName": "Contoso Manufacturing GmbH",
"TotalAmount": "EUR 18,450.00"
}
}
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.