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. 

View solution in original post

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. 

View solution in original post

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

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

Top Solution Authors
Top Kudoed Authors
Users online (5,611)