cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Christy_Roach
Advocate II
Advocate II

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

@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

6 REPLIES 6
v-yamao-msft
Community Support
Community Support

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.

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

@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

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

@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
Ksims
Regular Visitor

Hoping I can tag onto this thread and get an answer. I am new to this and don't even know where to post a new question.  I have gotten as far as above with setting up the conditions, but I have a list with about 20 people on it that I need to pull from. I want the flow to look at the Supervisor name and send to that supervisor's email address. I had 8 completed, and when I got to the 9th, the "add action" icon is no longer present in the Yes and No boxes.  Do I need to use something other than conditions to send these emails because there are so many supervisors in my list?

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,262)