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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Apply_to_each failed
Power Apps
Unanswered

Apply_to_each failed

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I am trying to create a flow where I apply actions to each file that is added in a specific folder on the Share Point, if the added file is an Excel file.

 

For this I wanted to run a check on each file name "if the name contains .xlsx" but I am stuck in applying the Apply to Each condition, Below is the screen Shot  of the error message

Vinay_Khemka_0-1598561693459.pngError: "The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['headers/x-ms-file-name-encoded']' is of type 'String'. The result must be a valid array."

I have tried to use all available Dynamic available( screen shot below) but unable to go ahead and getting same error each time

Vinay_Khemka_1-1598561765154.png

 

Need your suggestion
 

Categories:
  • WarrenBelz Profile Picture
    156,752 Most Valuable Professional on at

    Hi @Anonymous 

    You are welcome to post here, but this seems to be a Power Automate question and you will probably get a quicker response from the experts over at the Power Automate Community

     

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • SaiKrishnaGudluru Profile Picture
    499 on at

    @Anonymous the value provided ti apply to each is a string but it should be an array. Please validate the input you are passing...  

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard