cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SSwan
Level: Powered On

Apply to each error

I'm sure this has got a very simple solution, but I just can't figure it out.

My Flow used to run quite nicely until this week where there seems to be an added 'Apply to Each' bit which has caused everything to fail. The error that comes up is:

 

The execution of template action 'Apply_to_each_6' failed: the result of the evaluation of 'foreach' expression '@triggerBody()?['First_x0020_Approver']' is of type 'Null'. The result must be a valid array.

I am trying to build a flow where

1. An item is added to sharepoint and two approvers are designated; first and final

2. This item gets sent to gatekeeper for approval

3. Gatekeeper approves
4. Item gets sent to first approver for approval
5. First approver approves
6. Item updated with date for #5
7. Item gets sent to Final Approver
8. Final approver approves
9. Item updated with date for #8

This used to run smoothly, but now stops at #3 where this new 'apply to each' bit is and it's asking for an array rather than an object and I can't for the life of me figure out how to get this to work; I've tried nesting approvals 4-9 within the same 'apply to all' and not nested (2-3 do not have this bit). Any assistance would be highly appreciated!

4 REPLIES 4
Community Support Team
Community Support Team

Re: Apply to each error

Hi @SSwan,

 

Could you please share a screenshot of your flow's configuration?

Could you please show a bit more about the "Apply to each" action within your flow?

Further, could you please share a bit more about the First Approver column in your SharePoint list?

 

The error message told that the "Apply to each" action is required to provide a valid array, but the result the expression you provided returned is Null. Please check if the First Approver column has values (is not empty) within your SharePoint list.

 

If you could provide more details about your scenario, we would provide a proper workaround for you.

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Anonymous
Not applicable

Re: Apply to each error

Hi, I am Facing Same issue. Error Message "The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@body('Parse_JSON_2')?['body']?['value']' is of type 'Null'. The result must be a valid array." Until Last week it was working find and the Suddenly Stops. Thanks, Shantanu
amandalee
Level: Powered On

Re: Apply to each error

Did anyone manage to resolve this issue? I am getting the same error.

Super User
Super User

Re: Apply to each error

It seems that this error occurs quite often.

I have a Flow that runned perfectly 4 days ago and now I'm getting the same error as you guys.

 

 

My error is a little bit different in that matter that my item is an Object and isn't null. So I don't know what happened here.

 

Feels very unstable and is kinda unreliable to implement this in a live environment.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!





Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,851)