Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

microsoft flow get all items with distinct Assigned to (User and group) filed



I am creating a flow to get all the item assined to a single user and send an email to that user with all the item detail .


I dont want to send separate email for each task .


Could you please help me with any option . 




132 REPLIES 132

@ckotekar The skip command in your "Compose 2" action needs to be entered as an "Expression" and not a string.  When it is entered correctly it should look like the compose action below.Capture.JPG

@-Garrett-  Thanks for the quick response.


Unfortunately, I don't have the 'Dynamic content/Expression' view (same is visible in the snapshot shared earlier). It was visible earlier (at least 7-8 months ago) and had used it too, and I likely would have disabled it unintentionally. Even after trying to get this activated, I failed to figure out. Since it is of enabling some option, could you/anyone help me to get it back? Routing me to a Help page would also suffice.


Thanks in advance!

@-Garrett- ... that's a great tip. It helped 😍.


This is not intuitive nor I ever imagined that Zooming the page is the solution. Not sure if its a Bug or as per the design, but for sure I see an opportunity for enhancement!.



@-Garrett- , I have a follow-up question. 


The Flow is working perfectly fine as suggested in the thread. 


The flow I am creating is to send reminders to the relevant stakeholders for action from them. Once the activity is complete, I wouldn't want any email to be triggered for that task. To achieve that, I see 2 options,

  1. Delete the person information from the field. No mail if the column entry is empty.
  2. Use another field that indicates the status (Open/In-progress, Closed). No mail if the status is closed.

I tried option 1 as an easy way but I have an error from the 'Append Array' block as it returns NULL. Even adding a filter in the 'Get item' dint help much.


Could you please suggest me on this. Since I'm a novice with the Flows, looking forward to some help with the best option along with the hint on expression or block to be used.


Thanks in advance!


Hello @ckotekar ,


I would use option 2 as you suggested, you can add a filter to your get items task to only grab the items you want to send an email about. You may be able to do option 1 by adding a conditional task in the flow that if the email is null it won't do anything




Hello @ZachRoberts 


I inserted a column 'status' and have incorporated 'Condition' inside 'Apply to all' block. This works fine for 'Append to array variable'. But looks like I'm missing something on 'Do until' block to filter out entries with status 'Done' (Filter Arra 2 block in the snapshot). Will need some help to set the right filter. Again, I am not sure if Filter is the right approach. 


Could I get some help here?



Thanks in advance!

@ckotekar I am by no means a Power Automate "Expert" but my personal understanding is that it is best practice, and will improve performance on large list, to use OData filter inside of the "Get Items" Action.  Please reference the below link for information on why this is.

@-Garrett-  This was easiest way to get through while I was making it complicated with conditional block ...😏.

I remember trying ODATA field in the past but missed using the right syntax. Succeeded this time.


Thanks a ton...!

This worked great however I do have a question. I am trying to include output from a choice column type in the html and it keeps outputting the array like so instead of the value:



Here is what I have in my scenario from your example:


So this @{item()?['Whose_x0020_Court_x0020_is_x0020']} is outputting the array instead of value.

If I put this code in it gets only the first value correctly:


So @{item()?['Whose_x0020_Court_x0020_is_x0020'][0]?['Value']} will output the name Drew. If I put @{item()?['Whose_x0020_Court_x0020_is_x0020'][1]?['Value']} it will output the second name. My understanding is I can't code it like this because if a column has one name and I code it for two then the flow will break.

Here is a snippet of the output from the filter array:


End result I am trying to get the column in the email to say Drew, Evan. Hope this makes sense. I am a bit new to this and have a hunch I need to apply all to this value somehow however I am stumped. Thanks for any hints you can give to help.

Hi,  Thank you for this solution.  I am having real trouble with the skip function.  It is sending the initial email to the first name on the union list and then skipping to the second but then gets stuck and sends the same email depending on the number of rows in the list.  I have found that 

skip(variables('Staff Name'),1) produces the full list of names unlike the union so I change the variable inn the skip function to the union compose output.  It still gets stuck o the send on continues to send out multiple emails with the same info.
Would you mind assisting on this question please.
Thank you
Post Patron
Post Patron


You can take reference from this video.Also request you to please subscribe this PowerAutomate channel

hello. Thank you for your time to Post this.

I have treid to rebuild this flow and i get an error message at the first Apply to each loop. 


 i have a person field in my SP List and the error is 

Unable to process template language expressions in action 'Append_to_array_variable' inputs at line '1' and column '35370': 'The template language function 'first' expects its parameter be an array or a string. The provided value is of type 'Object'. Please see for usage details.'.

how can i solv ethis error?


Thank you

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (2,946)