Showing results for 
Search instead for 
Did you mean: 
Not applicable

Nested data confusion


I am trying to extract a list of tasks and their assigned owners from a Planner.

I am using an input variable to specify which bucket and the iterate through the tasks appending task names and due dates to a string variable in JSON format.  This bit is fine, but then I want to include the list of assignees, looking up the user name with the Office365 User Details connector.  Because each task can have multiple assignees I have to iterate through these looking up one name after another and this is where I come unstuck.

I get the following error:

Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Append_to_string_variable' at line '1 and column '7931' cannot reference action 'Get_user_profile_(V2)'. The action 'Get_user_profile_(V2)' is nested in a foreach scope of multiple levels. Referencing repetition actions from outside the scope is supported only when there are no multiple levels of nesting.'.'.
There seem to be several options to choose from int the dynamic content, how do I know which to select?




This is what this section of the flow looks like:



Any help much appreciated.

Community Support
Community Support

Hi @Anonymous 


I think you are missing an action to check the details of the task that you are iterating on, I did it like this.




I included the action "Get a task" to check the details of the task, then in "Get user profile" I used the dynamic content below.



I also think the append action should be inside the "apply to each" to add all the users.


Hope this help you.

Best regards. 


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,536)