Showing results for 
Search instead for 
Did you mean: 
Responsive Resident
Responsive Resident

Filter Query remove created by duplicates

I have a SharePoint list of 100 items with many of the items having the same Created by  person. I only want to send the email to each person once, but I would like to include the title column in the email that goes to each person. If that gets too complicated, I am good with sending out a generic email for everyone, but I would still only want the email to go out once per person.


How would the Filter Query look for something like this?

Super User
Super User

Hello @send2mark ,

please follow these steps:

1. Initialize 2 Array variables:



2. Get Items from your SP list without filters:



3. Add a "Select" action in order to grab only the Author Email from the SP list:



4. Add a "Compose" action putting the following expression:



5. Add an "Apply to each" loop in which add the following actions/controls (the "Select an output from previous steps" must be the previous Compose outputs):



6. Get items from your list and apply the filter query where:

Author/EMail eq '@{items('Apply_to_each')}'


7. Append to array "varItems" variable for each items found from the previous Get items action, putting the Title:


8. Set the "varItemsDef" variable with the "varItems" values:


9. Set the "varItems" variable in order to clear it (using square brackets):


10. Add a "Compose" action putting the following expression:



11. Add a "Send an email (V2)" action where:

- To: add the Current item:

-Email body: add the previous Compose outputs:



If I have answered your question, please mark my post as Solved.
If you like my response, please give it a Thumbs Up.










Super User
Super User

Hi there, 

Sure -  your steps will look like this:


Step 1) Get Items - that's a normal one 🙂 

Step 2) Use the "Select" action - click on the little icon to the right of the field, make sure it looks like a little chart with no T in it. Add the dynamic content for the Created By or Assigned To or whatever you're using.

Step 3) Next, use a "Compose" action and use the "Union()" expression. In the parenthesis, put the Output from your select - on BOTH sides of the comma. (Yes, it's weird.) It'll be like Union(SelectOutput,SelectOutput)
Step 4) Now you'll be able to run for each of your Unique Users - so create an "Apply to Each" and point it at your Compose output.

Step 5) First item in the Apply to Each: Filter Array. Filter from the Get Items "value" - when YourField Email IS EQUAL TO Current Item.

Step 6) Use the Create HTML Table action. Point it at the Body of your filter array. Type in "Title" for your Header, and in the Value, add this expression: item()?['Title']

And finally, Step 7) Now you have an HTML table that you can plop into an email and send away - so your final action within the Apply to Each is just an email, with the output from the HTML Table in the body, and the email "To" is the "Current Item"





Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (5,479)