cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Assign planner tasks between a pool of people automatically?

I have a flow set up to take a new email from a group email box, create a planner Task and add any attachments to it.

 

I now want to incorporate into this way of working, automatic assigning of these tasks to a team of people.

 

So I have 6 people who will work on the tasks. As each new task is created I want the flow to assign one new task to user 1, the next new task to user 2, next to user 3 etc. and keep looping this through all 6 people, effectively evenly distributing the workload every time tasks are created.

 

I have a sharepoint list set up with the users microsoft ID number which I obtained from Delve profiles to put into the "add assigned users" field in the Task.

 

I'd also like to factor in holidays, for example in the sharepoint list I have an availability status of "Available" and " Not Available" so if we change the status of someone who is out of office to "Not Available" it takes them out of the loop of tasks being assigned until they are put back on "Available".

 

It feels like this should be possible to do using an array and some filtering maybe? but I'm new to flows and I can't quite get my head around how arrays are working to figure it out.

 

Does anyone have any ideas? 

 

Thanks

 

 

5 REPLIES 5
FoDelement
Continued Contributor
Continued Contributor

Hello  @Anonymous ,

 

Your idea of looping though the users will work, but flows cannot run forever, and it will "forget" what number it is at. I would suggest adding a column to your SharePoint list called "Next task" and set it to "1". Each time the flow runs, have it check that column and assign it to a variable. Based on that number assign the task using a switch. Then when the flow is over increment the variable by 1 and save it back to the SharePoint list.  But also check to see if it will equal 7, if it does, set it back to 1.

 

I hope this makes sense to you; it makes sense to me in my head.... but that's not always a good thing.

 

v-bacao-msft
Community Support
Community Support

Hi @Anonymous ,

 

I have the same opinion as @FoDelement 

From your description, if one email arrives, task 1 will be created then assign to a user 1; task 2 will be created then assign to user 2 when the next email arrives, and so on, right?

If so, you can follow these steps to meet your requirements:

  • Store these users emails into a SharePoint list, then create a column named "Availability".
  • Every time an email arrived, assign the task created to which Availability column has value "Available".
  • Assign "Null" to the Availability column of the current user's email address and "Available" to the next user's email address.
  • If someone out of office, you need to set the column Availability as "Not Available", assign "Null" will skip the user.

This is an example of a SharePoint list:

Annotation 2019-07-24 161710.png

This is the overall structure:

Annotation 2019-07-24 160655.png

These are illustration of the structural details, and the points that need to be noted are highlighted in the red line:

Step1:

Annotation 2019-07-24 160733.png

Step2:

Annotation 2019-07-24 160836.png

Step3:

Annotation 2019-07-24 160931.png

Step4:

Annotation 2019-07-24 161111.png

Step5:

Annotation 2019-07-24 161209.png

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank you for your input.

 

I followed the flow steps provided and the flow is now rotating between the 6 email addresses in the sharepoint list and assigning them the next task created, updating the availability status between "Available" and "Null".

 

When I set a user to "Not Available" to exclude them from the task distribution, the status is being overwritten by the flow and assigning it a new value of either "Available" or "Null", putting the "Not Available" person back into the rotation.

 

I considered simply deleting that user out of the sharepoint list manually temporarily and adding them back in upon their return, but I imagine this will then break the flow as a new sharepoint ID number will be assigned when they are added back in, taking it above 6?

Anonymous
Not applicable

Hello,

 

The above flow is good, but when we set an user to "not available" the flow doesn't skip the user instead it makes it available.

It is working great. Thanks for the efforts. I believe due to the clarity of the image some people might miss the do until part and add them in a stand alone actions. I used it for approvals and it's working great.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,231)