The flow/PowerAutomate is as follows
PowerAutomateFlow
- Choose the GroupID and PlanID from Workspaces for List Task step
- Get plan details: PlanID = first(outputs('List_tasks')?['body/value'])?['planId']
- Tasks: From = outputs('List_tasks')?['body/value'] Map: Assignments = items()?['_assignments']
For Each Tasks
The reason to extract user profile/email from user ID is to create Metrics. Also, when trigger 'When new tasks is created' is used, it easy to extract the user profile from valueassignment but the use case, we can only use ListTasks as trigger can be manual.
Although below reference shares how to extract, extracting required part within a loop from JSON has become tricky. Please help us. Reference: https://powerusers.microsoft.com/t5/Building-Flows/Exporting-the-Assigned-To-user-ID-from-Planner/td-p/177310 https://powerusers.microsoft.com/t5/Building-Power-Apps/Listing-tasks-ASSIGNED-TO-a-certain-user-from-Planner-in/m-p/1783631#M452392
Reference: https://powerusers.microsoft.com/t5/Building-Flows/Exporting-the-Assigned-To-user-ID-from-Planner/td-p/177310 https://powerusers.microsoft.com/t5/Building-Power-Apps/Listing-tasks-ASSIGNED-TO-a-certain-user-from-Planner-in/m-p/1783631#M452392
Update
Basically, to grab user ID from the Tasks step
Update about concatenating users for each task
User profile left unchanged: items('ForEachTasks')?['Assignments']?[0]?['userId']



Since
'_assignments'is an array you will need to target the first one. Try something similar to: