cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JFLOW2020
Frequent Visitor

Timed out approval gives 'Null' response which causes the flow to stop and fail. Does anyone have a a solution?

Hello,

 

I hope someone can help. I’m using the configure run option and timing out the approvals. For some reason when I approve the first one (best case scenario) all is fine, however, when I go to approve the escalated item (after the first approval has timed out) I get the following error message:

 

The execution of template action 'Apply_to_each_5' failed: the result of the evaluation of 'foreach' expression '@outputs('Start_and_wait_for_an_approval_2')?['body/responses']' is of type 'Null'. The result must be a valid array.

 

So it looks as though as ‘condition 2’ (connected to the approval which timed out) doesn’t get ‘Approve’ or 'Reject'n1.PNGn2.PNG it states ‘Null’ and this is what causes the flow to fail? How can I stop this from happening? Can anyone help? Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @JFLOW2020 ,

you must simplify your flow. Power Automate supports only 8 levels of 'Condition' inside 'Condition' inside 'Condition'..., the error tells you that you just reached 9 of them.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

3 REPLIES 3
tom_riha
Super User
Super User

Hello @JFLOW2020 ,

it returns an error in the 'Apply to each 5' where you're trying to process the responses from the 'Start and wait for an approval'. Since the action timed out, the outcome is Null = nothing to process, nothing to loop through, error.

You should add a 'Condition' after the approval action and check if the 'Responses' outcome is equal to null, if it's null, you can't use the 'Responses' anywhere in the flow. You can use it only if the action didn't time out.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Hello, thanks so much for this. 

 

However when I try it this is what comes up for me. Any ideas?N3.PNG

Hello @JFLOW2020 ,

you must simplify your flow. Power Automate supports only 8 levels of 'Condition' inside 'Condition' inside 'Condition'..., the error tells you that you just reached 9 of them.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,390)