Fill and Sign a Word Document with Power Apps and Power Automate, without Premium Actions, from Paulie M
How to fill placeholders in a Word document template from Power Automate without the premium Word connector, by treating the .docx file as a ZIP archive and editing its internal XML directly.
A .docx file isn’t really “a Word file” in any special format - it’s a ZIP archive containing XML. Paulie M uses that fact to fill in a Word template from Power Automate without the premium Word connector.
Quick answer: Treat the
.docxtemplate as a ZIP file: extract it, find-and-replace the placeholder text insideword/document.xmlwith real values using standard string actions, then re-zip the folder back into a.docx. No premium Word connector action required.
Why this works
Since Office 2007, Word, Excel and PowerPoint files have all been ZIP archives of XML under the hood - rename a .docx to .zip and you can open it like any other archive. The actual paragraph text lives in word/document.xml inside that archive. Power Automate’s standard “Extract archive”/compression actions can unzip the file, a text replace can swap placeholder strings for real values inside the XML, and the same compression action re-zips the result into a valid .docx again.
The steps
- Start from a Word template with clear, unique placeholder text for each field you’ll fill (something unlikely to appear elsewhere in the document, so a find-and-replace can’t hit the wrong text).
- Extract the .docx as a ZIP using a standard compression action.
- Read and edit
word/document.xml, replacing each placeholder with the actual value for that record. - Re-compress the folder back into a
.docxfile with the same internal structure. - Add a signature by inserting a signature image (or typed name) into the same XML the same way, if the template includes a signature placeholder.
What “sign” means here
This is a visual signature - a signature image or typed name inserted into the filled document, similar to consumer tools like Adobe Fill & Sign. It is not a cryptographic e-signature with a legal audit trail; if you need that, look at a dedicated e-signature service instead.
The catch
Word’s own editor sometimes splits what looks like one piece of text into multiple internal XML “runs” with different formatting markers in between, which can silently break an exact-match find-and-replace on the placeholder string. Keep template formatting simple around placeholders, and test the actual output file before relying on this in production.
🛠️ FAQ
Why does this avoid the premium Word connector?
The premium Word connector’s “Populate a Microsoft Word template” action requires a premium license. Editing the .docx file’s internal XML directly with standard actions (Extract archive / Compression, plus text replace) achieves the same placeholder-filling result with only standard connectors.
Is a .docx file really a ZIP file?
Yes. Since Office 2007, .docx, .xlsx and .pptx are all ZIP archives containing a set of XML files - the document’s actual text lives in word/document.xml inside the archive.
What does “sign” mean in this context - a real digital signature?
No, it’s a visual signature: inserting a signature image or typed name into the filled document, the same way tools like Adobe Fill & Sign work. It’s not a cryptographic e-signature with legal audit trail.
What are the risks of editing document.xml directly?
The placeholder text must match exactly, including any hidden formatting marks Word inserts inside a run of text, which can silently break a straightforward find-and-replace. Test with the actual template file before relying on this in production, and keep the template’s formatting simple.
🔗 Related Tips
🔸 #PowerPlatformTip 94: ‘Extract Text from DOCX’ - the reverse operation, reading a Word file’s internal XML instead of writing to it.
🔸 #PowerPlatformTip 92: ‘Free PDF Tools in PowerAutomate’ - more premium-connector-free document generation, this time for PDFs.
You can see this video here on my blog because I have rated this video with 5 stars in my YouTube video library. This video was automatically posted using PowerAutomate.
This tip is by Marcel Lehmann, Microsoft MVP (Business Applications) and founder of the Power Platform Academy – live Power Platform workshops, free or CHF 49. Join the workshop waitlist to get notified about new dates. For companies that want this implemented for them, see KMUpower – Power Platform consulting & automation for SMEs (DACH).