Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Flow not picking up expiry dates from imported SharePoint List

(0) ShareShare
ReportReport
Posted on by

Hello!

 

I really hope someone can help!

 

I had a flow which was working  - it was picking up the expiry dates that were equal to 56 days from now. I tried to replicate the same thing with a list that had been imported to no avail. My flow did work for items I entered manually, now it says the flow worked successfully but it says 'False'  in relation to items expiring within 56 days - I know that this is not the case - there are items with dates 56 days from now.

 

I was using an old template which gave me the option to edit the condition in advance mode so I attempted to use this again - as it didn't work with the data that had been imported I tried to build another from scratch - this worked for items 'less than or equals to' but the flow kept saying it was failing even though it was returning the items I needed.

 

Please see the screenshots below - something is wrong but for the life of me I can't figure out what. One flow has filter array - I can't remember why I used it but it was working with the list I had entered manually, the other flow is a simple 'get items', 'condition', send email. If you can advise me what the best practice would be I'd be ever so grateful. sub 1.PNGsend.PNG

 

Any help is appreciated.

 

filter1.PNGfilter2.PNG

  • Community Power Platform Member Profile Picture
    on at
    Re: Flow not picking up expiry dates from imported SharePoint List

    It works!!! Thank you both so very much. 🙂 

  • Verified answer
    v-bacao-msft Profile Picture
    on at
    Re: Flow not picking up expiry dates from imported SharePoint List

     

    Hi @Anonymous ,

     

    It seems that the date column contains an empty value, so this error display.

     

    And I noticed that you fill the output from Get item action, if so, the method provided by ScottShearer can achieve your requirements.

     

    Please try to configure Filter Query as follows:

    80.PNG

    Similarly, you could also use length() function to check if there are any eligible items.

    79.PNG

    Hope this helps.

     

    Best Regards,

  • Community Power Platform Member Profile Picture
    on at
    Re: Flow not picking up expiry dates from imported SharePoint List

    Hi Barry,

     

    I tried your approach but unfortunately I get the following error: 

     

    "The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@lessOrEquals(item()?['Employer_x0020_Liability_x0020_I'], formatDateTime(addDays(utcNow(), 56), 'yyyy-MM-dd'))' failed: 'The template language function 'lessOrEquals' expects two parameter of matching types. The function was invoked with values of type 'Null' and 'String' that do not match.'."

     

    Any ideas? 

     

    Thanks for your time. 

     

    FA.PNGFA2.PNG

  • v-bacao-msft Profile Picture
    on at
    Re: Flow not picking up expiry dates from imported SharePoint List

     

    Hi @Anonymous ,

     

    Maybe you could try the following configuration:

    Use Filter array to filter the eligible items and use length() function to check if there are eligible items in the body of Filter array.

    If the result of length() function does not equal to 0, send an email.

    Image reference:

    68.PNG

    Hope this helps.

     

    Best Regards,

  • Community Power Platform Member Profile Picture
    on at
    Re: Flow not picking up expiry dates from imported SharePoint List

    Hi Scott,

     

    Thanks for your help.  It would be amazing if I could get this to work, unfortunately I get the following message: 

    Get.PNG

      "status"400,
      "message""The string was not recognized as a valid DateTime. There is an unknown word starting at index 0. Creating query failed."
     
    em.PNG
    Any thoughts? 
     
    Thanks. 
  • ScottShearer Profile Picture
    25,236 Most Valuable Professional on at
    Re: Flow not picking up expiry dates from imported SharePoint List

    @Anonymous 

    The flow below should be very close to what you need.  The expression that I used can be seen in the action comments.  Please note the following:

    • Single quotes around my date expression are required
    • DueDate is the internal name of my date column.  This may/may not be the same as the display name.  To find the columns internal name, go to list settings and click on the column name.  The internal name will be at the end of the URL after Field=

    56Days.jpg

     

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Flow not picking up expiry dates from imported SharePoint List

    Thank you for your reply. 

     

    The only condition is for an email to be sent if a contract is due to expire 56 days from now. If I use the option less than or equals to I will get a number of emails sent through and that's not ideal. 

     

    Do let me know what works best. 

     

    Many thanks! 

  • ScottShearer Profile Picture
    25,236 Most Valuable Professional on at
    Re: Flow not picking up expiry dates from imported SharePoint List

    @Anonymous 

    I'm not sure what is causing your issue but I am pretty certain that the Flow can be made dramatically more simple.  What are your conditions?  The expiration date must be 56 days from today - do any other conditions apply?

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1