zeross
(Dennis Berendsen)
May 23, 2025, 5:05pm
1
I have a workflow that sends an email with an specific identity name. The trigger of these workflow is not relevant for my question.
So I want to extend my workflow that it will retrieve all the business role that are owned by that person. And also send all those business role within the email.
My flow now.
jesvin90
(Jesvin Joseph)
May 23, 2025, 6:01pm
2
Hi @zeross ,
You can use an HTTP operation action, calling the search API with body as below :
{
"indices": [
"roles"
],
"query": {
"query": "owner.name:jesvin.joseph"
},
"queryResultFilter": {
"includes": [
"id",
"name",
"type"
]
}
}
This would fetch you the roles owned by the specified user ID.
Then use a send email node, with the templating context as {"name.$":"$.hTTPRequest.body[*].name"}
The email body can then be set up with something like
Below are the requested roles :
${name}
kdfreeman
(Kapil Dahal)
May 23, 2025, 7:15pm
3
You can try with “Get Access” action item.
If it doesn’t fulfil your criteria, use search API to fetch user roles.
Thanks.
1 Like
zeross
(Dennis Berendsen)
May 26, 2025, 10:20am
5
@jesvin90 I have it working now. But one question is there a way to get all the roles on a new line?
If I got multiple roles it will end up in a very long string and not good readable anymore.
Tulasi
(Tulasi Sowjanya Pallaprolu)
May 26, 2025, 11:01am
6
Hi Dennis,
in the email body if it is as follows:
Requested roles are:
#foreach ( $i in ${name} )
$i
#end
It may fulfill your requirement of getting each role in newline
Thanks,
tulasi
If teh below case doesnt help you resolve. check this out