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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Apply to Each - Condition
Power Automate
Unanswered

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,189 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,189 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard