Skip to main content

Notifications

Power Platform Community / Forums / Building Flows / Catch emails where Sub...
Building Flows
Answered

Catch emails where Subject CONTAINS a phrase

Posted on by 111

I understand that "When a new mail arrives V3" Subject Filter only filters an EXACT phrase.

So to get only emails with certain phrase as PART of subject line I need somehow to apply contains() condition.

But how do I do it? Where?

Also, how do I transfer the "caught" emails to another folder?

Thank you!

  • eliotcole Profile Picture
    eliotcole 4,156 on at
    Re: Catch emails where Subject CONTAINS a phrase

    I know that this is an old one, but the best way to simply handle this would be to only trigger if the subject contains a certain phrase is to use a trigger condition.

    @contains(triggerBody()?['subject'], 'your lovely phrase')

    That is of course only viable if the phrase is known.

     

    But it also gives you the option of wrapping toLower() around both parts just in case of oddities.

  • mjburley Profile Picture
    mjburley 370 on at
    Re: Catch emails where Subject CONTAINS a phrase

    Make sure you choose the Or at the top where I have shown a box, or both conditions will need to be met.

     

    mjburley_0-1610356906058.png

     

  • N3cola Profile Picture
    N3cola 3 on at
    Re: Catch emails where Subject CONTAINS a phrase

    Hi, 

    picking up from the last feedback, I'd like to ask for your input as I am trying to do the same thing with the exception that I add new row in the condition with the intent to give an additional subject string as alternative to the first. 

    My objective is to move multiple emails with various subject strings, hence logically, by adding new rows with the same structure but every time with a different string content it should do the trick.

    It just does not work, no matter if I opt for 'And' or 'Or'. 

    Any idea?

    Thanks a lot.

     

  • Verified answer
    mjburley Profile Picture
    mjburley 370 on at
    Re: Catch emails where Subject CONTAINS a phrase

    Sounds like filtering on the subject is not really what you want if you want to catch emails with certain phrases in the subject. Maybe a condition like this?

     

    mjburley_0-1607698338982.png

     

     

  • tom_riha Profile Picture
    tom_riha 9,913 on at
    Re: Catch emails where Subject CONTAINS a phrase

    Hello @michaelshparber ,

    the 'Subject Filter' works as contains(), it doesn't look for exact phrase. Just put the string you want to look for directly in the filter as the actions asks.

    image.png

    For moving emails there's an action 'Move email'.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

September 2024 Newsletter…

September 2024 Community Newsletter…

Community Update Sept 16…

Power Platform Community Update…

Tuesday Tip #2 Global Search…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,243

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,555

Leaderboard