web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate - Apply...
Power Automate
Unanswered

Power Automate - Apply to each failed

(0) ShareShare
ReportReport
Posted on by 17

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"

Petful21_0-1692189692069.png

 

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.

Petful21_1-1692189986551.png

 

Not sure if anyone can help me, but I will try.

 

Thanks all

 

 

Categories:
I have the same question (0)
  • Petful-21 Profile Picture
    17 on at

    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.

  • v-jefferni Profile Picture
    Microsoft Employee on at

    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,

  • Petful-21 Profile Picture
    17 on at

    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.

    Petful21_0-1692265256088.png

     

    Approval type: Custom Responses - Wait for one response

     

    Petful21_1-1692265403761.png

     

    Petful21_2-1692265595421.png

     

    Hopefully that is all you need.

     

    Thanks again

     

  • v-jefferni Profile Picture
    Microsoft Employee on at

    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,

  • Petful-21 Profile Picture
    17 on at

    Hi @v-jefferni ,

     

    are you saying I should try to delete Apply to each controls and test it?

     

    Regards,

     

    P.

  • v-jefferni Profile Picture
    Microsoft Employee on at

    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,

  • Petful-21 Profile Picture
    17 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 604

#2
Valantis Profile Picture

Valantis 502

#3
Vish WR Profile Picture

Vish WR 417

Last 30 days Overall leaderboard