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

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 Excel TableDPT Excel TableDPT Automation FlowDPT Automation Flow

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

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

4 REPLIES 4
ScottShearer
Super User
Super User

@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
v-bacao-msft
Community Support
Community Support

 

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.

 
Jagadeeshk
Responsive Resident
Responsive Resident

Hi,

 

I have similar application, where I'm not getting the date column for formatting.  The date column name  is directly appearing but if i ho with expressions and formatting then only value and item is appearing.  Pls help

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,067)