I do it in this blog : Using IdentityNow Workflows to Send a List of Uncorrelated Accounts After Aggregation - Blog / Blog Posts - SailPoint Developer Community Forum
You can use :
#foreach($account in $accounts)
And define variable in temp Templating Context :
"accounts.$": "$.hTTPRequest.body",