We have the following:-
1) SharePoint list which have a field of type People/Group which allow multiple selection
2) Planner
now we want to loop through all the SharePoint items >> and for each item >> to create a planner task >> assign the planner task to the users defined inside the People/Group field... but i am not sure how i can implement the scenario of building a comma separated list of a SharePoint People/Group field which allow multiple selection, so i can define this comma separated list inside the Assigned User Ids's planner field:-
I also try this workflow:-
1) get all the SP items + initialize an array var
2) initialize string var + loop through the SP items + build an array of the assigned users' emails
3) build a comma separated var string based on the array, add the string var to the create planner task:-
but when i run the flow i got this error "The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each')' is of type 'Object'. The result must be a valid array.":-
any advice?
Please post this as a new question. You'll get more responses and others will be able to find the answer more easily later.
I am also facing same issue, can you please help me.
The second loop is running on Current Item, which is an object, not an array. Not sure what order you added things in, but that Loop should not be there and isn't necessary.
Power Automate automatically add apply to each 2 when I add the email address of the LM on CC field of Send an email (V2). Please screenshot below.
See previous answer. The value you are using in the Apply to each 2 loop isn't an array its an object. You don't need the second loop.
I am also getting the same error.
The due data is an indifidual field, not an array. There shouldn't be a nested loop, just a single loop.
I have this easy problem but somehow i can't fix this. I need help. Thank you
I am getting this same error. I actually took all actions out of the nested for loop. So:
Apply to each: Value -> Apply to Each: Current Item
Then nothing in it.
Errors out.
Did you ever get this working?
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2