cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
solisruj
Level: Powered On

Excel Date Filtering to Send Email

Hi,

 

I am trying to build a flow that recurringly checks an excel spreadsheet every 2 or 3 days. Checks every row's date and if it matches some date then it sends an email.

 

Example: 

 

1. Every 2 days. 

2. Opens Excel Spreadsheet. 

3. Reads through every row: 

          - If row Date (7/20/2018) equals ((7/27/2018) - 7 days)

                    - Send Email before due/meeting date for a reminder.

          - Else do nothing.

 

Thanks in advance! 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
solisruj
Level: Powered On

Re: Excel Date Filtering to Send Email

Hi @v-yamao-msft

 

Thanks for your help. I figured it out.  Turns out I needed to change 'Next Calibration Date' to 'Next_Calibration_Date'. 

 

@equals(formatDateTime(items('Apply_to_each')?['Next Calibration Date'], 'MM/dd/yyyy'), formatDateTime(utcNow(), 'MM/dd/yyyy'))

 

Thanks again. I really appreciated your input. 

3 REPLIES 3
Community Support Team
Community Support Team

Re: Excel Date Filtering to Send Email

Hi @solisruj,

 

To trigger the flow every 2 days, you could use the trigger Recurrence.

 

Then you could use the Excel action Get rows.

 

Then use a Condition to filter the rows that before due date for a reminder.

 

The code could be configured as:

@equals(items('Apply_to_each')?['date'], adddays(utcnow('yyyy-MM-ddT00:00:00Z'), -7))

 

Under the If Yes branch, add the action Send an email.

 

Please take a try with it.

 

For more details about the function, please check this doc:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#g...

 

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
solisruj
Level: Powered On

Re: Excel Date Filtering to Send Email

Hey @v-yamao-msft my current setup was similar to your provided solution, however I keep getting errors. 

 

Here is a screenshot:

 

Email_reminder.PNG

 

I also have the code configured as:

 

@equals(formatDateTime(items('Apply_to_each')?['Next Calibration Date'], 'MM/dd/yyyy'), formatDateTime(utcNow(), 'MM/dd/yyyy'))

For your code: 

 

@equals(items('Apply_to_each')?['date'], adddays(utcnow('yyyy-MM-ddT00:00:00Z'), -7))

For each row; is your code checking a column named 'date'? 

 

I also appreciate the adddays() function, I will be sure to try and implement that after I get this flow working. 

 

solisruj
Level: Powered On

Re: Excel Date Filtering to Send Email

Hi @v-yamao-msft

 

Thanks for your help. I figured it out.  Turns out I needed to change 'Next Calibration Date' to 'Next_Calibration_Date'. 

 

@equals(formatDateTime(items('Apply_to_each')?['Next Calibration Date'], 'MM/dd/yyyy'), formatDateTime(utcNow(), 'MM/dd/yyyy'))

 

Thanks again. I really appreciated your input. 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 397 members 5,694 guests
Recent signins:
Please welcome our newest community members: