Skip to main content

Notifications

Power Automate - General Discussion
Answered

syntax of Mail filter subject query

(0) ShareShare
ReportReport
Posted on by 19

I am using the When a new email arrives in a shared mailbox action and want to filter out emails with the specific keyword in the subject. I tried Subject filter field but whatever I put there the action will work for any email subject. 

I want to filter only those email. Email Subject always starts with BE 

BE21080245-20210813A-OSL-Final.

BE21080323-20210818A-Final.

BE21080244-20210812B-OSL-Final.

BE21080240-20210812C-OSL-Au Results

Can anyone help me how to filter those emails.

 

@eric-cheng @ScottShearer 

  • Re: syntax of Mail filter subject query

    @eric-cheng 

     

    Can @shantanu97 use multiple triggers too? Or does the subject has to match all Conditions? And vs Or.

     

    2021-08-31_07-51-05.png

  • Verified answer
    eric-cheng Profile Picture
    eric-cheng 5,171 on at
    Re: syntax of Mail filter subject query

    Hi @shantanu97 ,

     

    I just tried using the subject filter and it triggered only when the subject contained BE.  The only issue is that it will trigger with any subject with the letters BE e.g. THERE IS A BEE

     

    ericcheng_0-1630390398915.png

     

    You can also specify a trigger condition.  The below formula should only allow emails starting with BE to trigger.

     

    @equals(substring(triggerBody()?['subject'],0,2),'BE')

     

    ericcheng_1-1630391250950.png

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

     

     

  • shantanu97 Profile Picture
    shantanu97 19 on at
    Re: syntax of Mail filter subject query

    @Merco How to filter emails with subject start with "BE" and ignore any other email. Because the email subject always start with BE

  • Re: syntax of Mail filter subject query

    Isn't it an idea to use the Switch control instead?

     

    2021-08-30_23-03-22.png

     

    Mark solved if this answers your question. Thank you.

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,691

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 65,019

Leaderboard