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

Forward an email from a shared mailbox if certain words are matched in the subject line

Hi all,

Flow newbie here.

 

I'm trying to build a flow that forwards a copy of an email from a shared mailbox to a specific person, when certain keywords in the subject line of the email are met.

It works fine when I only have one word as criteria, like this:Condition.png

However, if I add now more of the 'default' subject line, for example, B2B RFQ, Some Company name, then it will not run.

I have also tried this setup:

ANDFunction.png

I'm no good with expression, but I tried those as well, with no success.

Any tips & tricks would be greatly appreciated.

 

Thank you guys

1 ACCEPTED SOLUTION

Accepted Solutions
Mike19
Regular Visitor

Hi everyone,

I think I may have the solution:

 

possiblesolution.png

View solution in original post

7 REPLIES 7
tom_riha
Super User
Super User

Hello @Mike19 ,

place the test inside string() expression. That way you tell the condition that the whole string, including the spaces, is the string to look for.

string('some company name')

 image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
mjburley
Helper II
Helper II

I think you need OR rather than AND, so ensure your top group AND is OR.

 

mjburley_0-1607963962738.png

 

thank you @tom_riha, I tried it with the original subject line from the email, which looks like this:

string('Some Company Name & Something Comp'), but the result was 'False' and the email was not sent.

Mike19
Regular Visitor

Hi @mjburley ,

Thank you for your suggestion, same result, Expression result is 'false' and no email was sent...

 

mjburley
Helper II
Helper II

Can you add screenshots of the flow run to help diagnose?

Mike19
Regular Visitor

Hi @mjburley 

 

Certainly, my apologies,

 

Here is what I have under the conditions:

 

Conditions.png

 

and then the if 'Yes' is met:

 

IfYes.png

Problem is now, that everything that has B2B in the subject line, is being forwarded ....

Mike19
Regular Visitor

Hi everyone,

I think I may have the solution:

 

possiblesolution.png

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,517)