Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Target array item in compose

I'm trying to concatenate a string with email address from a multi choice people picker. As compose does not allow the use of the people picker data im doing an update item and then pulling the data from that update item. I'm having issues with the compose, as the people picker was multi choice it made the update item a loop so the data is in an array. When i run the compose it doesnt work becuase it can access the array.




I need to figure out how to target the first item in this array -> body('Update_item')?['imageurl']

Community Support Team
Community Support Team

Re: Target array item in compose

Hi @jeffha77,


Could you please share a screenshot of your flow's configuration?

Could you please show a bit  more about your SharePoint list?

Further, could you please share a bit more about the array that you mentioned?


If you want to target the first item of an array, I think the first() function could could achieve your needs. I have made a test on my side and please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a Variables-> "Initialize variable" action, Name set to OriginalArray, Type set to Array and Value set to the following formula:
    "Name": "Kris",
    "Age": 24
    "Name": "Angelina",
    "Age": 27
    "Name": "Ancherl",
    "Age": 29

Note: I use the "Initialize variable" action to create an array in my flow.


  • Add a "Compose" action, Inputs set to the following formula:

Image reference:2.JPG

The flow works successfully as below:3.JPG


On your side, if you want to target the first item in this array -> body('Update_item')?['imageurl'], please take a try with the following formula within "Compose" action:





Best regards,


Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Powered On

Re: Target array item in compose

This is the whole flow,



This is where im having the issue, under if no,



 using "first()" does not work, i still get the same error


Unable to process template language expressions in action 'Compose_2' inputs at line '1' and column '2153': 'The template language expression 'CONCAT('',REPLACE(First(body('Update_item...')' cannot be evaluated because property 'imageurl' cannot be selected. Array elements can only be selected using an integer index. Please see for usage details.'.

Level: Power Up

Re: Target array item in compose

You need to move ?['imageurl'] outside the bracket
from the inside to the outside:
body('Update_item') - the body of your item
first() - select first row of that body
?['imageurl'] - select index imageurl from the selected line
the full string now reads as follows:

Helpful resources


Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!


Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (5,159)