cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aselestok2
Level: Power Up

Filter Excel File's Rows and Send Email Based on Date

Hello,

 

I am working on an automated email system for my team that involves a calendar of tasks created in Excel. I am attempting to filter the table based on the date of the task or tasks and sending a daily recurring email to my team that indicates these. Unfortunately, when the flow processes, it does not send a single table of tasks and instead sends an email for each entry that says "No Task Today." I am wondering where the logic is going wrong. I have my Excel Table ("DPT") and MS Flow screenshots attached.

 

DPT_Screenshot.PNGDPT Excel TableDPT_Automation.PNGDPT Automation Flow

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Filter Excel File's Rows and Send Email Based on Date

 

Hi @aselestok2 ,

 

Please try to configure Flow by referring to the following method.

There are two issues that need to be addressed here:

  • The field value of the Date type in Excel table will be displayed as Number in Flow, so you need to use the expression to restore the number to Date.
  • You need to filter out the eligible records before creating the Html table.

Please check this similar thread and see if it helps:

https://powerusers.microsoft.com/t5/Building-Flows/Excel-file-to-list-flow-date-issue/m-p/279258#M28...

 

Expression reference:

addDays('1899-12-30',int(item()['Date']),'yyyy-MM-dd')

Here you need to use variables to store what needs to be displayed in the Html table, and then use it to create an HTML table.

Image reference:

162.PNG

Details in Apply to each:

163.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
Super User
Super User

Re: Filter Excel File's Rows and Send Email Based on Date

@aselestok2 

I believe your issue stems from the fact that Excel stores date values differently than Flow expects.  As a result, your condition will never be true.

There are a number of ways to approach this issue, but here is is a link to a solution with one method that I have used in the past.

Here is a link to a post that shows another way of approaching the issue.

 

Also, you may want to remove the "Apply to each 2" loop - it does not appear as though it is serving any purpose.

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Community Support Team
Community Support Team

Re: Filter Excel File's Rows and Send Email Based on Date

 

Hi @aselestok2 ,

 

Please try to configure Flow by referring to the following method.

There are two issues that need to be addressed here:

  • The field value of the Date type in Excel table will be displayed as Number in Flow, so you need to use the expression to restore the number to Date.
  • You need to filter out the eligible records before creating the Html table.

Please check this similar thread and see if it helps:

https://powerusers.microsoft.com/t5/Building-Flows/Excel-file-to-list-flow-date-issue/m-p/279258#M28...

 

Expression reference:

addDays('1899-12-30',int(item()['Date']),'yyyy-MM-dd')

Here you need to use variables to store what needs to be displayed in the Html table, and then use it to create an HTML table.

Image reference:

162.PNG

Details in Apply to each:

163.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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,226)