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

Email all rows with today's date excel

Hi,

 

I have looked up loads of other posts, but none of them seem to be able to answer my question.

 

I am brand new to power automate and I'm a little daunted by it,

 

I have an excel file on a SharePoint which has the answers to a form in it. I want to email all of the responses from the current day everyday, with each response going to a different email address specified in the last column of each row,

I can set up the daily trigger and the email to send the relevant information, but I can't seem to find a simple way of selecting the rows with today's date.

 

Any help would be much appreciated!

4 REPLIES 4
eric-cheng
Solution Sage
Solution Sage

Hi @Seb_J ,

 

Check out the below flow.

 

1) I have create an Excel with the below columns and uploaded it to a librry

 

ericcheng_0-1628075189894.png

 

2) Add a List rows present in a table action and specify your site, library, file and table

ericcheng_1-1628076540512.png

 

 

 

 

 

 

 

3) Add a Filter array action next.  

 

This is the filter in advanced mode.  I have highlighted in bold what you need to change to match your the name of your date column in your Excel.  In mine, the column name was called Date.

 

@greaterOrEquals(formatdatetime(addDays('1899-12-30', int(item()?['Date']), 'yyyy-MM-dd')), formatdatetime(utcNow(), 'yyyy-MM-dd'))

ericcheng_2-1628076586262.png

4) Add a Create HTML Table action

 

@greaterOrEquals(formatdatetime(addDays('1899-12-30', int(item()?['Date']), 'yyyy-MM-dd')), formatdatetime(utcNow(), 'yyyy-MM-dd'))

ericcheng_3-1628076682508.png

5) You can now use a Send Email and add the HTML table in your email body.

 

ericcheng_4-1628076781079.png

 

This is the result which contains only today's results.

ericcheng_5-1628077127569.png

If you want to get rid of the standard odata and itemid columns, got back to the Create HTML Table action and click on advanced options.  This will allow you to map the fields.  You wont be able to select the dynamic content so you will need to manually type in the fields in your array e.g. 

@item()?['Date']
@item()?['Question']
@item()?['Answer']
ericcheng_6-1628077182904.png
ericcheng_7-1628077272610.png

 

 

 

 

 

 

The email will now look like this.

ericcheng_8-1628077295958.png

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

 

 

Hi @eric-cheng ,

 

This solution look good, but I've realised that I missed out the crucial information, that each row has a different recipient, in the original post. Is there a way of sending each row to an individual recipient? The destination address is saved in the last column of each row,

 

Thanks again,

Hi @Seb_J ,

 

You would loop through the filtered array and include the send email within that loop.  I'll post something tomorrow as its 1030pm here.

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

Fair enough 😁,

That would be amazing, Thank you!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,952)