Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Multiple user mail id based on roles

(0) ShareShare
ReportReport
Posted on by

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) .

 

AdityaRana_0-1707727326486.png

 

for example : A,B,C has same role test..........user contain users datatype

 

Categories:
  • AdityaRana Profile Picture
    on at
    Re: Multiple user mail id based on roles

    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)

  • sonuomroutlook Profile Picture
    61 on at
    Re: Multiple user mail id based on roles

    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 

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard