Hi,
I am very new to all this and do not know much about building flows. We have build flow for approval for HR, Head of Service and Finance with options Approve, Reject, Reassign and also if incorrect email address is provided the flow will fail and notify the requestor. All is working fine except of "Approval Timed Out". - I am expecting after 28 days the notification to be send to requestor that their submission has not been approved in time because the flow has timed out. Unfortunately this email is not fired up as it deos not pass the "Apply to each"
above is showing the error message for Apply to each for each HR, HOS (also Finance which is missing from the screenshot).
And the error message is:
ExpressionEvaluationFailed. The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@{outputs('Start_and_wait_for_an_approval_HR')?['body/responses']}@{outputs('Start_and_wait_for_an_approval_HR')?['body/responseSummary']}' is of type 'String'. The result must be a valid array.
Not sure if anyone can help me, but I will try.
Thanks all
Hi @v-jefferni ,
I have tried to delete Apply to each, but it did not work either. There must be something silly set up which I can't work it out and the person who has developed this flow for us has left the company :(.
Thanks anyway
Hi @Petful-21 ,
I'm saying that you don't need any Apply to each controls in your flow. You need to move the actions inside those Controls out and delete the Controls, directly use
@{outputs('Start_and_wait_for_an_approval_HR')?['body/responseSummary']}
if you need the response.
Best regards,
Hi @v-jefferni ,
are you saying I should try to delete Apply to each controls and test it?
Regards,
P.
Hi @Petful-21 ,
You are using one response approval type in that action, as the result, the output of that action is of type string. In this case Apply to each Controls are not needed actually.
Best regards,
Hi @v-jefferni ,
thanks for reply. As I said I am very new to it so not sure what you looking for exactly so I will try share all screenshots for Start and wait and hope you find what you need.
Approval type: Custom Responses - Wait for one response
Hopefully that is all you need.
Thanks again
Hi @Petful-21 ,
The values you set in Apply to each control for iterating, which are:
@{outputs('Start_and_wait_for_an_approval_HR')?['body/responses']}@{outputs('Start_and_wait_for_an_approval_HR')?['body/responseSummary']}
they are all of type string.
Could you please share the details in Start and wait for an approval action? What's the approval type? What will it be if use @{outputs('Start_and_wait_for_an_approval_HR')?['body/responses']} alone as the input content?
Best regards,
I should have also said, we have set up a Delay which sends a reminder to HR, HOS and Finance in 20 hrs to approve the request.
For the testing purposes I have set up the delay for 1 minute and the Flow is also set up to Time out in 10 minutes rather then 28 days, to speed up the process.
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional