Announcements
I want to send mail to every user based on roles from the SharePoint list. Like if a,b,c have been assigned a test role then mail should go to all the users(a,b,c) .
for example : A,B,C has same role test..........user contain users datatype
Hi @AdityaRana ,
There are two ways to achieve this.
Use case 1. One consolidate email to all users of same role.
Use case 2. Individual email to user based on the role.
Step1: I'll take Instant Manual Power Automate example (Use case 1) (this can easily be Automated (Use case 2) or scheduled(Use case 1))
Get users of same role using "Get Items" and filter query Roles eq 'test'.
Use apply to each to get all emails in a String array semicolon separated to build a TO user list
Use switch case on Role value
Case 1 for "test" role
Have a proper suited email body for test role users
Case 2 for "nott" role
Have a proper suited email body for nott role users
If I've helped , please select this as solution.
Sunil Kumar @PowerTrainer @sonuomroutlook
LinkedIn: https://www.linkedin.com/in/powertrainer/YouTube: https://www.youtube.com/@PowerTrainer
Thanks for you response,
But can we filter the users without using filter query in get items because by using it will also affect my other users with different role.
It only shows test roles users.
Can we use filter array (Data operator to filter)
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.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 516
WarrenBelz 428 Most Valuable Professional
Valantis 292