Use variables with actions to level up your automations.
Some actions come with their own variables that you can reference on itself and its nested actions.
For example, the “For each” action exposes two variables:
item: the current item in the loop
index: the current index of the loop