Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Microsoft Flow is not working with filter expression

(0) ShareShare
ReportReport
Posted on by 327

Hello,

I am creating flow to create a case when we receive an email in shared mailbox using custom flow. I want to trigger a flow based on filter expression because I do not want unnecessary triggers for flows. I want to trigger a specific flow so I have added condition to check subject of email like To check "cancel" or "order" keyword of email subject.

On create or update of email...

Filter Expression = contains(subject,'%cancel%').  IF email subject contains "cancel" keyword then trigger a flow.

The above condition is not working. It's not triggering a flow. I have used xrmtoolbox to copy expression but still it's not working for me as per this video : 

https://www.youtube.com/watch?v=U_hXOFokymg

pastedimage1609751907154v1.png

Could you please help me on this.

Thanks

Pradip

  • Suggested answer
    Pradip Raj Profile Picture
    327 on at
    RE: Microsoft Flow is not working with filter expression

    Hi Rodrigo,

    Thank you very much for this. This is working like a charm.!!

    Yesterday, I tried this "toLower" function but it didn't work for me because of syntax - "toLower". "toLower" is not working in filter expression with "When a record is created, updated or deleted". Even in Microsoft doc and other community blogs the syntax is "ToLower" - docs.microsoft.com/.../workflow-definition-language-functions-reference which is not working with filter expression.

    "tolower" is working fine with filter expression. Syntaxt are as below : 

    pastedimage1610073155612v1.png

    Previously we tried the below "or" operator and it was working fine for me but it's case sensitive.

    contains(subject,'CANCEL') or contains(subject,'Cancel') or contains(subject,'cancel')

    Save my lots of time. Thank you again Rodrigo.

    Thanks

    Pradip

  • Verified answer
    Rodrigo Hentz Profile Picture
    on at
    RE: Microsoft Flow is not working with filter expression

    Hi Pradip sorry for the delay to answer.

    You can use tolower expression like my sample below. 

    contains(tolower(subject), 'cancel')

    pastedimage1610056047518v1.png

    Please let me know if this information helped on your question.

     

    Regards.

    Rodrigo Hentz

    Microsoft Support Engineer

  • Pradip Raj Profile Picture
    327 on at
    RE: Microsoft Flow is not working with filter expression

    Hi Rodrigo,

    I have removed filtering attributes and now it's working for me. Thank you for this.

    But I found that it is a case sensitive. For Example, I have check for contains(subject, 'cancel')  and if I send email with subject "Cancel" then it won't work.  Is their any workaround to achieve this.?

    Thanks

    Pradip

  • Suggested answer
    Rodrigo Hentz Profile Picture
    on at
    RE: Microsoft Flow is not working with filter expression

    I did a small test on my organization and the filter expression is ok. Maybe you have to remove the filtering attributes.

    If the importsequencenumber is not changed the flow will not run.

    My sample:

    pastedimage1609852645928v2.png

    pastedimage1609852578759v1.png

    Please let me know if this information helped on your question.

     

    Regards.

    Rodrigo Hentz

    Microsoft Support Engineer

  • Pradip Raj Profile Picture
    327 on at
    RE: Microsoft Flow is not working with filter expression

    Hi Rodrigo,

    I am good. thanks. you?

    I have tried all the possible combinations including trigger conditions from settings but it's not working for me.

    Thanks

    Pradip

  • Suggested answer
    Rodrigo Hentz Profile Picture
    on at
    RE: Microsoft Flow is not working with filter expression

    Hi Pradip how are you?

    Pradip, did you try to use only contains(subject, 'cancel') ?

    I mean, without the % character.

    Please let me know if this information helped on your question.

     

    Regards.

    Rodrigo Hentz

    Microsoft Support Engineer

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 149 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 57

#3
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 53 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans