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 / Error building schedul...
Power Automate
Answered

Error building scheduled email

(0) ShareShare
ReportReport
Posted on by 12

Hi, I'm attempting to build a flow on a sharepoint list to send an automated email when an item has gone past it's due date however I am facing this error.

 

The expression "Due Date lt '2021-15-42'" is not valid. Creating query failed.
clientRequestId: 1799b375-1c42-4019-b462-d8fd6987e4d0
serviceRequestId: 1799b375-1c42-4019-b462-d8fd6987e4d0

 

Wondering if anyone could help me out with this? Thank you 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,784 Most Valuable Professional on at

    Hi @JamaalMoosa,

     

    Just to double check, your due date field in the SharePoint list is column of datetime type, correct?

     

    If so, you are comparing a datetime field with a string value. 

     

    When you are using this in a filter query of a Get Items action I would use the following expression instead:

    Due Date lt '@{formatDateTime('2021-12-30')}'

     

    Btw, I have change your date value too, because that is invalid 😉

  • JamaalMoosa Profile Picture
    12 on at

    Hi @Expiscornovus thank you for your response! 🙂 my due date is in the form mm/dd/yyyy picture also attached. 

    JamaalMoosa_0-1613398967620.png

    I tried inputting the expression you suggested but faced this error this time:

     

    Action 'Get_items' failed

    The expression "Due Date lt '2021-12-30T00:00:00.0000000'" is not valid. Creating query failed.
    clientRequestId: efda1e1e-1ccf-4fca-b846-c7181ef6336d
    serviceRequestId: efda1e1e-1ccf-4fca-b846-c7181ef6336d

     

    Any ideas?

  • Expiscornovus Profile Picture
    33,784 Most Valuable Professional on at

    Hi @JamaalMoosa,

     

    Can you check what the internal name of the field is? It might be DueDate instead of Due Date. Typically SharePoint removes spaces on creation.

     

    So the expression also might be the below instead:

    DueDate lt '@{formatDateTime('2021-12-30')}'

    checkname_field.png

     

    Also make sure you switch to the advanced mode when pasting the filter query. 

    internalnamefield_filterquery.png

     

  • JamaalMoosa Profile Picture
    12 on at

     

    Hi @Expiscornovus I have attached a picture below of the site name

    JamaalMoosa_0-1613407385635.png

    I did attempt the flow again also using the alternative site name but neither worked. Attached below is a picture of my input. Any ideas? Sorry to be a pain!

     

    JamaalMoosa_1-1613411141334.png

     

     

     

  • Verified answer
    Expiscornovus Profile Picture
    33,784 Most Valuable Professional on at

    Hi @JamaalMoosa,

     

    Just to double check. Are you still getting the expression error (Creating query failed). 

     

    Or do you mean that the flow is not sending an email for the items which are passed their due date?

     

    Btw, initially I thought you were comparing it with a fixed date. But if you want to see if the due date has passed this expression is probably a bit easier for the filter query

    DueDate lt '@{utcNow()}'

     

  • JamaalMoosa Profile Picture
    12 on at

    Hi @Expiscornovus 

     

    I inputted your recommendation and have successfully managed to get the flow working!

     

    Thanks a lot for all your help 🙂 

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 308

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 226 Most Valuable Professional

Last 30 days Overall leaderboard