# Trigger a workflow when changes to Mail attribute in a source

**URL:** <https://developer.sailpoint.com/discuss/t/trigger-a-workflow-when-changes-to-mail-attribute-in-a-source/58022>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, identity-security-cloud\
**Created:** [May 27, 2024, 5:13am UTC](https://developer.sailpoint.com/discuss/t/trigger-a-workflow-when-changes-to-mail-attribute-in-a-source/58022 "2024-05-27T05:13:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![KirtiSikarwar](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@KirtiSikarwar](https://developer.sailpoint.com/discuss/u/KirtiSikarwar)\
**Post date:** [May 27, 2024, 5:13am UTC](https://developer.sailpoint.com/discuss/t/trigger-a-workflow-when-changes-to-mail-attribute-in-a-source/58022/1 "2024-05-27T05:13:56Z")

</div>

Hi All,

I am looking to trigger the workflow when the mail attribute is changed on the AD

So sourcename=“AD” and $.changes[?(@.attribute == “mail”)]  
My trigger here is incorrect. JSONPath - $[?(@.source.name == “Active Directory”)].changes[?(@.attribute == “mail”)]

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/8/86abf03c28711f9552da34dd03dfac3e44af0aaf.png)

---

<div class="post-metadata">

**Author:** ![naveenkarthikkrk](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/naveenkarthikkrk/32/11531_2.png) [@naveenkarthikkrk](https://developer.sailpoint.com/discuss/u/naveenkarthikkrk)\
**Post date:** [May 27, 2024, 6:35am UTC](https://developer.sailpoint.com/discuss/t/trigger-a-workflow-when-changes-to-mail-attribute-in-a-source/58022/2 "2024-05-27T06:35:32Z")

</div>

Hi @KirtiSikarwar ,  
I have created a similar workflow were I have used identity attribute change trigger.I have created a identity attribute called AD mail and mapped it to mail attribute in AD.So when the AD attribute is changed it will in turn change the identity attribute thereby it triggers the work flow,Try this way!!

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/0/0918c02a9adf6c158bad043457e826840074ceb7.png)  
Thanks!!

---

<div class="post-metadata">

**Author:** ![baoussounda](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/baoussounda/32/13095_2.png) [@baoussounda](https://developer.sailpoint.com/discuss/u/baoussounda)\
**Post date:** [May 27, 2024, 6:41am UTC](https://developer.sailpoint.com/discuss/t/trigger-a-workflow-when-changes-to-mail-attribute-in-a-source/58022/3 "2024-05-27T06:41:51Z")

</div>

Hi @KirtiSikarwar,

Did you mean if mail change outside of ISC ?

It make sense to trigge identityAttribute mail change.

---

<div class="post-metadata">

**Author:** ![jesvin90](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/jesvin90/32/5301_2.png) [@jesvin90](https://developer.sailpoint.com/discuss/u/jesvin90)\
**Post date:** [May 27, 2024, 7:53am UTC](https://developer.sailpoint.com/discuss/t/trigger-a-workflow-when-changes-to-mail-attribute-in-a-source/58022/4 "2024-05-27T07:53:46Z")

</div>

Hi @KirtiSikarwar,

Not sure if you can handle that in a single filter. Take a look at the JSON [here](https://developer.sailpoint.com/docs/extensibility/event-triggers/triggers/native-change-account-updated/).

You can try using the below filter in the trigger :

`$[?($.source.name == 'Active Directory')]`

Then try a verify data type operator (If exists) with something like below in the filter ;

`$.trigger.singleValueAttributeChanges[?(@.name == 'mail')]`

or the other way around.

---

<div class="post-metadata">

**Author:** ![ipobeidi](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/ipobeidi/32/16000_2.png) [@ipobeidi](https://developer.sailpoint.com/discuss/u/ipobeidi)\
**Post date:** [May 28, 2024, 3:23pm UTC](https://developer.sailpoint.com/discuss/t/trigger-a-workflow-when-changes-to-mail-attribute-in-a-source/58022/5 "2024-05-28T15:23:42Z")

</div>

@KirtiSikarwar Changing it on AD will not change it on ISC?

Makes more sense like @naveenkarthikkrk said. Create a Identity Attribute Change.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [July 27, 2024, 3:24pm UTC](https://developer.sailpoint.com/discuss/t/trigger-a-workflow-when-changes-to-mail-attribute-in-a-source/58022/6 "2024-07-27T15:24:02Z")

</div>

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