Hi @Flow_Lover
The reason why you get error is that your ‘set variable’ is wrong. If you use items() for ‘set variable’, then the variable will be refreshed each time and the variable will consistently only have one email address (even though the email address may differ each time) in it.
If you want to save many email addresses in an array and convert them into string separated by ‘;’, the following whole flow is for your reference:
Here I use a column named ‘email address’ from excel table and I want to get all the values in this column to let me send an email.

The detailed steps for ‘initialize variable’:

The detailed steps for ‘Apply to each’:
The reason why I use ‘append to array variable’ rather than ‘set variable’ lies in:
The 'set variable' action will reset the variable, which erases all the content formerly exist in the variable.
The 'append to array variable' action will add new content to the variable and retain the content formerly exist.

The ‘Value’ in ‘Append to array variable 2’ is:
{"emails":@{variables('email')}}
The detailed steps for ‘compose’:

‘Compose’:
last(variables('email array'))
‘Compose 2’:
outputs('Compose')?['emails']
‘Compose 3’:
join(outputs('Compose_2'),';')
For more info about last(), outputs(), join():
Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs
Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs
Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs
The result of my test is:

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.