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

Weekly summary email of all new and modified list items from previous 7 days only

I need to be able to have a summary email automatically send every Monday morning at 8am that contains a table of all list items that have either been created or modified in the past seven days.  I have set up a flow that I believe would work if the "Apply to Each" wasn't automatically added if I try to customize the table columns.  Since it is added when I try to create a table using custom column layout, I get an email for every line item instead of one combined table.  If I change the HTML table columns to be automatic instead of custom, it works (sends summary of all list items in one email) but is unreadable because of all of the extra info that is added in.  Is there another way to do this since I can't stop "Apply to Each" from adding itself?

 

flow.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Weekly summary email of all new and modified list items from previous 7 days only

Hi @rgoddi,

 

Could you please share more details about the User column and Status column in the sharepoint list?

 

I have made a test on my side to create a User column with Single line of text type, and a Status column with Choice type in a list.

 

You could refer to screenshot below to create the flow:

Capture.PNG

 

The expression of the Status in the "Create HTML table" as below:

item()?['User_x0020_DisplayName']

 

The expression of the User in the "Create HTML table" as below:

item()?['Status']?['Value']

 

The flow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

View solution in original post

5 REPLIES 5
Community Support Team
Community Support Team

Re: Weekly summary email of all new and modified list items from previous 7 days only

Hi @rgoddi,

 

Could you please share more details about the User column and Status column in the sharepoint list?

 

I have made a test on my side to create a User column with Single line of text type, and a Status column with Choice type in a list.

 

You could refer to screenshot below to create the flow:

Capture.PNG

 

The expression of the Status in the "Create HTML table" as below:

item()?['User_x0020_DisplayName']

 

The expression of the User in the "Create HTML table" as below:

item()?['Status']?['Value']

 

The flow would run successfully as below:

Capture.PNG

 

Best regards,

Alice

View solution in original post

rgoddi
Level: Powered On

Re: Weekly summary email of all new and modified list items from previous 7 days only

It works!  Well, I believe your solution works but something is weird on my end.  The User column in the email table is blank but I can see how the solution you gave makes sense and should work.  It's a person lookup field so it's probably on our end.  

 

Where can I learn how these expressions work? I'm not sure what to search for or what they would be called - SharePoint expressions?  It seems like a lot of the solutions on here have to do with those so I'd like to become familiar.  I've tried searching before but I haven't been able to find these specifically, always ODATA specifics instead. 

 

Thank you!!

rileyswanston
Level: Powered On

Re: Weekly summary email of all new and modified list items from previous 7 days only

Hi,

 

Would you mind sharing the line you used in the filter array from? I'm trying to come up with the same filtered list from items modified within the past 7 days and can't get the coding to work.

 

Thanks,

Riley

rgoddi
Level: Powered On

Re: Weekly summary email of all new and modified list items from previous 7 days only

This is what I used to filter the items from the list being pulled:

 

@and(not(equals(item()?['Status']?['Value'], 'Current')), or(greaterOrEquals(formatDateTime(item()?['Created'], 'MM/dd/yyyy'), formatDateTime(addDays(utcNow(), -7), 'MM/dd/yyyy')), greaterOrEquals(formatDateTime(item()?['Modified'], 'MM/dd/yyyy'), formatDateTime(addDays(utcNow(), -7), 'MM/dd/yyyy'))))

This will grab both modified and new items from the last seven days.  

rileyswanston
Level: Powered On

Re: Weekly summary email of all new and modified list items from previous 7 days only

Thanks!

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
Users Online
Currently online: 164 members 6,570 guests
Please welcome our newest community members: