Showing results for 
Search instead for 
Did you mean: 
New Member

Issue while drafting Flow | ExpressionEvaluationFailed | Must be a valid array


What I am trying to achieve here is fetch the data from mail and process it for PowerBI Dashboard.

Data is scheduled report coming as zip file with name as date/month string and extension as csv.

So I created Flow where 
1. When a mail arrives, the attachment (zip) file is taken,
2. Create a file with Attachment content to Extract Folder in OneDrive for Business,

3. Extract the archive (zip) in another Folder called Source.
4. Rename the file to static name so that it could be overwritten and pulled by PowerBI for data processing.

Upon testing, i am encountered with error that states - 


"ExpressionEvaluationFailed. The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_3')?['Name']' is of type 'String'. The result must be a valid array."


I am attaching my Flow here,
Apply 2,






Flow continuedFlow continued

Super User
Super User

HI @gtuser 


Your reasoning is correct, but you're trying to do a "for each" that gets an array and parses the values, but you're supplying it with a string (Name). You don't need that extra "Apply to Each."


If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Users online (1,657)