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

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?

Super User
Super User

@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 I
Advocate I

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

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,157)