cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Community Support
Community Support

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

6 REPLIES 6
Highlighted
Community Support
Community Support

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

Highlighted

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!!

Highlighted
Anonymous
Not applicable

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

Highlighted

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.  

Highlighted
Anonymous
Not applicable

Thanks!

Highlighted

I get emails if no new items were added - what can be added to not send the email if there are no items? 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (7,719)