cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
adelev125
Regular Visitor

Delete flow when MS planner task has reached up to 3,000 tasks.

Hi All,

 

Is there any way to create a flow when number of planner task is over than 3,000? 

Because MS planner has limitation that the number of task is 3,000 then I'd like to create a flow to delete older and completed tasks automatically when the limitations are reached. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yujincui-msft
Community Support
Community Support

Hi @adelev125 ,

 

You can try to list all Tasks and count the total number, and then determine if you need to delete them.

I have made a test for you.

 

1.Create a flow.

add(add(length(outputs('List_tasks')?['body/value']),length(outputs('List_tasks_2')?['body/value'])),length(outputs('List_tasks_3')?['body/value']))
@and(less(item()?['dueDateTime'], utcNow()),not(equals(item()?['completedDateTime'], null)))
item()?['Id']

vyujincuimsft_0-1642471978394.png

vyujincuimsft_1-1642471978399.png

Details:

vyujincuimsft_2-1642471978403.png

Result Screenshots:

vyujincuimsft_3-1642471978407.png

vyujincuimsft_4-1642471978409.png

 

Best Regards,

Charlie Choi

View solution in original post

4 REPLIES 4
v-yujincui-msft
Community Support
Community Support

Hi @adelev125 ,

 

Do you want to automatically delete expired and completed tasks when the number of planner tasks exceeds 3000?

I have made a test for your reference.

length(outputs('List_tasks')?['body/value'])
@and(less(item()?['dueDateTime'], utcNow()),not(equals(item()?['completedDateTime'], null)))
item()?['Id']

vyujincuimsft_0-1642066196445.png

vyujincuimsft_1-1642066196453.png

vyujincuimsft_2-1642066196455.png

Result Screenshots:

vyujincuimsft_3-1642066196458.png

vyujincuimsft_4-1642066196459.png

 

 

Best Regards,

Charlie Choi

Hi Charlie!

It's really helpful solution for me. Thank you for your effort.

 

BTW, I have one thing to ask. 

In your flow, It seems to correspond to a task within a particular project after specifying a specific group of projects rather than listing the entire planner's task list, but may I modify the flow to correspond to the entire list of planner?

 

v-yujincui-msft
Community Support
Community Support

Hi @adelev125 ,

 

You can try to list all Tasks and count the total number, and then determine if you need to delete them.

I have made a test for you.

 

1.Create a flow.

add(add(length(outputs('List_tasks')?['body/value']),length(outputs('List_tasks_2')?['body/value'])),length(outputs('List_tasks_3')?['body/value']))
@and(less(item()?['dueDateTime'], utcNow()),not(equals(item()?['completedDateTime'], null)))
item()?['Id']

vyujincuimsft_0-1642471978394.png

vyujincuimsft_1-1642471978399.png

Details:

vyujincuimsft_2-1642471978403.png

Result Screenshots:

vyujincuimsft_3-1642471978407.png

vyujincuimsft_4-1642471978409.png

 

Best Regards,

Charlie Choi

YOU ARE THE BEST! 

 

Really appreciate it!

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,488)