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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send Email to random u...
Power Automate
Unanswered

Send Email to random users

(0) ShareShare
ReportReport
Posted on by 195

Hello Everyone,

 

Anyone can help me on my problem?

When an item is created, a survey will be sent out to random users from my team. I have 17 people on my team and the survey should only be sent to 5 random people every time a new item is created. The 5 selected people should not be the same as the previous days. Is this possible in Flow?

 

Many thanks!

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    on at

    Hi @anabananei ,

     

    What is currently achievable is to randomly extract five users, but there is no guarantee that these five people will not be duplicated, because Rand() function may get the same result in a small range.

    What's hard to achieve is that the second time the user to be sent, the previous user needs to be excluded.

    Because it is necessary to record the previous personnel, how to obtain it when the next execution of Flow is a difficult point.

     

    Anyway, I created a flow that randomly selects five users, you could use it as a reference.

    Create a list to record the user information, create a new Person type column to select user, and give each user a number, you could consider directly using ID as a number.

    42.PNG

    Flow configuration:43.PNG

     

    44.PNG

     

    45.PNG

     

    Please take a try.

     

    Best Regards,

  • anabananei Profile Picture
    195 on at

    Hi @v-bacao-msft ,

     

    I have tried your flow and it works. The only problem is that instead of 5 results it only gives me 4. I mirrored your flow exactly. What do you think seems the problem?

     

    Thank you,

    ANa

  • anabananei Profile Picture
    195 on at

    I tried changing the value of "minimum value" in random expression from 1 to 5 and it gave me 5 results. Do you think this is the correct workaround?

    Flow_random.jpg

     

  • Verified answer
    v-bacao-msft Profile Picture
    on at

    Hi @anabananei ,

     

    Yes, this problem has been mentioned in my previous post, because the range of values is relatively small, so rand() function may get the same value.

    And I use union() function to remove duplicate values, so you don't necessarily pick up five users.

    I have improved it, please refer to the screenshot below for improvement.

     

    Expression:

    length(union(variables('Email'),variables('Email')))

    10.PNG

     

    11.PNG

     

    Please take a try.

     

    Best Regards,

  • anabananei Profile Picture
    195 on at

    Works perfect! THank you!

  • erkindunyaWork Profile Picture
    30 on at

    Hi, 

    Thanks for the solution, is there any chance we only send email/ select  to single user, using 

    rand(1,2), and set field called Selected on user list using Update item to set it Yes, so we not select this user again
    by putting checkes before Get Item rand(1,2).
    ask.PNG

     

    many thanks
     
  • bbkbhattarai Profile Picture
    2 on at

    Hi,

     

    I am pretty new to using flow and still in learning phase. I was trying to do get one user from the list to get email randomly with details recorded from a form, asking them to complete a task based on that. 

    This thread seems like the one that will be useful for me, but since I am so new to flow, I could not carry out the steps as explained here. Will it be possible for you to explain the steps in more layman term please. I am trying to randomly select one member from our team to review other persons work. 

     

    The person who carries out the task will complete a Microsoft form and based on that, any random member from team, except the one who completed form, will receive an email to complete the review. It will be helpful to have follow up, if the reviewer does not complete the review in say a week time or so.

     

    Many thanks for your help in advance.

     

    Regards

    Bebek

  • JibblyGibbly Profile Picture
    44 on at

    I have a similar problem I’m trying to solve. 
    I am trying to create a power automate to ask a number and it displays N number of office 365 users at random from our Azure AD. 
    this comes in handy when we want to set up focus groups, create committee etc. 

     

    many help would be greatly appreciated. 

  • VictorIvanidze Profile Picture
    13,073 on at

    Hi @JibblyGibbly,

    and what's your problem?

    Did you try to reproduce the flow provided by @v-bacao-msft ? 

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard