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' inside...
Power Automate
Answered

'Apply to each' inside an 'Apply to each'

(0) ShareShare
ReportReport
Posted on by 6

Hi,

 

I'm trying to build a flow to copy tasks from the task planner to an excel table (with name of the task, the start date, due date and the assigned users) and get an error saying:

"The execution of template action 'Apply_to_each_3' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each')' is of type 'Object'. The result must be a valid array."

The 'Apply_to_each' refers to each task, the 'Apply_to_each_3' refers to the assigned users (as there can be more than one). Does anyone has an idea how to either build the flow different to avoid an 'Apply to each' inside an 'Apply to each' or how to solve the conversion issue with the array?

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

    Hi @flake,

     

    Just to double check. Are you using the List Tasks action from the Planner connector?

     

    If so, you could use value assignments field (collection) in the second apply to each loop to loop through the assigned users.

     

    You should be able to select that field as dynamic content. As an expression that would be:

    items('Apply_to_each')?['_assignments']

     

    value_assignments.png

  • flake Profile Picture
    6 on at

    It worked, thanks a lot!

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard