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?

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


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?

 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,670)