Power Automate
Use the connector-focused OpenAPI 2.0 document with grouped Word template and PDF actions.
Choose a task, follow its example, then try it with your own file. Start in the browser — no Base64 tools needed.
<<[customer.name]>>.base64 -w 0 invoice-template.docx, macOS uses base64 -i invoice-template.docx, and PowerShell uses [Convert]::ToBase64String([IO.File]::ReadAllBytes('invoice-template.docx')).<base64_docx> with the value from step 2.curl -X POST https://flowdocker.com/v1/document/populate-docx-to-pdf \
-H "x-api-key: YOUR_API_KEY" -H "content-type: application/json" \
--data '{"fileName":"invoice-template.docx","fileContentBase64":"<base64_docx>","data":{"customer":{"name":"Nguyen Van A","vip":true},"invoice":{"reference":"INV-1001","total":"330 USD"}},"outputFileName":"invoice.pdf"}'
The curl example above is for Bash on the FlowDocker test environment. Save the JSON response as response.json. Decode only its fileContentBase64 property, never the whole JSON. In the browser, simply use Download Output.
In Word, type these lines (the spelling and brackets must match):
Invoice: <<[invoice.reference]>>
Customer: <<[customer.name]>>
Total: <<[invoice.total]>>
<<if [customer.vip]>>VIP customer<<else>>Standard customer<</if>>
Use this matching data object:
{
"invoice": { "reference": "INV-1001", "total": "330 USD" },
"customer": { "name": "Nguyen Van A", "vip": true }
}
Web tester shortcut: click the endpoint's Try Online, choose the DOCX in File 1, leave <base64_docx> in the payload, paste your API key, and run. Do not paste the binary file itself into the JSON.
PowerShell output: save the JSON response as response.json, then run $r = Get-Content response.json | ConvertFrom-Json; [IO.File]::WriteAllBytes('invoice.pdf',[Convert]::FromBase64String($r.fileContentBase64)).
Replace the entire data object in the tester with the object above. Expected output: INV-1001, Nguyen Van A, 330 USD and VIP customer. To keep an editable Word document, choose Populate Word Template and use an output name ending in .docx.
Supported: fields, nested properties, loops and conditions. Images, HTML insertion and charts in templates are not supported yet.
/v1/document/* and /v1/pdf/* use header x-api-key. Keep your key private.allowMissingValues: true only if blank values are intentional.All errors follow standard structure:
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "human readable message",
"details": []
}
}
Download the live OpenAPI files or Postman collection directly from this environment. The exported spec uses the current host so you can import it into Power Automate without editing the base URL first.
Use the connector-focused OpenAPI 2.0 document with grouped Word template and PDF actions.
Use the OpenAPI 3.0 export for tooling that expects the newer schema format.
Import the collection with the current environment base URL already injected.
x-api-key header.
Upload the file(s), paste a real API key, and keep the <base64_...> placeholders. DOCX, PDF, and image content is injected automatically.
No request executed yet.
{}
Get your API key and process your first document in seconds.