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

Condition on Flow email subject

Hello,

I'm trying to build an email flow with some conditions on the subject, this is, if the subject contains AAA or BBB, or CCC, for example then... execute some action

 

In advanced mode something like this:

 

@contains(triggerBody()?['Subject'], 'AAA') or @contains(triggerBody()?['Subject'], 'BBB')

 

But I think my approach is completly wrong and I can't get this working.

 

Is this possible?

 

Thank's in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @josecardoso,

 

Could you please share a screenshot of your flow's configuration?

 

I think there is something wrong with the formula that you filled within Condition box, I have made a test on my side and please take a try with the following workaround:29.JPG

Within Condition box, click "Edit in advanced mode", type the following formula:

@or(contains(triggerBody()?['Subject'], 'AAA'),contains(triggerBody()?['Subject'], 'BBB'),contains(triggerBody()?['Subject'], 'CCC'))

The flow works successfully as below:30.JPG

More details about using expression in flow actions, please check the following article:

https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/

 

Best regards,

kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xida-msft
Community Support
Community Support

Hi @josecardoso,

 

Could you please share a screenshot of your flow's configuration?

 

I think there is something wrong with the formula that you filled within Condition box, I have made a test on my side and please take a try with the following workaround:29.JPG

Within Condition box, click "Edit in advanced mode", type the following formula:

@or(contains(triggerBody()?['Subject'], 'AAA'),contains(triggerBody()?['Subject'], 'BBB'),contains(triggerBody()?['Subject'], 'CCC'))

The flow works successfully as below:30.JPG

More details about using expression in flow actions, please check the following article:

https://flow.microsoft.com/en-us/blog/use-expressions-in-actions/

 

Best regards,

kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi all

I created a flow to take actions only if the emails subjects are specific words, but it seems it runs the flow for any email subjects. I used subject is "equal to" but that did not filter email subject neither. Based on what I read from other posts that should work. But I dont know where can be possible problem. Thank you if you can help me with that

Untitled3.png

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,393)