web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need to generate Word ...
Power Automate
Unanswered

Need to generate Word documents with several PNG images

(0) ShareShare
ReportReport
Posted on by 2
Hi community,
 
I have to build a workflow with Power Automate cloud which is able to generate a Word document containing several images. The number of images may vary between two executions of the flow.

Here is the use case :
The document I have to generate must contain QR codes, in a table. One code per row on the 2nd column, the 1st column will contain a label corresponding to the value of the code.

By following some tutorials and videos, I manage to create a Word template containing a one-row & two-columns table.
1st cell contains a text content control, 2nd cell contains an image content control.

I've set on the template a repetitive content control, in order the table to dynamically add rows as needed when the Power Automate flow is triggered.
That works fine with text content control, as the different values are processed in a loop on the flow, and added to the text content control through the Populate a Microsoft Word template in the flow.
 
Doing the same with image content control is more tricky than I thought.
In the flow loop, I've added HTTP action which makes a GET request to a public API that generates QR code.
The output is like below :
 
{
"$content-type": "image/png",
"$content": "iVBORw0KGgoAAAANSUhEUgAAAEEAAABBAQMAAAC0OVsGAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA2klEQVQokX3SsQqDMBAG4CuB3lLomi2voFun5lUCeYE+QCGCq9BX0sVs9RWEDq5KFwXxmtJWYhv7T99wHD/cAcwxVOQnTeRLga3oBhiW7ouJpcIuZa/mj/I400spKKP9e/OvDJVu7tXqI5dNWr9r/8j01NHYHBZCzOEMKwIcqkuNcik57RNYEcPhym7c+lIEcaueDYISfWTSRvrSKLtWP0sHxYciM2R9AWyB1RzDciNVorn0pSA/7hTHsNxlJkY9fakbhZBrKiOTNNaX+4jiPtYYluvSZUJQWHMeFSbsieiTYCYAAAAASUVORK5CYII="
}
 
The image content control is working fine if I set manually on my template several image controls like :
qrcode1
qrcode2
qrcode3
qrcode4 etc ....
 
 
By doing this, I see in my "Fill out a Microsoft Word template" the corresponding fields but this is not viable because it implies that I have to create as many content controls as necessary in the template. However, I want the image content controls to be added automatically depending on the number of images created.

This is where I'm at, I'll take any suggestions :)
Thanks
Remi
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard