cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vermeiso
New Member

Send email to different adresses when different column says yes are no

Hey,

I Have a form that automatically creates an excel line and also sends email directly, that works!

But there are several questions with yes or no that are not related to each other. For some of those answers, I want to send them to a different email address. I can't use a switch function here for or conditions.

So :

If 1= Yes-->send it to e-mail 1 (don't care what the others are)

If 2= Yes-->send it to e-mail 2 (don't care what the others are)

If 3= Yes-->send it to e-mail 3 (don't care what the others are)

but what when answer 1 And 2, 3  are both Yes, 

Only the first is now working when i use conditons,

can somebody give me a hint?

2 ACCEPTED SOLUTIONS

Accepted Solutions
OliverR-82
Helper V
Helper V

Hi @vermeiso ,

 

If you only have 3 questions (or a relatively low number, anyway), I would just add 3 conditions. The first one checks for the answer to the 1st question and sends an email if answer is "yes", does nothing if answer is "no".

 

Second condition then checks answer to 2nd question: if answer is "yes" send mail, if "no", do nothing. Same thing for the third condition. Note that they should not be nested conditions like you currently have, they should be placed one after the other.

 

That is probably not the most efficient way of doing it. For example, it would send 3 separate e-mails if the answers to all 3 questions is "yes", rather than just sending 1 e-mail to all 3 mail addresses at once. But, if it's a flow that will only process a relatively low number of form submissions, then doing it this way might be enough to get the job done?

 

If you want to avoid sending multiple e-mails you could use a string variable that would contain the mail addresses to send to, and append to that string when the conditions are true. Then you could have a single "send an email" action at the end of your flow, instead of in each "yes" branch.

 

Does that make sense?

View solution in original post

v-jefferni
Community Support
Community Support

Hi @vermeiso ,

 

Am not sure if you have solve this problem, but @OliverR-82 's solution is correct for your scenario, the flow is like below because the 3 answers are not related among each other:

vjefferni_0-1636450748723.png

 

If you have solved the issue, please consider Accept that answer as the solution. If you have any other questions, please feel free to let us know.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

6 REPLIES 6
eliotcole
Power Participant
Power Participant

Could you let us see a (obfuscated) screenshot of your complete flow, please, @vermeiso?

vermeiso
New Member

vermeiso_0-1636134030125.png

 

OliverR-82
Helper V
Helper V

Hi @vermeiso ,

 

If you only have 3 questions (or a relatively low number, anyway), I would just add 3 conditions. The first one checks for the answer to the 1st question and sends an email if answer is "yes", does nothing if answer is "no".

 

Second condition then checks answer to 2nd question: if answer is "yes" send mail, if "no", do nothing. Same thing for the third condition. Note that they should not be nested conditions like you currently have, they should be placed one after the other.

 

That is probably not the most efficient way of doing it. For example, it would send 3 separate e-mails if the answers to all 3 questions is "yes", rather than just sending 1 e-mail to all 3 mail addresses at once. But, if it's a flow that will only process a relatively low number of form submissions, then doing it this way might be enough to get the job done?

 

If you want to avoid sending multiple e-mails you could use a string variable that would contain the mail addresses to send to, and append to that string when the conditions are true. Then you could have a single "send an email" action at the end of your flow, instead of in each "yes" branch.

 

Does that make sense?

View solution in original post

v-jefferni
Community Support
Community Support

Hi @vermeiso ,

 

Am not sure if you have solve this problem, but @OliverR-82 's solution is correct for your scenario, the flow is like below because the 3 answers are not related among each other:

vjefferni_0-1636450748723.png

 

If you have solved the issue, please consider Accept that answer as the solution. If you have any other questions, please feel free to let us know.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

eliotcole
Power Participant
Power Participant

Can I ask what container this is all in, currently?

 

It looks like it is in an Apply to each action, and I'm just curious if that's needed.

 

One thing that you can do with your 3 conditions for these emails is to place it all into a Scope action, and have it run in a parralel branch on your flow. This will mean that you can literally just put it to one side of your main flow and/or minimise it.

Thanks you for the solution

The different conditions are working with the or function

I'am just a novice in power automate

tx

 

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,226)