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 / Comparing dates from e...
Power Automate
Answered

Comparing dates from excel online business with Today

(0) ShareShare
ReportReport
Posted on by 9

Hi everyone, 

 

I have been trying to create a flow that allows me to send automatic emails according to a certain date. The idea is to automatically trigger an email to the customer warning their license will expire. I originally tried creating the flow with the expiration date but without success, so I tried to "simplify" by creating the 'Send Reminder' column with the idea of using a condition to compare to today's date. However, that failed too.

PedroSalmeron_0-1666374473755.png

The idea is to use an if condition to read the 'Send Reminder' table daily and if the dates match, an email will be sent to the respective customer.

 

I am aware of the data format from excel being an integer and converting the date is key for this flow. Could someone help me with this flow?

 

Thank you in advance,

Pedro

 

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    Below is how I would likely create the flow. I'll go into detail on all the actions.

    grantjenkins_0-1666403635406.png

     

    For this example, I'm using the following Excel file that has just Customer and Expiration Date.

    grantjenkins_8-1666405054890.png

     

    Reoccurrence would just be set to 1 day.

    grantjenkins_1-1666403692522.png

     

    I would then use Get future time to get the date one month from today.

    grantjenkins_2-1666403752311.png

     

    Next, I'd use Convert time zone to ensure it's comparing the date to my actual time zone with the format yyyy-MM-dd (to compare against the Excel dates). In this example I've set it to Brisbane.

    grantjenkins_4-1666403849193.png

     

    In the List rows present in a table there are two parts to look at.

    1. Go into the advanced settings and set DateTime Format to ISO 8601 to get a proper date returned and not just the number representation.
    2. If your Excel column for Expiration Date didn't have spaces (Expiration_Date for example) then you could setup a Filter Query to only retrieve the records that are equal to the Converted time zone date, but it doesn't handle column names with spaces (your column does). So, in your case, I'd just return everything then use a Filter array to filter out to only the ones you want (see next action).

    grantjenkins_5-1666404119069.png

     

    Filter array takes in the records returned from List rows present in a table and checks to see if each date is equal to the date from Converted time zone. We need to format the Excel date using the following expression so it's also in the format yyyy-MM-dd.

    formatDateTime(item()?['Expiration Date'], 'yyyy-MM-dd')

    grantjenkins_6-1666404358984.png

     

    Finally, you can loop over each of the items from your Filter array and send an email. The input for the Apply to each is using the Body of the Filter array. And each of your properties would be in the format:

    items('Apply_to_each')?['Excel Column Name']

    For example:

    items('Apply_to_each')?['Customer']
    items('Apply_to_each')?['Expiration Date']

    grantjenkins_7-1666404983478.png

  • PedroSalmeron Profile Picture
    9 on at

    Hi Grant,

     

    Thanks for your answer.

     

    Unfortunately, I couldn´t get to work the way I wanted. I believe the dates are now sorted in the correct format but the final part with the ´Parse JSON´ I don't get it. Could you please clarify this part please?

     

    Besides, I ran some tests which returned all the Customers in the list. I added the following condition but no return even though the test runs successfully.

    PedroSalmeron_0-1666617196210.png

     

     

  • grantjenkins Profile Picture
    11,063 Moderator on at

    I don't have Parse JSON in my example.

     

    Also, you shouldn't end up with nested loops. I've just got the single loop that goes through each of the items from the Filter Array to send out the emails.

  • PedroSalmeron Profile Picture
    9 on at

    I got confused with this:

    PedroSalmeron_0-1666619477061.png

    How exactly did you do the loop? And is it necessary to add the condition to check the dates?

  • grantjenkins Profile Picture
    11,063 Moderator on at

    Sorry for the confusion. I originally had the Parse JSON step in there which is why it's part of the overall flow screenshot but removed it when I actually finalised the flow which is why it's not one of the individual steps that I listed. So just forget the Parse JSON action.

     

    So, the Apply to each will take in the Output from the Filter array which will only contain the records that require an email to be sent out.

     

    The full flow is:

    grantjenkins_0-1666782638073.png

     

  • PedroSalmeron Profile Picture
    9 on at

    That makes more sense.

     

    I ended up using your flow as an example, thanks. However, after some research, I decided to use the Sharepoint List as a data source since apparently works better with Power Automate.

     

    Now the flow I wanted to have is working and I don't have to rely on excel.

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 304

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 243 Most Valuable Professional

Last 30 days Overall leaderboard