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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Condition in Approval ...
Power Automate
Unanswered

Condition in Approval Flow (outcome based on optional input at trigger) failing

(0) ShareShare
ReportReport
Posted on by 41

I have an approval flow with an optional text input ("Message") at the trigger step.

 

lorinda_abey_1-1711345451928.png

 

In order to be able to include the message in an email later on in the flow without the flow failing (in the scenario the field is left blank), I have created a sequence of steps including initializing a variable, adding condition that checks if the message is null and then appending the string variable accordingly:

 

lorinda_abey_2-1711345701769.png

 

I then use the variable in my email message body.

 

This has worked perfectly for 2 approval flows, created late last year, which have been used by my team since January.

 

Today I tried to create another separate flow with the exact same steps / parameters and it is failing. I can't figure out why. Below is the error message I am getting:

 

lorinda_abey_3-1711345882625.png

 

I've gone back and retested the other 2 flows and confirmed everything is still working with these. I've also done a side by side check of the code behind the condition step. There are no differences between the one that works and the one that fails.

 

Any ideas what is going wrong?

 

Categories:
I have the same question (0)
  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @lorinda_abey ,

    Please show you a screenshot of the configuration in the trigger that causes your error.

    And you can put this expression to the left of the condition:

    triggerBody()['entity']

    Best Regards,

    Sunshine Gu

  • lorinda_abey Profile Picture
    41 on at

    Not sure what you mean by configuration?

     

    The second image in my original post shows the condition step that is failing. It uses the dynamic content "Message" from the trigger and checks if it is equal to null.

  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @lorinda_abey ,

    This error message indicates that the title of the text field entered in your trigger is not 'text'.

    vyetonggumsft_0-1711347363497.png

    The configuration screenshot I want to see means the individual parameters in your trigger.

    Like this:

    vyetonggumsft_2-1711348086477.png

    Best Regards,

    Sunshine Gu

     

  • lorinda_abey Profile Picture
    41 on at

    Still confused. The first image in my post shows the screenshot of the trigger from one of the flows.

     

    Posting another below:

    lorinda_abey_0-1711412559461.png

     

  • lorinda_abey Profile Picture
    41 on at

    I had identified the issue but I am still unclear why it is working in my old/existing flows and not working in this new one I am building.

     

    The issue seems to be that if no text is input at the trigger step, the raw output of the trigger has no "text" parameter:

     

    lorinda_abey_3-1711415398174.png

     

    As the condition step is checking if "@triggerBody()?['text']" is equal to "@null", it is failing because no "text" exists.

     

    My previous flows seem to be able to handle this without throwing up an error which is what makes it so confusing!

     

    I have resolved the error by adding in a Compose step with input: @{triggerBody()?['text']}. I am then using the Output from this Compose step in my Condition step:

     

    lorinda_abey_4-1711415653481.png

     

    New flow now works.

     

    If anyone can still tell me why it worked before, I'd appreciate it. I don't like mysteries!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 552

#2
Valantis Profile Picture

Valantis 388

#3
11manish Profile Picture

11manish 375

Last 30 days Overall leaderboard