Workflow for Role Owner Termination

Hello,
Curious if anyone has built a workflow to send an email when a role owner is terminated. Would appreciate if you could share your solution. Thanks!

Hi Michael,

It can be achieved with a workflow. Upon the termination, call API {{baseUrl}}/roles?filters=owner.id eq "<id>" and if it returns roles then send email. Here’s the workflow for your reference

1 Like

Hi Sahil,
This is great thank you for sharing. We got to work building a similar workflow and it errors on the HTTP step. I’m going to create a separate issue as it’s not really related to this question. Thanks again.

Hi Sahil,
I have it mechanically working to send an email when someone is termed. However, the CompareStrings Operator value is the following:

Value 1: {$.trigger.changes[?(@.attribute == “cloudLifecycleState”)].newValue
Operator: Equals
Value 2: inactive

What value did you use to detect if the user was a role owner?

Hi Mike,

After this operator, add “HTTP request” action under True condition, and call this API {{baseUrl}}/roles?filters=owner.id eq "<id>". Again add a “Compare Strings” to verify if the HTTP output is returning any data or not. If the data is returned that means user owns the role. Hope it helps.

Hi Sahil,
Would you mind sharing the workflow json.

Hi Mike, you can share your existing workflow and I can help to fix that.

Hi Sahil. Apologies for the delay. We got it to work. Appreciate your help.

good to know, thanks for the update.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.