Showing results for 
Search instead for 
Did you mean: 
Advocate II
Advocate II

How to get email address of existing group based on input variables in condition?

Hi All,


I am in the processes of building a notification flow and was wondering if anyone has any good articles on how to get an M365 Group based on a condition string. That can then be used in a notification email.


For example:




What I want to do it to send an email to a specific group of users based on a number of input variables set by a user.

If my Car Manufacturer = AUDI then send an email to an M365 AUDI Group already found on my tenant.


My question is how do I get the email address of an existing M365 Groups based on 2-3 input variables set by the end user? 


Any ideas?

Memorable Member
Memorable Member

@Alan78 Instead of using condition, you can use Switch case and based on user inputs you can send an email to particular use group. check below blog on how you can use switch case.

Search by service when you build flows and other new features 

Please click Accept as solution if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it ‌‌👍


Advocate II
Advocate II

Thanks for the suggestion... This would be really good for a simple flow but in my case it will make the flow incredibly complex with over 180 different senario and mail groups.

We have decided to use an Azure Function to simplify the flow and pass the required group to the flow. Then we will manage the Email template etc within the Power Automate flow.

Thanks for your input! 🙂

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (1,017)