web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / ToLower() fails with n...
Power Automate
Unanswered

ToLower() fails with null but the input isn't null

(0) ShareShare
ReportReport
Posted on by 106

I am building a flow that alerts me if an email arrives that has certain words in the subject or is urgent.

The flow fires when an email arrives, and then checks if any of those conditions are true.

 

It worked somewhat okay, but in testing I discovered that it is case-sensitive, so I need to convert it to lowercase before I check the strings.

 

And this is where I need help. I thought it would simply be toLower(triggerOutputs()?['body/subject']) but when I tried that I meet a failure.

 

The toLower() function I used was written by me first, but when I tried the "suggest function by examples" the system also suggested the same formula. The error says it found a null input but none of my inputs are null in this case (of course it does need to handle an empty subject or importance anyway).

 

Setup:

ShawnKeeneTF_0-1676309163184.png

 

 

Failure: Input is null.  The email subject and importance were not null.

ShawnKeeneTF_1-1676309417137.png

 

 

What am I missing?

PS another user with basically the question: Building an autoreply flow

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @ShawnKeeneTF 

     

    Add an AND condition first to evaluate its not null AND add all the other conditions with OR.

     

    Thanks

  • ShawnKeeneTF Profile Picture
    106 on at

    I'm sorry I'm not clearly understanding where to add that... but in my example case none of these were null so that really shouldn't have been the true problem, right?  My subject and importance fields were non-null in my test case.

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @ShawnKeeneTF 

     

    According to the error it is null. Did you checked the run history? Open the run history and inspect the trigger step. Check the values?

  • Verified answer
    wskinnermctc Profile Picture
    6,519 Moderator on at

    I just tested this multiple times even with a blank subject and the expression still worked. I double checked your expression and it appears correct to me.

     

    Can you try deleting your condition step and reapplying the expressions?

     

    Sometimes those boxes have previous expressions hidden in them that are hard to see. Like the expression might be applied twice or something in the same box but you can't see it.

     

    I can't tell why your flow is not working. 

  • ShawnKeeneTF Profile Picture
    106 on at

    Crazy that must have been it.  I just created a new condition step that is absolutely identical and now it works totally fine. Crazy. Well I appreciate your help and time no less at all, thanks for the quick discussion.

     

    ShawnKeeneTF_0-1676314342456.png

     

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @ShawnKeeneTF  @wskinnermctc 

     

    Think there is a bug in the flow designer that if you edit expression sometimes it won't update it for the first time. So always when you update an existing expression place your cursor over the expression and check via tooltip whether it is updated or not. If not edit the expression and update again. In my experience second time it always works. Something to remember next time.

     

    Glad to hear that all sorted.

     

    Thanks

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard