cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rgoddi
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
v-yuazh-msft
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
v-yuazh-msft
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

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

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

rgoddi
Frequent Visitor

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.  

Anonymous
Not applicable

Thanks!

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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (48,485)