Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Microsoft Flow is not working with filter expression

Posted on by 323

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
    Pradip Raj 323 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
    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
    Pradip Raj 323 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
    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
    Pradip Raj 323 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
    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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans