Skip to main content
Community site session details

Community site session details

Session Id : K4y9yr/j5mcI/3B2PJjun8
Power Automate - Building Flows
Answered

Catch emails where Subject CONTAINS a phrase

Like (0) ShareShare
ReportReport
Posted on 11 Dec 2020 14:33:30 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
    4,266 Moderator on 09 May 2024 at 15:40:10
    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
    370 on 11 Jan 2021 at 09:23:01
    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
    3 on 10 Jan 2021 at 11:09:39
    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
    370 on 11 Dec 2020 at 14:52:38
    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
    10,127 Most Valuable Professional on 11 Dec 2020 at 14:41:33
    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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete