cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
forms-flows
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
forms-flows
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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (71,407)