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

Send Weekly Email to "Assigned To" person in a task list for items with past due dates every Friday

My task is to create a workflow that will send an email to the "Assigned To" persons fields on a Task List every Friday for a list items that are Past Due.

 

The Past Due Email would look like this:

Past Due Items Email.JPG

 

 

Task List is called, "ActionTracker"

 

I may be going about this the wrong way but here is what I've tried/done so far:

 

1. Create a Recurrence MS Flow, Get ActionTracker Items, and create two variables to hold HTML emails

First Step.JPG

 

2. Then send Past Due Email to "Assigned To" person using For Each of "Get ActionTracker Items"Send Email with Variables pt1.JPG

3. Since I'd like a List of ALL items, not just the one iteration that im on, i created a variable to hold that current iterations "email body" which appends to a variable that is used in the "final" email.

 

 Send Email with Variables pt2.JPG

 

 

 

What this will do now is send me a email with one item from the list, followed by an email for each additional item, but with other items listed as well (All Items past due date, which I want).

 

Picture of the two emails that I get:Result_2.JPG

 

 

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------

Result_1.JPG

 

 

 

 

I hope I explained and gave enough information, please reply if you'd need more.

Thank you for any help that you can provide.

-Jonathan

2 REPLIES 2
Community Support Team
Community Support Team

Re: Send Weekly Email to "Assigned To" person in a task list for items with past due dates

Hi @ JonathanNguyen,

 

 

Could you please take a try to move the "Send an email" action outside the "Apply to each".

 

Please let me know if the flow would achieve your needs?

 

 

Regards,
Alice Zhang

JonathanNguyen
Level: Powered On

Re: Send Weekly Email to "Assigned To" person in a task list for items with past due dates

I would do that but the Send Email Action gathers information for that email during the iterating of the "Apply to Each". 

The workflow works this way currently, and maybe you can suggestion a different approach that would allow me to move the Summary Email out of the "Apply to Each" loop:

1. User adds action item to ActionTracker SharePoint List.

2. Flow add "HTML content" to "EmailBody" column of that specific Action Item:EmailBody_In_List.JPG

 

That EmailBody column for that item contains the Task Name and Due Date of that item wrapped in HTML formatting with table, code is shown here:Update_EmailBody_Column.JPG

3. A second MS Flow then runs every Friday, with the objective of sending each person that is Assigned To a task a List of all Task Name and Due Dates currently past due.

4. The Second MS Flow aka "Every Friday" Flow, then added the above html code for each task the person is assigned to:

 

<!-- 1 Column Text + Button : BEGIN --> <tr> <td bgcolor="#ffffff"> <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">

<tr> <td style="padding: 5px 40px 5px; text-align: center; background: #f2f2f2;">

<h1 style="margin: 0; font-family: sans-serif; font-size: 24px; line-height: 125%; color: #333333; font-weight: normal;">These tasks are Past their Due Dates:</h1>

</td> </tr>

<tr>

<table width="100%"> <tr> <th valign="top" align="center" style="font-size: 9pt; font-family: ‘Segoe UI’; border: 1px solid #ddd; background-color: #f2f2f2; padding: 3px 15px;">Task</th> <th valign="top" align="center" style="font-size: 9pt; font-family: 'Segoe UI'; border: 1px solid #ddd; background-color: #f2f2f2; padding: 3px 15px;">Due Date</th>

</tr> ​Past Due Email Body×​​ </table>  ************** This will  repeat for each Task Name Assign To User

</tr>

<tr> <td style="padding: 0px 40px 15px; font-family: sans-serif; font-size: 15px; line-height: 140%; color: #555555; background: #f2f2f2;"> </td> </tr> </table> </td> </tr>

<!-- 1 Column Text + Button : END -->

 

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,892)