Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

"Apply to each" failure

Like (3) ShareShare
ReportReport
Posted on 20 Jul 2021 17:01:15 by 33

Hello, all!  Power Automate informs me that this is a "new issue" and I should ask the community for help!  I get the following error when I test a flow I've created:

 

The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body']' is of type 'Object'. The result must be a valid array.

The purpose of the flow is to send the responses from a Form I created to a pair of other people in my office.  Here's what the flow looks like.  Does anyone have any tips on what I'm doing wrong?  Thanks so much!

 

Space request form flow.png

Categories:
  • Johnnyoc Profile Picture
    41 on 02 Sep 2024 at 18:10:39
    "Apply to each" failure
    So I've also used array() to solve my apply to each issue. However in the next action in the apply to each I want to use an 'id' field from the array - however I can't seem to figure out how achieve this - can anyone help?
  • JCS_1665 Profile Picture
    29 on 15 May 2024 at 14:59:56
    Re: "Apply to each" failure

    Hi Nived N

    Your fix has just helped me, so thank you very much.

    Jan

  • FSUShanks Profile Picture
    6 on 06 Mar 2024 at 13:14:04
    Re: "Apply to each" failure

    Hey Guys

     

    I am having issue with a power automate flow, I keep getting this error

    The input parameter(s) of operation 'Apply_to_each' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'Apply_to_each'.

     

    Could do with some help, thanks 🙂

  • matttracz Profile Picture
    6 on 13 Feb 2024 at 13:28:07
    Re: "Apply to each" failure

    matttracz_1-1707830832835.pngmatttracz_0-1707830779947.png

     

    Hi,

     

    Can you please help me with similar case?

     

    Thanks in advance

  • smalumi Profile Picture
    16 on 30 Sep 2023 at 14:58:25
    Re: "Apply to each" failure

    Hi @Nived_Nambiar 

     

    Yes, the reviewers column is set to multi-selection in Sharepoint. There will always be multiple reviewers.

  • Nived_Nambiar Profile Picture
    17,982 Super User 2025 Season 2 on 29 Sep 2023 at 17:09:08
    Re: "Apply to each" failure

    Hi @smalumi 

     

    Regarding the error, i need to ask one question 

     

    1. Does the Reviewers column is multi selection column in sharepoint ?

    if not then there is no need to use apply to each flow then, you can directly specify reviewer's email to send email action.

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • smalumi Profile Picture
    16 on 29 Sep 2023 at 09:43:53
    Re: "Apply to each" failure

    Hi @Nived_Nambiar 

     

    I adopted your suggestion - it gave the error below. Please kindly let me know

     

    smalumi_0-1695996716643.png

     

  • smalumi Profile Picture
    16 on 29 Sep 2023 at 09:42:56
    Re: "Apply to each" failure

    smalumi_0-1695980555418.png

     

  • smalumi Profile Picture
    16 on 29 Sep 2023 at 07:26:25
    Re: "Apply to each" failure

    Thanks again @Nived_Nambiar 

     

    With regards to the same flow, My trigger is "when an item or  file is modified" ,"Get Items"  from library and update SP List, then "Apply to each" specific Metadata from the library  that will be sent to multiple reviewers.

     

    smalumi_0-1695973023089.png

     

    It seems we have omitted the SP List in the above. 

     

    Looking forward to your response😊 

  • Nived_Nambiar Profile Picture
    17,982 Super User 2025 Season 2 on 29 Sep 2023 at 06:57:41
    Re: "Apply to each" failure

    Hi @smalumi 

     

    I did not see the usage of create item in your flow before, also if you need to add data to your email from list item, you can add it to body of email

     

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading started