Showing results for 
Search instead for 
Did you mean: 
New Member

sharepoint list to planner - if completed, create a new, otherwise update the list

I have a list of tasks.

When I initiate the flow, I want the flow to go through each list item and create a planner task, then update the list with task id.


Next time I run the flow with the same list, I want it to check the task id from the list to the planner, and if the task is completed, create a new one. If not completed, I want it to update the list with any due date changes made in the planner.


Where I get stuck is checking if the task already exists and if completed. I tried many different combinations of conditions and apply to each, but nothing is working 😞 Also, sometimes it takes 4 hours before fail (there are 32 tasks on the list..)


Can someone help how I might structure the testing condition?

Community Champion
Community Champion

Four hours before a failure!? Ack. Something must be awry...

Let's see. So, to mimic your need, I've created an SP list with Title | TaskID | DueDate. You've said that you're only having issues with checking the Task ID / changes, so I'm going to pre-populate my list with some tasks. 

Step 1) Manual flow. I'm guessing you'd probably schedule this. Either works. First thing I'm going to do is get my SP Task list. (Right now I'm going to pretend that the ones in SP are deleted when they're completed - in reality, you'd filter based on the status you're capturing / setting.) 

Step 2) "Get a Task" action. As soon as I point it to my TaskID from my SP list, it will turn into an Apply to Each - which is what we want, since we want it to do it for each item.

Step 3) A condition - "If Percent Complete is equal to 100" - if yes, Create a Task, and then of course update the TaskID in the current row of the SPList.  If no, then, update DueDate in the SP Task list with the DueDate of the Planner Task. (You could either just update it every time, regardless of if it's the same - or - you could check first and only update if it's different.)

I think that's it... 

It would end up looking kind of like this:




Thank you so much! I was very close to this haha but your solution is much simpler.


However, I realised something else might be going on behind my failed attempts? It turned out, all this time, the error message I was getting was 502 bad gateaway (when it takes 4+ hours).


Do you know why it might be experiencing such error? I tried with your solution and still took 4+ hours to fail. Upon assessment, No condition part seems fine. But create a task will end up with 502 bad gateaway in all occasions.

Community Champion
Community Champion

To create an item in SharePoint? Maybe sign out and back in again? Though I have noticed today especially that Power Automate is suuuper slow. How long have the fails been going on for? Do you have failure points in other flows with the same type of connectors?

To create a task in planner. That's where my flow always fail with bad gateaway 502. I will log out and log in again and see if that makes it work!

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.

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 (3,081)