top of page

How to: Add images to a Word Template using MS Flow

Writer's picture: Yash AgarwalYash Agarwal

In this #PowerShot, I will show you how to add an image to a word template using #MSFlow.


Step 1: Get the bas64 content for the image (while uploading a file in a manual trigger, it by default is of the base64 form and so can be used directly)

Step 2: Initialize a variable of type Object and construct the binary stream for the picture. The content type should be “image/png”.

Step 3: Populate the Word Template: reference the variable to the picture control in the word template and fill up all the other fields as needed.

Step 4: Create a file from the template and save it in the document library. (ensure the “.docx” extension for the filename).


The catch here is the image type content control accepts a jpg/png type file content only and the content needs to be constructed that way in order add the image to that control.


I hope you found this interesting and it helped you.

Recent Posts

See All

1 Comment


Lily Parker
Lily Parker
Oct 17, 2024

This is such a helpful guide! The clear step-by-step breakdown of how to add an image to a Word template using MS Flow really simplifies the process. I especially appreciate the emphasis on using base64 content and the specific note about constructing the binary stream for the image—these details are often where things get tricky, but you've explained them clearly. The part about ensuring the file has the correct ".docx" extension and the catch regarding the accepted image formats are also great tips to avoid potential errors. Thanks for sharing this PowerShot, it's sure to make this task much more manageable for others!

4o

Like
bottom of page