cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
annetoal
Super User
Super User

Batch up rows in an array

I have an array that looks like this:

[
  {
    "Reviewer": "user1@school.edu",
    "Filename": "file1.docx",
    "Reviewdue": "2021-11-17"
  },
  {
    "Reviewer": "user1@school.edu",
    "Filename": "file2.pdf",
    "Reviewdue": "2021-11-17"
  },
  {
    "Reviewer": "user2@school.edu",
    "Filename": "file3.docx",
    "Reviewdue": "2021-11-17"
  },
  ETC

I need to send notifications to both users that a Filename is due on Reviewdue. I would like to send just one email to each person containing a table of all the files they have due. I am currently trying to write a HTML table for each user containing two columns: filename and reviewdue. Is this the best approach? If so, how would I get a table of just the files that belong to user1 in one table, and the files belonging to user2 in another table, and so on?

@Expiscornovus this is a follow on to the question you answered earlier this morning. Thanks again.

 

Anne

1 ACCEPTED SOLUTION

Accepted Solutions
takolota
Super User
Super User

@annetoal 

 

I recently created a template that involves a really similar piece for notifications.

 

If you look at how the last Apply to Each is set up in the Project Notifications flow of this build, you will see a relatively efficient method that puts all the possible people emails into an array, then loops through each email & each loop contains a Filter array action to get all the items related to that email, then creates a list from the Filter array in an HTML table action.

 

https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Project-Tracker-SharePoint-and-Teams/td-...

View solution in original post

3 REPLIES 3
takolota
Super User
Super User

@annetoal 

 

I recently created a template that involves a really similar piece for notifications.

 

If you look at how the last Apply to Each is set up in the Project Notifications flow of this build, you will see a relatively efficient method that puts all the possible people emails into an array, then loops through each email & each loop contains a Filter array action to get all the items related to that email, then creates a list from the Filter array in an HTML table action.

 

https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Project-Tracker-SharePoint-and-Teams/td-...

I will have a look at it and let you know.

Thanks,

Anne

Thanks for the blog post. I downloaded the code package and used some of the ideas in my own code. I was relieved how similar the basic structure was to what I had developed--made me feel like I wasn't out on a limb 🙂 

 

Anne

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,355)