Forum Discussion
chagedorn49
May 08, 2025Copper Contributor
Email to Assignee with SharePoint items created in past week and assigned to the email recipient
Going into this it seemed straightforward, but I've been banging my head against the Power Automate wall.
We have a SharePoint list with a number of columns, one of which is basically Assigned to (it's titled Ticket created by). The ask from our user group is that the Ticket created by value/personnel is sent a weekly email and the body of the email includes a table with 4 column values of any new SharePoint items created in the past 7 days that have been assigned to them. There are about 30 individuals who could be in the Ticket created by column and not all of those individuals will have new items each week. So, if there are no new items for the person, there will not be an email.
Originally, the flow was triggered upon creation and the Ticket created by personnel would receive an email with a bit of info from their SharePoint list item formatted in a table. This worked fine and still does. However, the new ask is that we move away from an automated flow and use a scheduled flow that runs weekly and displays x, y, and z values from the new items created in the past week and assigned to the recipient of the email.
This is where I'm stumped. How do I include in the body of the email values of new SharePoint items (1) created in the past 7 days and (2) assigned to the To: recipient (Ticket created by value) of the email?
2 Replies
Sort By
- michalkornetIron Contributor
Hi chagedorn49, I hope I understand the case correctly, but you need to take the following actions to complete it:
- In the scheduled flow:
- Get the current date in ISO format to use in filtering.
formatDateTime(utcNow(), 'yyyy-MM-ddTHH:mm:ssZ')
2. Calculate the ISO date for now minus 7 days.
formatDateTime(addDays(utcNow(), -7), 'yyyy-MM-ddTHH:mm:ssZ')
3. Filter items from the list using the calculated date range. (of course use previously calculated values)
Created ge datetime'2025-05-11T00:00:00Z' and Created le datetime'2025-05-04T00:00:00Z'
4. Use 'Apply to each' on the filtered items to send an email to the person listed as the ticket creator.
- chagedorn49Copper Contributor
Thank you so much for your feedback michalkornet
I can definitely use the above to get the past 7 days of new SharePoint items and then use the "Ticket created by" value in the To field of the email.
The "Ticket created by" property in SharePoint is a people picker field and there are about 30 different people that these SharePoint items are assigned to. By chance do you know how to set up the Power Automate email step (or perhaps it's a step before it) so that the only SharePoint items in the body of the email are the ones assigned to the person being emailed?