Hi @jasmedina,
you can do that without using loop. You can pull your identities by using http request.
And then in the “Send Email” action you can use foreach on array attribute that you define in email template variable context.
I do an example here : Using IdentityNow Workflows to Send a List of Uncorrelated Accounts After Aggregation - Content / Community Blog - SailPoint Developer Community
...
<tbody>
#foreach($account in $accounts)
<tr>
<td style="border: 2px solid grey; padding: 8px; text-align: center">
${account.nativeIdentity}
</td>
<td style="border: 2px solid grey; padding: 8px; text-align: center">
${account.name}
</td>
</tr>
#end
</tbody>
...
in the templating context i define my “accounts” variablelike this :
{
"accounts.$": "$.hTTPRequest.body",
"aggregationCompletedDate.$": "$.trigger.completed",
"ownerName.$": "$.getIdentity.attributes.displayName",
"sourceName.$": "$.trigger.source.name",
"totalAccounts.$": "$.hTTPRequest.headers['X-Total-Count'][0]",
"uncorrelatedAccountsLink": "https://{{tenant}}.identitynow.com/ui/admin#admin:connections:sources:{{$.trigger.source.id}}:uncorrelatedAccounts"
}
My usecase is based for retrieving list of accounts particular source after aggregation you must adapt for your use which to retrieve list of identities.
My email look like :
You can found all informations in the blog.