Skip to main content
Community site session details

Community site session details

Session Id : ePLCqqlTpffYQGax/AesPk
Power Automate - Building Flows
Answered

Get completed planner task’s description and the user is for who completed it

Like (0) ShareShare
ReportReport
Posted on 15 Oct 2020 23:17:47 by 37

I have a flow that starts when a planner task is completed. It finds the description and the assigned users and inputs that information in a SharePoint list. The problem is that the flow seems to pull the name(s) of whoever was assigned AND who completed the task. 

I'm looking for help with fixing the flow so that it either pulls only who was assigned at the time it was completed OR the user ID of whoever completed the task.

 

I’ve tried using compose with the expression: triggerBody()?[‘completedBy’]?[‘user’]?[‘id’] to find the user id for who completed the task, but keep getting a failed response. 

Any help that can be provided is greatly appreciated!

  • Verified answer
    Megs_beach Profile Picture
    37 on 20 Oct 2020 at 22:55:34
    Re: Get completed planner task’s description and the user is for who completed it

    @Anonymous 
    thank you! I was able to fix the flow so it only puts 1 name in the column now. 😊

     

  • Community Power Platform Member Profile Picture
    on 20 Oct 2020 at 13:36:51
    Re: Get completed planner task’s description and the user is for who completed it

    @Megs_beach 

     

    You need to set your String variable to null at the end of each loop.

     

    Append just means "Add". So the first time through the loop, the value of the variable is null and gets "user1" added to it for a final value of "user1".

    The second time through the loop, the value of the variable is "user1" and gets "user2" added to it for a final value of "user1user2".

    if you set the string variable to null before it iterates through the loop again, that should solve this problem

     

    please let me know if you have any questions.

     

    thanks,

    Kyle

  • Megs_beach Profile Picture
    37 on 19 Oct 2020 at 12:29:29
    Re: Get completed planner task’s description and the user is for who completed it

    @Amanthaper 

     I can’t do pics right now, but the flow runs like this:

     

    1. when a planner task is completed

    2. initialize variable for the user id

    3. Apply to each:

        A. “Get task details” for the task completed

        B. “Compose” to get the description from the planner task

        C. “Get user profile (V2)” to get the if of you completed the task. This uses an expression of: item(‘Apply_to_each’)?[‘completedBy/user/id’]
         D. “Append to sting variable” for the display name

         E. “Get items” from a SharePoint list

         F. “Apply to each”/“Condition” - does the value in the Planner ID column on the SP list match the planner task id

        If yes:

          1. Update the SP list item with the display name of who completed the task and the description 

          2. Create a new SP item on a new SP list and copy the information from the item that was updated

          3. Delete the item from the first SP list. 

    All of the concurrencies from top to bottom are set to 1. The problem I get is that when I complete multiple tasks at the same the column where it puts the name of who completed the task gets multiple names after the first task (I.e. the first take update gets only 1 name, the 2nd task updated gets 2 names, the 3rd gets 3 names and so on). The flow works great if you’re only completing 1 task at a time, but it’s more likely that several tasks will be completed at the same time.

  • Amanthaper Profile Picture
    441 on 16 Oct 2020 at 19:37:03
    Re: Get completed planner task’s description and the user is for who completed it

    Can you please post some pics of your flow and planner tasks and what seems to be the issue? Something seems amiss. There should only be one completed user regardless of multiple people assigned to a task and if you're using the expression in an apply to each loop then you should only get back one result. Let's take a look at your flow.

  • Megs_beach Profile Picture
    37 on 16 Oct 2020 at 17:54:45
    Re: Get completed planner task’s description and the user is for who completed it

    Thank you for sharing this information. I figured out how to adjust the expression to find the user id of the user who completed the task. 

    My issue now is that it pulls the same user name multiple times when several tasks are completed at the same time. I have all concurrancies set at 1, but that does not seem to help. Any suggestions on how to keep it from pulling the name multiple times?

  • Amanthaper Profile Picture
    441 on 16 Oct 2020 at 16:55:19
    Re: Get completed planner task’s description and the user is for who completed it

    removed

  • Megs_beach Profile Picture
    37 on 16 Oct 2020 at 15:03:42
    Re: Get completed planner task’s description and the user is for who completed it

    @Amanthaper, that may work. I am new to power automate and not familiar with the Parse JSON. Would you be able to provide more instruction on how to set up the flow? I tried to follow the picture, but I think I’m missing something.

     

    thanks in advance for your help!

  • Amanthaper Profile Picture
    441 on 16 Oct 2020 at 14:42:31
    Re: Get completed planner task’s description and the user is for who completed it

    removed

  • Megs_beach Profile Picture
    37 on 16 Oct 2020 at 12:58:42
    Re: Get completed planner task’s description and the user is for who completed it

    @Amanthaper 

    So my current flow will show who was assigned to the task, but it seems to also show anyone who was ever assigned to the task and the user id of who completed the task.

     

    If possible, I need to limit this to ONLY the last person assigned or the person who completed the task, not all users.

     

    @v-bacao-msft 

    I attempted to use the expression you provided but got the same error message (copied below):

    ”The ‘inputs.parameters’ of workflow operation ‘Get_user_profile_(V2)’ of type ‘OpenApiConnection’ is not valid. Error details: The resolved string values for the following parameters are invalid, they may not be null or empty: ‘id’”

     

     

    any other ideas?

  • v-bacao-msft Profile Picture
    on 16 Oct 2020 at 05:31:40
    Re: Get completed planner task’s description and the user is for who completed it

     

    Hi @Megs_beach ,

     

    You could use the expression to get Completed by user id and get the user profile:

    triggerOutputs()?['body/completedBy/user/id']

    114.PNG

     

    Best Regards, 

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete