cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Get specific items to users from json results

Hi, 

 

I have a flow which queries a list with the items that were created in the last 7 days. In the results I have entries submitted by users with their corresponding data and supervisors. I need to be able to send an email to their supervisors with the items submitted by the users for these last 7 days. Where i'm getting stuck is where some users have multiple items submitted. The emails to these supervisors should only have the data that corresponds to their employee. 

 

This is what i have so far: 

flow2.png

 

Any help is appreciated. 

 

Thanks

 

5 REPLIES 5
Highlighted
Resident Rockstar
Resident Rockstar

Re: Get specific items to users from json results

@_sourcecod3_

I Suggest you add a compose data operation after the Get Items to get the first record record only first(getitems) and then you can get the user data from there.

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.
Highlighted
Helper III
Helper III

Re: Get specific items to users from json results

@Mira_Ghaly  I am getting the data back from the 'Filter array'. the problem is that this data has entries from the same user multiple times. I need to grab all the entries from each user and send those to their supervisors. Any other ideas? 

Highlighted
Resident Rockstar
Resident Rockstar

Re: Get specific items to users from json results

@_sourcecod3_ 

Please try the Action Create HTML Table and add the filtered array as an input and then pass the outputs of the Create HTML Table to the Email you are creating.

Sample for Create HTML Table but in your case the From will be the Filter Array and you can choose to generate columns automatically or Create Custom.

Mira_Ghaly_0-1599601590125.png

 

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.
Highlighted
Helper III
Helper III

Re: Get specific items to users from json results

@Mira_Ghaly thanks for you responses, but i think we might be misunderstanding the issue. I can get the information once it's parsed from the filter in the array, what i'm trying to do is filter the data retrieved. 

 

sample of data: 

user1activity1supervisor1
user1activity2supervisor1
user1activity3supervisor1
user1activity4supervisor1
user2activity1supervisor2
user2activity2supervisor2
user3activity1supervisor3

 

I need to send an email to each employees supervisor with the activities entered by their employee. So i need to grab the empname, their activities and email it to their sup. 

Highlighted
Resident Rockstar
Resident Rockstar

Re: Get specific items to users from json results

@_sourcecod3_ 

Can you please check my reply on this topic it has similar approach for grouping the data per user.

https://powerusers.microsoft.com/t5/General-Power-Automate/Flow-to-send-digest-emails-to-amp-quot-as...

 

Hope this gives you an idea!

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Users online (6,314)