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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Match User to another ...
Power Automate
Unanswered

Match User to another User but not overlapping.

(0) ShareShare
ReportReport
Posted on by 407

Hi all,

 

I’ve been tasked with a very interesting process to automate the following process using Power Automate and a SharePoint list.

I have a list of users that need to be matched with another user every week and send out a communication to both the user and the assigned to.

 

The idea is to match them every week, but not match it with the previous user until they’ve been assigned to each other. Then it will start assigning them again from the beginning.

 

So if User1 was assigned to User2, User1 should not be assigned to User2 again until it’s been assigned to User3, User4, User 5 and so on until User 10, then it can be assigned back to User2.

 

Users cannot be assigned to themselves either. User1 to User1

 

User

Assigned To

User1

User2

User2

User3

User3

User4

User4

User5

User5

User6

User6

User7

User7

User8

User8

User9

User9

User10

User10

User1

  

Has anyone done anything like this before? I’m having a hard time wrapping my head on how to automate this.

Thanks

Categories:
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @_sourcecod3_ 

     

    I have few doubts around this 

     

    1. Since the process is running weekly, does the user assignment should be done from start itself.

    For example 

    in week1 

    User 1 is User 2

    in week 2

    User 1 should be assigned to User 3 /User 4 .. but not user 2 again ?

     

    Is it something like you need to achieve ?

     

    Also how list data is stored? is it in seperate list ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    Chriddle_1-1712681769613.png

     

    Date is a Compose with the current date (Here it is hardcoded for testing purposes. Just add utcNow() later.)

     

    2024-04-09T00:00:00.0000000Z

     

    Users is a Compose with the User array, representing the SP list values

     

    [
    	"User 0",
    	"User 1",
    	"User 2",
    	"User 3",
    	"User 4"
    ]

     

    Shift is a Select that calculates the shift between "User" and "Assigned To".

    To do this, the number of weeks is determined and calculated modulo the number of possible shifts.

     

    add(
    	mod(
    		div(
    			if(
    				contains(
    					dateDifference(
    						'2024-01-01T00:00:00.0000000Z',
    						startOfDay(outputs('Date'))
    					),
    					'.'
    				),
    				int(
    					split(
    						dateDifference(
    							'2024-01-01T00:00:00.0000000Z',
    							startOfDay(outputs('Date'))
    						),
    						'.'
    					)[0]
    				),
    				0
    			),
    			7
    		),
    		sub(length(outputs('Users')), 1)
    	),
    	1
    )

     

    Select creates the User/Assigned To objects

    From

     

    range(0, length(outputs('Users')))

     

    Map User 

     

    outputs('Users')[item()]

     

    Map Assigned To

     

    outputs('Users')[
    	mod(
    		add(item(), outputs('Shift')),
    		length(outputs('Users'))
    	)
    ]

     

     

    Chriddle_2-1712681800141.png

     

  • _sourcecod3_ Profile Picture
    407 on at

    Hi @Nived_Nambiar , yes that would be ideal.

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Ok one question here

     

    if there are 5 users , user1, user2, user3, user4 and user5 

     

    then first week assignment should be 

     

    user 1 assigned to user 2

    user 2 should be user 3

    user 3 should be assigned to user 4 

    user 4 should be assigned to user 5 

    user 5 assigned to user 1?

     

    should it be like this ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • _sourcecod3_ Profile Picture
    407 on at

    Hi @Nived_Nambiar correct.

  • _sourcecod3_ Profile Picture
    407 on at

    Hi @Chriddle I will give this a try and let you know. 

  • _sourcecod3_ Profile Picture
    407 on at

    Hi @Chriddle , bypassing the dates, how would I accomplish this?

  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    bypassing the dates, how would I accomplish this?

    Sorry, I don't understand the question.

    Why bypass the date, if you want to make a change every week?

     

  • _sourcecod3_ Profile Picture
    407 on at

    Hi @Chriddle , I can do the date manipulation on a different action within the flow. So that when the flow is scheduled to run, let's say every Monday, it'll run for that week and so on. 

     

    So the flow will just map users with other users they haven't been mapped with. Then the following week it'll do the same thing.

  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    There is no date manipulation in my flow. Only the weeks from January 1, 2024 are counted (this is just a random starting point) to determine what “shift” is required.

    If you don't use something as described above, you have to store the shift permanently in order to be able to calculate the shift in the next run.

     

    If you have already calculated the shift elsewhere in your flow, simply remove Compose "Date" and replace the expression in Compose "Shift" with your integer.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 299

#2
11manish Profile Picture

11manish 274 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard