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 / Adding Variable (N) Nu...
Power Automate
Unanswered

Adding Variable (N) Number of Photos to Word Template

(0) ShareShare
ReportReport
Posted on by 139

I have a flow that populates a MS Word template that includes 2 photo content controls so that Power Automate can populate with photos from a SharePoint folder. The photos all follow a naming convention. (i.e. Photo1, Photo2).

 

The flow executes successfully when there are 2 photos named in accordance with the naming convention in the SharePoint folder however the flow fails if there are fewer than 2 photos in accordance with naming convention (i.e. no photos or just Photo1 or just Photo2) . It appears the failed flow is due to the "file not found" (which makes sense).

 

Is it possible to have the flow ignore the "file not found" error and populate what it can based on the files that are in the SharePoint folder?

 

  • If no files match the photo naming convention, do not populate any photos and create document without flow failing
  • If only 1 file matches the photo naming convention, just populate the 1 photo and create document without flow failing
  • If 2 files match the photo naming convention, populate both photos (already successful with current flow)

 

A couple notes:

 

  • I am using a "Get File Content" step for each photo - Photo1 & Photo2
  • The file identifier for "Get File Content" is the file path to Photo1 & Photo2 respectively
    • I anticipate using dynamic content to create variable file paths but the image files will be named consistently
  • I am trying to understand this at a basic level before scaling it up

PowerAutomatePhotoIssue.png

 

Categories:
I have the same question (0)
  • tbrock_troc Profile Picture
    139 on at

    An additional note - I have been able to configure the flow to run whether each of the "Get File Info" steps succeeds or fails, however the issue seems to be with the non-existent file at the "Populate Word Template" step.

     

     

  • tbrock_troc Profile Picture
    139 on at

    It appears this is not a scalable solution as the "Populate Word Template" action has a 10mb limit.

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