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 / Apply to Each - Condition
Power Automate
Answered

Apply to Each - Condition

(0) ShareShare
ReportReport
Posted on by 41

Hello,

 

I am VERY new to Power Automate. 

I'm trying to create a flow that triggers an email be sent if the response to one question on a from is YES and does nothing if the response is NO. Here is what I have so far and the error message I'm getting.

 

ERROR:

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.

 

 

storere_0-1698234236970.png

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,851 Most Valuable Professional on at

    Hi @storere,

     

    The error is caused because your are trying to loop through a single object. The apply to each would expect a list of items/array instead for the looping.

     

    In this setup an apply to each would not be needed. Normally a Get response details can directly be placed after the first trigger action and use the response id. See for an example below.

     

    getresponsedetails.png

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    You need to move everything outside the Apply to each as you will only get a single form submission from the trigger. The structure should look something like that below.

     

    grantjenkins_0-1698235896153.png

  • storere Profile Picture
    41 on at

    Seems I overcomplicated it! you are right!

    How can I mark this as solved for you?

  • Expiscornovus Profile Picture
    33,851 Most Valuable Professional on at

    Hi @storere,

     

    There should be an Accept as Solution button on each reply (next to the thumbs up and reply buttons). Just pick one which solved your issue 😁

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 796

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 538

Last 30 days Overall leaderboard