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

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. ]

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (2,617)