cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mstohry
New Member

Delete Tasks in Project Online

I'm trying to build a flow that automatically deletes completed tasks that are more than 30 days old. I found this one https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Remove-Delete-Completed-Tasks-in-Planner/id... but I'm unsure how it can be modified to be used with Project Online.

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @mstohry,

 

Just to double check. You are talking about an Enterprise Project with tasks like in the screenshot below?

 

enterpriseprojectplan.png

 

If so, first of all I wouldn't recommend deleting completed tasks. If you are using the baseline functionality you will probably loose tracking functionality when you delete tasks.

 

Nevertheless, there should be REST API endpoints which you can use to interact with Project Online Projects. I believe a lot of the methods from Project Server 2013 are still usable:

https://github.com/akordowski/Project-Server-Resources/blob/master/Project%20Server%20REST%20API%20E...

 

Keep in mind that you need to checkout a project first before you can edit, save and publish it again. So this would be several HTTP requests. 

 

Below is an example of an such an Send an HTTP request to SharePoint which consume the Get Projects method.

 

getprojects_pwa.png

 

Hope this helps a bit?

 

View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @mstohry,

 

Just to double check. You are talking about an Enterprise Project with tasks like in the screenshot below?

 

enterpriseprojectplan.png

 

If so, first of all I wouldn't recommend deleting completed tasks. If you are using the baseline functionality you will probably loose tracking functionality when you delete tasks.

 

Nevertheless, there should be REST API endpoints which you can use to interact with Project Online Projects. I believe a lot of the methods from Project Server 2013 are still usable:

https://github.com/akordowski/Project-Server-Resources/blob/master/Project%20Server%20REST%20API%20E...

 

Keep in mind that you need to checkout a project first before you can edit, save and publish it again. So this would be several HTTP requests. 

 

Below is an example of an such an Send an HTTP request to SharePoint which consume the Get Projects method.

 

getprojects_pwa.png

 

Hope this helps a bit?

 

Thanks @Expiscornovus! Ok, much more complex than with Planner. My main objective was to clean up the All Tasks view so I could see open tasks with greater ease (I'm mainly using the task view and not the Gaant chart). Looks like manually doing it is the way to go.

Helpful resources

Announcements
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 (4,629)