Im trying to create a workflow that defines a variable for email recipients. Then I have an HTTP request to get gov. group members and pull their email addresses, which correctly returns an array with the email addresses. I then use Update Variable for the defined variable and I set it to the array I got from the HTTP request. After that I use Send Email and use the defined variable for recipients. It always contains the content, it had when it was defined. Update Variable is never applied. If I dont use a variable, it works correctly and the array is used for the recipients and the email is sent to all email addresses. I wanted to use the variable because if its not a gov. group I need to get the identity’s email address instead so either result is saved to the variable via Update Variable. Seems like its just broken or doesnt know how to handle arrays. In execution details it shows that it is updating the variable correctly to the array but Send Email shows the field as empty. Anyone else with this experience?
Hey Lukas, the Define Variable step doesn’t currently support arrays. There’s an open Ideas Portal item to address this, but no timeline yet on when it would be available: https://ideas.sailpoint.com/ideas/GOV-I-4821
I struggled with the same issue with arrays. Like @margocbain already mentioned, I don’t think these are actually supported - but I have seen some differing behavior between environments in my previous post:
A workaround that I ended up using was to PATCH the array to a description of a dummy entitlement/role and then use a GET call to retrieve the information back from that dummy entitlement/role. This makes the array turn into a string that looks like an array and you can save it to a define variable and perform contains operations against it. This might work for your case, but in my honest opinion, it really sucks to have to use this workaround and I wouldn’t suggest it unless there’s no other option for your workflow.
My other option is to duplicate Send Email nodes … Send Email nodes use array just fine. It just cannot be saved into a variable. I voted for the idea. Dont think this is a high priority for them.