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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Post multiple images t...
Power Automate
Unanswered

Post multiple images to word document

(0) ShareShare
ReportReport
Posted on by 4
Hi,
 
I successfully saved multiple images (3) to my sharepoint which were uploaded from a Microsoft form. I would like to then put all 3 images into a word template. I was only able to do 1... I don't know how to add the second and third images to the word template.
 
 
I have done some research, and it looks like I will need to utilize some sort of array, but I'm not sure how. Alternatively, since it's only 3 images. is it possible to just repeat the process 3 times?
Categories:
I have the same question (0)
  • Verified answer
    Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    Post multiple images to word document
    You definitely don't want your "Populate a Microsoft Word Template" action in a loop, unless you're creating a new Word document for each item in the loop. 

    The correct way to do this is to use a loop to get and store the image content for each uploaded file in an array variable.  Then when you populate your Word Template you use indexing references on your array variable.


    E.g.
    variables('vPicturesArray')?[0] //first image
    variables('vPicturesArray')?[1] //second image
    variables('vPicturesArray')?[2] //third image
     
    However, you probably also want to handle for forms that don't have all the images uploaded, or no images at all (if your file upload field isn't required).
     
    This can be done by creating a blank or default image and saving it in SharePoint.  Then you just get that image's file content and use a Coalesce() for each Image Control in your Word Template:
     
     
    Here's a thorough blog post on how to do this best:
     
     
    If this helped you, please click "Does this answer your question" and give it a like to help others in the community (+ close the ticket)!

    Power Platform Developer | LinkedIn: Mark Nanneman | Blog: Power Stuff  | YouTube: Mark's Power Stuff  | 
     
  • EF-03010358-0 Profile Picture
    4 on at
    Post multiple images to word document
    Incredible, thank you so much!!

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard