cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

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:

 

Alan78_0-1604060864787.png

 

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.
EG: 

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?

2 REPLIES 2
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 ‌‌👍

 

Frequent Visitor

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

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (44,680)