cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Christy_Roach
Level: Powered On

Send emails to different people based on a form response

I feel like this is a very basic question but I am just learning powerapps and flow and all of the responses in the forum are close but not exact.  I've got a form built on a SharePoint list and based on the business line chosen in the form, I want an email sent to a specific person.  There are multiple choices but 3 people who will get all of the emails. 

 

I'm assuming it will be When an Item is created and then the condition if Business Line is equal to.  Just can't figure out where the email direction comes in. 

 

Please feel free to direct me to some training.  I'm trying to learn but am just stuck.  Thank you in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Send emails to different people based on a form response

@Christy_Roach:

 

Great!

Yes, you could add a condition for each option or you could use a Switch action instead - either way is OK.

 

If your issue has been resolved, please mark you post as Solved.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

5 REPLIES 5
Community Support Team
Community Support Team

Re: Send emails to different people based on a form response

Hi @Christy_Roach,

 

Do you want to send email to specific person based on user choice?

I have made the following flow for your reference.

In SharePoint list, there is a Choice column named as “YourChoice” with selections Test1, Test2 and Test3.

Then trigger the flow with When an item is created, in the send an email action, input the following code in the To field which will return specific email address based on user selection:

if(equals(triggerBody()?['YourChoice']?['Value'],'Test'),'test4@wicren.onmicrosfot.com',if(equals(triggerBody()?['YourChoice']?['Value'],'Test2'),'mabel@wicren.onmicrosoft.com','test2@wicren.onmicrofot.com'))

1.PNG

Please take it for a reference and try it on your side.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Christy_Roach
Level: Powered On

Re: Send emails to different people based on a form response

Hi Mabel - thanks for your help.  I must just be so uneducated on this that it just doesn't make sense to me, I'm sorry.  Attached is what I tried and it didn't work so I'll just have to keep trying.  I'm having trouble seeing the image you provided as an example so can't really follow the formula and am so new to this, I don't even know where to put the variables you list.  I guess I thought I could just use the building blocks within flow. 

 

To answer your question, if they choose x, y, or z business line an email goes to John Smith, if they choose a, b, or c business line the same message is sent but it goes to Mary Smith.  That kind of thing.screenshot1.png

Super User
Super User

Re: Send emails to different people based on a form response

@Christy_Roach:

I suspect that you'll see "Business line value" in dynamic properties.  Try using Busines Line Value rather than Business Line in your condition.  Please let me know if that works.

 

If this addresses your issue, please mark the solution from @v-yamao-msft as accepted.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Christy_Roach
Level: Powered On

Re: Send emails to different people based on a form response

Easy enough - thanks Scott - that worked! So now I just need to do that for each business line and I should be set. 

Super User
Super User

Re: Send emails to different people based on a form response

@Christy_Roach:

 

Great!

Yes, you could add a condition for each option or you could use a Switch action instead - either way is OK.

 

If your issue has been resolved, please mark you post as Solved.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,086)