Hi Marcel,
Thanks a lot for your reply and sorry for not giving any feedback earlier.
Your comment was very helpful and I found another discussion on the forum related to what I am trying to achieve: Re: Use of variable in continuous delivery, how to do ?
To give some context, I am trying to send in an alert all the last deliveries with their metrics. To do so I 1)run a query 2)use some JavaScript code to store the data in an instance 3)Run the loop in the alert.
The setup looks like this:

The JavaScript is the following:

The alert code is the following:

I have not added all the Node expressions in the output as I just want to run a test at the moment. However, I get this error message:
XSV-350122 An error occurred and the process has been stopped.
SOP-330011 Error while executing the method 'PrepareTarget' of service 'nms:delivery'.
SOP-330011 Error while executing the method 'PrepareTargetImpl' of service 'nms:delivery'.
DLV-490009 You have not defined the target population of the delivery action
Which is weird as I have defined the target to "operators" and assigned myself to the alert.
Any help would be welcome on this issue 
Thanks a lot for your time.
Kenji Tsuchiya