cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Excel Online Date Filtering to Send Email within the next 6 days

I've seen many solutions that almost get there but don't close the loops. I've spent way to much time trying to figure this out.

 

I need to connect to an Excel online file, find rows that have a date in the next 6 days and then send an email to a recipient listed in the excel file. 

 

It should be pretty easy but i'm struggling. 

 

Hoping someone can point me in the right direction? 

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @forms-flows ,

 

The premise of using Excel online related actions is that the table has been defined in Excel file.

If this condition is met and is the same as you described, there is a date field and a recipient field. You could refer to the following method to configure Flow.

 

I have had test on my side, create a new Excel table containing two fields, Date and Recipient.

45.PNG

  • Get all the rows using List rows present in a table action.
  • Configure Filter array to filter Dates for rows within six days.

Expression reference:

@and(lessOrEquals(formatDateTime(item()['Date'], 'yyyy-MM-dd'), addDays(utcNow(), 6, 'yyyy-MM-dd')),greaterOrEquals(formatDateTime(item()['Date'], 'yyyy-MM-dd'), utcNow('yyyy-MM-dd')))
  • Fill the filtered Recipient in Send an email action.

 

Image reference:44.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
New Member

As a side note, it also seems like most solutions were developed prior to Microsoft making some changes to some of the scripting tools?

Hi @forms-flows ,

 

The premise of using Excel online related actions is that the table has been defined in Excel file.

If this condition is met and is the same as you described, there is a date field and a recipient field. You could refer to the following method to configure Flow.

 

I have had test on my side, create a new Excel table containing two fields, Date and Recipient.

45.PNG

  • Get all the rows using List rows present in a table action.
  • Configure Filter array to filter Dates for rows within six days.

Expression reference:

@and(lessOrEquals(formatDateTime(item()['Date'], 'yyyy-MM-dd'), addDays(utcNow(), 6, 'yyyy-MM-dd')),greaterOrEquals(formatDateTime(item()['Date'], 'yyyy-MM-dd'), utcNow('yyyy-MM-dd')))
  • Fill the filtered Recipient in Send an email action.

 

Image reference:44.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (65,667)