Forum Discussion
jeffreyhaddad1
Dec 09, 2022Copper Contributor
Create a flow to send a weekly email with list data for each row
I have a SharePoint list for tracking different project tasks. I want to create recurring flow to send a weekly email to the project coordinator (which is a list column) displaying the statuses of e...
RobElliott
Dec 10, 2022Silver Contributor
jeffreyhaddad1 if you follow the get items immediately with an action like send an email it will always wrap itself in an apply to each. But we can overcome that with a select action. the following is from one of our live flows that produces a list at 7pm every night for each of our office managers.
So immediately after the get items add a select action and in the from field select value from the dynamic content box. Then add the column headers you want and select the dynamic content you need:
Next, add a create html table and in the From field select the output from the select action.
To make the table look better than the default add a compose action and paste in the following html (which of course you can change to whatever you want).
Spoiler
<style>
table {
border: 1px solid #1C6EA4;
background-color: #EEEEEE;
width: 80%;
text-align: left;
border-collapse: collapse;
}
table td, table th {
border: 1px solid #AAAAAA;
padding: 3px 2px;
}
table tbody td {
font-size: 13px;
}
table thead {
background: #1C6EA4;
border-bottom: 2px solid #444444;
}
table thead th {
font-size: 15px;
font-weight: bold;
color: #FFFFFF;
border-left: 2px solid #D0E4F5;
}
table thead th:first-child {
border-left: none;
}
</style>
table {
border: 1px solid #1C6EA4;
background-color: #EEEEEE;
width: 80%;
text-align: left;
border-collapse: collapse;
}
table td, table th {
border: 1px solid #AAAAAA;
padding: 3px 2px;
}
table tbody td {
font-size: 13px;
}
table thead {
background: #1C6EA4;
border-bottom: 2px solid #444444;
}
table thead th {
font-size: 15px;
font-weight: bold;
color: #FFFFFF;
border-left: 2px solid #D0E4F5;
}
table thead th:first-child {
border-left: none;
}
</style>
And at the bottom of the Input field select the output of the create html table action.
Finally, add your email action and add the output from the compose action above.
And this is the result.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
jeffreyhaddad1
Dec 13, 2022Copper Contributor
Thanks for your response. My understanding of this solution is that the output is an aggregation of multiple list entries in to 1 summary, but what I'm looking to achieve is a summary of multiple columns (ie fields within 1 list row/entry).
For comparison, in my list, 1 row/entry is equal to a project and the list has multiple standard tasks for project and the desired output is an individual summary email for each project send to the project manager with the statuses of each of these tasks.
For comparison, in my list, 1 row/entry is equal to a project and the list has multiple standard tasks for project and the desired output is an individual summary email for each project send to the project manager with the statuses of each of these tasks.