Updated: 07 December 2022
In this post, I aim to provide a clear explanation of the item() and items() functions in Power Automate. By the end of this post, you will have a deeper understanding of these functions and be able to utilise them effectively in your workflows.
- Example 1: item() and items() can refer to the same element in an array
- Example 2: item() gives you the context
- Example 3: Filter Array action – item() gives you the context
- Example 4: items() function SHOWS the context
- item() function must not have any parameters
- Use the following syntax example for the item() function
- Further reading
Example 1: item()
and items()
can refer to the same element in an array
The item() and items() function is used to get the value of the current item as shown below.
The following example initialises an array of fruit names:

Then loop over (iterate) each of the items in the array using an Apply to each loop.
Compose actions are used to show the values of item()
and items('Apply_to_each')
:

Note how the expressions item()
and items('Apply_to_each')
refer to the same element in the array:

Example 2: item()
gives you the context
The following example initialises an array of fruit names and an array of department names:

Note the two uses of the item()
expression below:
- The context of
item()
in the compose action is the varFruit variable of the Apply to Each loop. The Apply to Each loop loop iterate through each of the values of fruit: Apple, Mango, Pear, Grapes and finally Banana
- The context of
item()
in the Filter Array action is the varDepartments variable. The Filter Array action will iterate through each of the values of in varDepartment: IT, HR, Facilities, Finance and finally Security and select a department that is equal to HR.

Example 3: Filter Array action – item()
gives you the context
Note the two uses of the item()
expression below:
- The context of
item()
in the Filter Array action is the varFruit variable
- The context of
item()
in the Filter Array 2 action is the varDepartments variable

Sample runtime output of the Filter Array actions:

Example 4: items()
function SHOWS the context
In the example flow below note how the items()
function shows the context:
- the context of
items('Apply_to_each')
is the Apply to Each loop - the context of
items('Apply_to_each_2')
is the Apply to Each 2 loop


When using nested apply to each loops – see the example above on how to reference an item in the outer loops.
item()
function must not have any parameters

Use the following syntax example for the item()
function

This is exactly what I was looking for and the format you used to show the context is easy to read. Thanks for taking the time to put this together!
I think people may also be searching for something like “How to find the current index of an apply to each loop” or “Index of parent apply to each loop”