hello all,
I am trying to make a flow with recurrence once per day and specifically to send a daily digest emails to "assigned user" column from a SharePoint online list based on status column items "In Progress" for items from the last 7 days.
example:
Assigned user | Status |
User 1 | In Progress |
User 1 | Completed |
User 1 | In Progress |
User 2 | In Progress |
so based on the above example the flow at the time of recurrance will send two emails:
Pic 1
but if I put the "Assigned User" as the TO: at the Send an email then it will send emails for all the items which the "assigned user" has status "in progress" and not as digest.
any ideas?
hello @Mira_Ghaly
can you assist me on this pls?
@Mira_Ghalyhello,
tried to apply what you mention but I couldn't as is pretty complicated and I am not so familiar
can you paste the complete flow if you have it so I will understand better of what needs to be done.
thank you in advance.
Hi @kouliscon
You need to follow a grouping logic as the below:
1. You need to get the list of distinct users from your List where status = In Progress
So Initialize an array and call it Users Array; in my example it is array of disticnt IDs
In my example the list is called Reservation List , so only retrieve items where status = In Progress by using the ODATA filter Query
2. Now you need to Loop on this Get Items to append the distinct Users ID
Reservation ID is the User in my Example, so first you check if it is not added before then append it to the Array
3. Now you will have to loop on the distinct array of users , Get the related items specific to this users by using the ODATA filter,
So dependent whether you will save email in your array , you can use the odata filter as UserID eq 'Current Item from Array'
4. you can use the output of the GetItems 2 in a create HTML Table and use the output in send email.