Skip to main content

Notifications

Power Automate - General Discussion
Answered

Invalid Expression in a condition

(1) ShareShare
ReportReport
Posted on by 22

I am trying to sync a List calendar with an Outlook calendar and created a condition that creates an event in the Outlook calendar when the Approval status is equal to Approved. However, I keep getting an invalid expression(s) in my condition when trying to save my flow.

If anyone can help, please let me know. Thank you!

 

Best,

Michael S.

  • Mikesal1724 Profile Picture
    Mikesal1724 22 on at
    Re: Invalid Expression in a condition

    InvalidTemplate. Unable to process template language expressions in action 'Create_event_(V4)* inputs at line 'O' and column '0: 'The template language function formatDateTime' expects its first parameter to be of type string. The provided value is of type "Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.

     

  • Mikesal1724 Profile Picture
    Mikesal1724 22 on at
    Re: Invalid Expression in a condition

    One or more Fields Provided is of type 'Null', a different type is expected.

     

    Thank you again for all your help!

     

  • Akshansh-Sharma Profile Picture
    Akshansh-Sharma 281 on at
    Re: Invalid Expression in a condition

    what's the error message? 

     

  • Mikesal1724 Profile Picture
    Mikesal1724 22 on at
    Re: Invalid Expression in a condition

    It works but now I am a flow run failed error, 

     

  • Akshansh-Sharma Profile Picture
    Akshansh-Sharma 281 on at
    Re: Invalid Expression in a condition

    @Mikesal1724 

     

    the start date parameter of Create Event action expects it's value to be of DateTime type can you please use this experession as a value for that property and see how it plays out

     

    formatDateTime(triggerOutputs()?['body/StartDate'], 'yyyy-MM-ddT08:00')

     

    Update the time value as per your requirements 

     

    --------------------------------------------------------------------------------------------------------------------

    Please click Accept as solution if my post helped you solve your issue. If the content was useful in other ways, please consider giving it Thumbs Up 😉

     

    LinkedIn- https://www.linkedin.com/in/akshansharma/

  • Mikesal1724 Profile Picture
    Mikesal1724 22 on at
    Re: Invalid Expression in a condition

    Hey, so switching to the old designer helped with the condition error; however, now I am receiving an error for the start time. I used the dynamic content start date, but I received an error. I tried writing the function 'String/date-no-tz': '@triggerBody()?['StartDate']', but it says the expression is invalid

  • Mikesal1724 Profile Picture
    Mikesal1724 22 on at
    Re: Invalid Expression in a condition

    Hey, so switching to the old designer helped with the condition error; however, now I am receiving an error for the start time. I used the dynamic content start date, but I received an error. I tried writing the function 'String/date-no-tz': '@triggerBody()?['StartDate']' but it says the expression is invalid

  • Akshansh-Sharma Profile Picture
    Akshansh-Sharma 281 on at
    Re: Invalid Expression in a condition

    sure let me know how you get on with it

     

    --------------------------------------------------------------------------------------------------------------------

    Please click Accept as solution if my post helped you solve your issue. If the content was useful in other ways, please consider giving it Thumbs Up 😉

     

    LinkedIn- https://www.linkedin.com/in/akshansharma/

  • Mikesal1724 Profile Picture
    Mikesal1724 22 on at
    Re: Invalid Expression in a condition

    Yeah, I used the correct dynamic content. I will try using the old designer and see if that helps. Thanks!

  • Verified answer
    Akshansh-Sharma Profile Picture
    Akshansh-Sharma 281 on at
    Re: Invalid Expression in a condition

    Hi @Mikesal1724 

     

    Can you please tell me what is the type of your Approval status column in sharepoint? if it is Choice then please make sure you selected the correct dynamic content i.e. Approval Status Value otherwise it won't be able to refer the value of your column

     

    if you selected the correct dynamic content, please open your flow in the old designer and remove the dynamic content add it again and then try to save it, New Designer can be unexpected some times 😅

     

    --------------------------------------------------------------------------------------------------------------------

    Please click Accept as solution if my post helped you solve your issue. If the content was useful in other ways, please consider giving it Thumbs Up 😉

     

    LinkedIn- https://www.linkedin.com/in/akshansharma/

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard