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

MS Flow Conditions

I'm having a little difficulty with my Flow.  It should hopefully be pretty simple.

 

I have about 15 different software's in a dropdown but only have 1 that I need to send a different email out for.  What I am trying to do....

 

It is a workflow that runs on created or updated as we sometimes will need to update the announcement if there is an outage or issue to let people know it's been fixed.

 

If software dropdown contains the special software and status contains NEW - send out announcement email

If software dropdown contains the special software and status contains Resolved - send out resolved email

If software dropdown any other choice and status contains NEW - send out announcement email

If software dropdown any other choice and status contains Resolved - send out resolved email

 

I've tried almost 30 different condition set ups and it's keeps sending 2 emails for each.  I kind of have it working if using a switch condition but it seems a little overkill if i just have 1 choice where it has to send an email from a different team.

 

Below is what i have set for for NEW and NOT that software

condition.jpg

thanks!

D

1 ACCEPTED SOLUTION

Accepted Solutions
DCNehs
Level: Powered On

Re: MS Flow Conditions

I finally figured it out.  I had a difficult switch case before since i was having issues with the conditions but I FINALLY GOT IT.

 

1 workflow

4 conditions with a grouped condition

 

Now if Flow will hopefully soon let the email come from the person that created the new list item since I will probably very rarely need to send an announcement out.  I am at least able to add a note in the body of the email that it's sent on behalf of the person.  MS Groups dont allow you to send as them and we dont have a shared mailbox.  boo

 

Thanks for everyone's help.  It was all of the little things that you posted that got me where i needed to go and find what I was missing.

View solution in original post

6 REPLIES 6
Super User
Super User

Re: MS Flow Conditions

Hi @DCNehs , 

 

Do you have this action nested in an apply to each loop? In that case, it will send two emails as you have one Yes and on No condition actions for sending emails. Is that the way you are getting the emails? Or is it Two yes or Two No branch emails?

 

Thanks, 

DCNehs
Level: Powered On

Re: MS Flow Conditions

I dont have any loops set up.  If I Choose the 1 different software both the NEW and Resolved emails are going out.   Same for the other softwares.    I have 1 step to send out NEW emails and a second step to send out RESOLVED, but maybe i dont need that.

 

I'm guessing then that I do not want to have anything under NO.  Possibly the following then...

1.  If status contains NEW and Software contains SPOTS - send new special email

2.  If status contains Resolved and Software contains SPOTS - send resolved special email

3.  If status contains NEW and Software does not contain SPOTS - send normal new email for all other 14 softwares

4. If status contacts Resolved and Software does not contain SPOTS - send normal resolved email for all other 14 softwares (and coudl end up beign more)

 

Thanks!

Community Support Team
Community Support Team

Re: MS Flow Conditions

Hi @DCNehs ,

 

What are the column types of Software and Status? I assume both of them are of type Choice.

 

According to your second post, step3 and step4, I am not sure how do you want to send an email for all other 14 softwares. Could you share more light on this statement?

 

Btw, I have figured out a flow for your reference likes below.

 

In the following scenario, I am using a parallel branch for step1, step2 and step3, step4.

 

In the action Send an email, input the following code in the Subject field so that it displays new or resolved based on situation.

if(equals(triggerBody()?['Status1']?['Value'],'new'),'new','resovled')

 

Besides, there is a person or group column, from which I get the email address to send out the email.

1.PNG

 

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.
DCNehs
Level: Powered On

Re: MS Flow Conditions

I have it set up for created or updated list item since we will be updating the body and changed the status if we have an outage.

 

I have a dropdown for status.  Choices are NEW and Resolved

I have a dropdown for software or tool - there are currently 15 choices and more are expected to be added.  Since ONLY 1 choice needs to send an email from a shared mailbox and the others unfortunately have to be sent from me becasue it seems there is no way to be able to send from the person who actually created the announcement.  We know who it needs to go to and I have to set it up to send to 17 separate distribution lists. I'm not big on them all coming from me, but seems we are a bit limited with flow at this point and sending from the creator.

 

What is the difference between using your code in the subject and just dragging and dropping the columns for information i want to have in the subject?  Is there a benefit from using the code instead of the individual columns?

 

I think i might have to create 2 separate workflows?  1 for the special software and a second for the rest? I tried changing some stuff around and still getting both the new and resolved emails for each. 

 

If it's NEW then send an email

If it's RESOLVED send other email

Community Support Team
Community Support Team

Re: MS Flow Conditions

Hi @DCNehs ,

 

Thanks for updating.

 

I assume that you could consider using Switch case within one flow, instead of creating 2 separate flows.

 

More details about Switch case for your reference:

https://flow.microsoft.com/en-us/blog/search-by-service/

 

By the way, the code I used is to return “new” or “resolved” based on the status choice. You could also select the column value for the subject. They work the same in this situation.

 

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.
DCNehs
Level: Powered On

Re: MS Flow Conditions

I finally figured it out.  I had a difficult switch case before since i was having issues with the conditions but I FINALLY GOT IT.

 

1 workflow

4 conditions with a grouped condition

 

Now if Flow will hopefully soon let the email come from the person that created the new list item since I will probably very rarely need to send an announcement out.  I am at least able to add a note in the body of the email that it's sent on behalf of the person.  MS Groups dont allow you to send as them and we dont have a shared mailbox.  boo

 

Thanks for everyone's help.  It was all of the little things that you posted that got me where i needed to go and find what I was missing.

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 77 members 3,807 guests
Please welcome our newest community members: