Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fetch first record of union output

I am building a flow and I want to fetch the first row value of the output of an union function used loop input.


I am trying to using first function to fetch the first records of each union set of outputs in the array but the flow is not working properly. Below is the flow:


union (


first function input in compose action


I am trying to fetch first email record in each union to use in in email TO address.
The flow is picking the very first record of email for every union but not the first record of every union of values.
kindly suggest what needs to be changed.
Thanks in advance.



Hi @Anonymous 


Please don’t use the two actions of ‘Apply to each’ together. The flow will run too much times for the two actions of 'Apply to each'.

You can simply try the action of ‘filter array’ in the ‘Apply to each’ for ‘Vnumber’.


In my case, I want to get the first record of every union of values for the column 'Email address'.


This is what my excel table looks like:



The result of my flow is:

‘Compose 2’ contains only one item each time, which is the first record of every union of values.



The following flow is for your reference:


The function used:




Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,613)