web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Flow to update Sharepo...
Power Automate
Answered

Flow to update Sharepoint list on completion of Planner Task

(0) ShareShare
ReportReport
Posted on by 47

I have a Flow that creates a item in a Sharepoint List when a Task is created in Planner.

 

I then have a second Flow that is triggered whenever a Task is completed in Planner. ThatFlow gets items from the Sharepoint list and filters them by Planner Task ID and updates the Sharepoint List Item that relates to the task that has been created in Planner.

 

There are some circumstances where that second flow doesn't identify the original entry in the Sharepoint list.

 

Where this happens I would like the Flow to create a new item in the Sharepoitn list to state all the details of the Task that has been completed in Planner.

 

I cannot figure out how to write that part of the Flow that recognises when the Planner Task ID has not been found, so I can tell it to then create a new Sharepoint list item.

 

Can anyone help with how I can do this?

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @Walker,

     

    Could you please share a bit more about your SharePoint list?

    Could you please share a screenshot of your two flows' configuration?

     

    I have created a SharePoint list on my side and the data structure of it as below:2.JPG

    Note: Planner Task ID column is a Single line of text type column, Task Title column is a Single line of text type column, Start Date Time column and Due Date Time column are both Date type column, IsCompleted column is a Yes/No type column. The IsCompleted column indicates if the task is completed in Planner and the default value of it is No.

     

     

    • When a task is created in Planner, create an item in my SharePoint list:3.JPG

       The flow works successfully as below:4.JPG

       

     

    • When a task is completed in Planner, update the existing task item in my SharePoint list. If the corresponding task item doesn't exist, create a new task item in my SharePoint list to state all details of the task has been completed:
    1. Add a "When a task is completed" trigger.
    2. Add a "Get items" action, specify Site Address and List Name.
    3. Add a "Filter array" action, From set to output of "Get items" action, Within Condition box, left input box set to Planner Task ID dynamic content of "Get items" action, right input box set to Id dynamic content of the trigger.
    4. Add a Condition, click "Edit in advanced mode", type the following formula:
    @empty(body('Filter_array'))
    • Within "If/yes" branch of Condition, add a "Create item" action, IsCompleted field set to Yes.
    • Within "If/no" branch of Condition, add a "Apply to each" action, input parameter set to output of "Filter array" action. Within "Apply to each" action, add a "Update item" action, Id field set to following formula:
    items('Apply_to_each')?['ID']

    Title field set to following formula:

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

    IsCompleted field set to Yes.

     

    Image reference:5.JPG

     

    6.JPG

    The flow works successfully as below:7.JPG

     

     

    Best regards,

    Kris

     

     

  • Walker Profile Picture
    47 on at

    Kris - thanks a lot for taking the time to respond - I'm working through implementing this now and will report back once complete.

     

    In the meantime, can you explain more about the Filter array action, becuase to me it look slike this is doing the fundamental part I needed help with - determining if there is no positive return, and taking further action if that is the case.

  • faustocapellanj Profile Picture
    1,662 on at

    Hi @Walker

     

    This is straight from the Microsoft Flow documentation: 

    "Use Data Operations - Filter array to reduce the number of objects in an array to a subset that matches the criteria you provide."

     

    Here's the example provided in the documentation:

    You have the following array - 

    [{"first": "Deon","last": "Herb"},{"first": "K","last": "Herb"}]

     After you add the "Data Operations - Filter array" action to your Flow, configure it like the screenshot below.
    FilterArray.JPG
    Once your Flow runs, the filter array output should look like this:

    [{"first": "Deon","last": "Herb"}]

    Please let us know if you have any questions.

     

    Regards,

    Fausto Capellan, Jr

     

  • Walker Profile Picture
    47 on at

    Thanks Fausto.

     

    My original flow used a condition where I asked - does the ID of the Completed Task match the ID of a Task listed in the Sharepoint list - this meant I had 1 where it did, and all the other items counted as "No".

     

    I couldn't work out how to then generate a single new entry where there were multiple "No"s.

     

    I see now that the array/condition combination instead reduces the number of outcomes to either a single "Yes" or "No" if nothing is found (using the filter), and then checks the output array for whether there is an instance or there is nothing.

     

    Very neat.

     

    Many thanks for all the help both of you.

  • MikeW291 Profile Picture
    11 on at

    Hi

     

    In February 2018, you posted advice to this post

     

    https://powerusers.microsoft.com/t5/General-Power-Automate/Flow-to-update-Sharepoint-list-on-complet...

     

    I’m interested in duplicating this advice but when I get to point number 4 it seems that I have more options in the condition, see below

     

    MikeW291_0-1631028736882.png

     

     

     

    Can you suggest how to fill this in?

     

    I’m super new to Power Automate and have zero coding knowledge.

     

    Thanks

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 176 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 96 Super User 2026 Season 1

Last 30 days Overall leaderboard