web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating planner task ...
Power Automate
Unanswered

Creating planner task from SP list based on a rotation.

(0) ShareShare
ReportReport
Posted on by 37

I am brand new to Power Automate. I have a flow set up to create planner tasks from a SharePoint list that logs new referrals. We have 4 teams that complete the tasks.

 

I need help creating a flow that will assign the tasks to each team based on a rotation (ie: team 1, team 2, etc). I have tried using an excel table that updates each time a task is created. However new items are put into the SharePoint list rapidly and the flow cannot keep up so it ends up skipping the rotation and/or creating multiple copies of the planner tasks. Does anyone know a better way to assign tasks based on a rotation and/or how to speed up the flow so it does not skip the rotation?

Categories:
I have the same question (0)
  • fchopo Profile Picture
    8,003 Moderator on at
    Re: Creating planner task from SP list based on a rotation.

    Hello @Megs_beach 

    You could do something like:

    1. Create an array with the team names using a Compose action.
    2. Get a team randomly, using the rand function, in another Compose action.

    Have a look at this sample:

    random.png

     

    The random function accepts two parameters (minimum and maximum value) (the array of teams starts at position 0).

    Hope it helps!

    Ferran

     

  • Megs_beach Profile Picture
    37 on at
    Re: Creating planner task from SP list based on a rotation.

    Thank you for the suggestion. I’m not sure if I placed the compose boxes in the right place, but when I tried it the flow only rotated between 2 of the 4 teams. 

    Below is the setup for my flow as it currently stands. The first compose lists all 4 teams following the example you provided. The second compose has the parameters at 0 and 3 (since there are a total of 4 teams). The conditions are set to determine if the 2nd compose = the team name and to create the task in that team’s planner if yes.

    E949D43F-03F6-4197-903D-77F5ED5A6FB3.jpeg

    Any suggestions for getting it to rotate through all 4 teams instead of just 2 teams? 

    thanks in advance!

  • fchopo Profile Picture
    8,003 Moderator on at
    Re: Creating planner task from SP list based on a rotation.

    Hello @Megs_beach 

    It should rotate! When testing the flow, don't reuse previous executions, and create a new execution each time (i had the same issue when testing it).

    Ferran

  • Megs_beach Profile Picture
    37 on at
    Re: Creating planner task from SP list based on a rotation.

    Okay, so I see how it’s assigning the tasks randomly. Do you know if it’s possible to have it assign them in a set rotation (I.e.: team 1, then team 2, then team 3, etc)?

     

    We are looking to have the tasks assigned in order vs randomly assigned so that we can keep workload even among the teams. 

  • fchopo Profile Picture
    8,003 Moderator on at
    Re: Creating planner task from SP list based on a rotation.

    Hello @Megs_beach 

    You could get the number of assigned tasks for each Team, and then assign it to the lowest one.

    Hope it helps!

    Ferran

     

     

  • Megs_beach Profile Picture
    37 on at
    Re: Creating planner task from SP list based on a rotation.

    @fchopo 

    That sounds like it could be a good option. Being new to power automate I’m not sure how to build that type of flow. Would you be able to provide an example?

  • fchopo Profile Picture
    8,003 Moderator on at
    Re: Creating planner task from SP list based on a rotation.

    Hello @Megs_beach 

    I attach an example / idea on how you could do it:

    1. Initialize an Array variable, where we store the user ids of the users who have assigned tasks.
    2. Get the Ids of ther users (Ferran and Patricia, in this example).
    3. List all the tasks of the plan.
    4. For each task, save the assigned users in the array.

    assignements_1.png

     

    After that:

    1. Filter the array for each possible user (parallel action).
    2. Count the number of items of the filter.

    assignements_2.png

     So at the end we have the number of tasks assigned for each user.

    Hope it helps!

    Ferran

  • Megs_beach Profile Picture
    37 on at
    Re: Creating planner task from SP list based on a rotation.

    @fchopo 

    I tried this idea; however, the team assignments are not associated with an email/userID. There is a single line of text column on the SP list that is for the team assignment and the tasks are separated into multiple MS Teams Planners (one for each team). 

    I have figured out a few different ways that should assign the tasks based on a rotation using an excel table that updates each time a task is assigned. The problem comes when you input several a items in the SP list at a time and the flow gets overwhelmed because the excel does not update fast enough. The SP list will be updated daily in the morning and may have as many as 20+ items added in a short period of time.

    So I am looking to see if there is any other way of setting the rotation or a way to adjust the process so that the excel table can update fast enough to keep up with the number/frequency of items being entered on the SP list. 

  • fchopo Profile Picture
    8,003 Moderator on at
    Re: Creating planner task from SP list based on a rotation.

    Hello @Megs_beach 

    If you have problems with the flow and the update of the excel file, you could try to use a "delay" action inside your flows.

     

    Hope it helps!

    Ferran

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard