Skip to main content
Post a question

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Microsoft Flow is not working with filter expression

Like (0) ShareShare
ReportReport
Posted on 4 Jan 2021 09:27:53 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 08 Jan 2021 at 02:23:24
    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 07 Jan 2021 at 21:48:05
    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 06 Jan 2021 at 06:21:35
    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 05 Jan 2021 at 13:17:40
    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 05 Jan 2021 at 01:40:01
    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 04 Jan 2021 at 12:29:02
    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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,760 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans
Loading complete