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 II
Super User II

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

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (68,916)