Here's a breakdown of the flow I previously posted:
Trigger:
I set mine to run every 30 minutes, but you can adjust this to how long of an interval you want to receive notifications
Get Items:
I made a simple list called Sample_ChangedFiles to hold the details from my first flow. From that list, I reference the field "To_Notify" later in the flow to break up a long list of files into groupings based on who needs to get the notification for each file that was modified. If you're not planning to notify multiple people, you can skip to the heading OPTION 2 below. If you're using this version, make sure "To_Notify" is recording the email address of the person to be notified.
OPTION 1: Multiple people being notified
This is the full version with multiple notifications to different people in a single flow. You probably don't need this one but it's the most robust and you may grow into it, so here's the overview again:
We're at the Condition:
This checks if the length of the Get Items output is greater than zero using the following expression on the left:
length(outputs('Get_items')?['body/value'])
Next is the Select action, to pick out only the email addresses of the people we want to notify for each file that weas modified:
Next is the Compose. We'll use a union() expression on the output of the Select action to merge it with itself. This is a trick to reduce an array to only the unique values, so we only get one instance of each email address in the list:
union(body('Select'),body('Select'))
Next is the Apply To Each targeting the output of our Compose:
Now we filter the original Get Items "body/value" dynamic content to only get the files we want to send to the current person named in the loop:
Then use a Create HTML Table action on the output of that Filter Array:
And finally we send the email to each person who is supposed to be notified with their individual list of files:
Then run another Apply To Each on the body/value from Get Items and use a Delete action to delete the items you just sent emails for.
OPTION 2: Only send notifications to one person
This is much simpler but is not as robust. Everything is the same outside of the Condition, so we'll just review the two actions inside of it.
Starting with Create HTML Table, which now runs against the body/value of Get Items:
And then send the email with the recipient directly added:
And that's it! One quick note, while
@S-Venkadesh's solution will work as well, you can't choose the interval. So however frequently as SharePoint sends your flow a list of files is how frequently you'll get an email from the flow. This option lets you set the interval to whatever you want.