cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vdwallo
Regular Visitor

Power automate - flow error

Hi there,

 

I am new to the power automate scene out of six individual (though similar) automated flows that I have create on is coming up with an error and I can't figure out why. the below error is being flagged and I don't know how to fix it, or why it is just this one;

 

The execution of template action 'Apply_to_each_7' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_5')' is of type 'Object'. The result must be a valid array.

 

Any help is appreciated.

Thanks

5 REPLIES 5
Mira_Ghaly
Dual Super User
Dual Super User

@vdwallo 

Can you share screens of your flow please , but from the error , it looks like you are trying to do an apply to each on an object and not on an array!

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
pre
Community Support
Community Support

Hey @vdwallo ,

 

You can use JSON() function for converting a string to object or array, for example: In Apply to each "in the text box of select an output from previous steps " try the expression as json(outputs('compose'))

 

Thanks

Hi there, 

 

Thanks for the response, is this what you need?

 

vdwallo_0-1629098995962.png

vdwallo_2-1629099145145.png

 

This has worked on every other flow so I don't know how it could differ in just this one - that is why I am so confused.

 

Thanks

 

 

vdwallo
Regular Visitor

Thanks for the advice, but it just comes up as an error.

 

Cheers

Hi, I don't' think you need two apply_to_each loops?

 

try to use only Apply_to_each_5

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (2,482)