# Identity Create Workflow

**URL:** <https://developer.sailpoint.com/discuss/t/identity-create-workflow/65620>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, sailpoint-identity-security, provisioning\
**Created:** [June 12, 2024, 1:33pm UTC](https://developer.sailpoint.com/discuss/t/identity-create-workflow/65620 "2024-06-12T13:33:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![VBsupport](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@VBsupport](https://developer.sailpoint.com/discuss/u/VBsupport)\
**Post date:** [June 12, 2024, 1:33pm UTC](https://developer.sailpoint.com/discuss/t/identity-create-workflow/65620/1 "2024-06-12T13:33:27Z")

</div>

Hello Team,

I have created a working workflow that I would love to share which fires off a email wit the account and password to the manager when the account is created. This works great for default setting on any account. However I am trying to limit it only to one source which the system keeps telling me a invaild json expression and will not me pass. I have not seen any exsample in white pages or ingeneral and wanted ask if anyone had a eye what is not correct below.

I have tried on identity create and source create triggers but it won’t pass for some reason

$.accountRequests[?(@.source.name == “SNOW Non-Human Service Accounts Source” && @.accountOperation == “Create” && @.provisioningResult == “SUCCESS”)]

---

<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:** [June 12, 2024, 1:57pm UTC](https://developer.sailpoint.com/discuss/t/identity-create-workflow/65620/2 "2024-06-12T13:57:22Z")

</div>

Hi @VBsupport,

Have you tried this on the Provisioning completed trigger.?

`$.accountRequests[?(@.source.name == "SNOW Non-Human Service Accounts Source" && @.accountOperation == "Create" && @.provisioningResult == "SUCCESS")]`

---

<div class="post-metadata">

**Author:** ![VBsupport](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@VBsupport](https://developer.sailpoint.com/discuss/u/VBsupport)\
**Post date:** [June 12, 2024, 2:12pm UTC](https://developer.sailpoint.com/discuss/t/identity-create-workflow/65620/3 "2024-06-12T14:12:42Z")

</div>

> [@jesvin90](#):
>
> $.accountRequests[?(@.source.name == “SNOW Non-Human Service Accounts Source” && @.accountOperation == “Create” && @.provisioningResult == “SUCCESS”)]

Sadly it did not fire off when i imported a new file with a new record. The records got created in IDN and then AD etc but did not fire off the email.

Do you have any idea or an example that if any accounts get created for the source “XYZ” fire off the email? That would be the simpler path for all but not me for some reason

---

<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:** [June 12, 2024, 2:14pm UTC](https://developer.sailpoint.com/discuss/t/identity-create-workflow/65620/4 "2024-06-12T14:14:56Z")

</div>

This is something that you can try without using workflows :

[https://community.sailpoint.com/t5/IdentityNow-Wiki/API-to-Notify-Users-When-a-New-Account-is-Provisioned/ta-p/77476](https://community.sailpoint.com/t5/IdentityNow-Wiki/API-to-Notify-Users-When-a-New-Account-is-Provisioned/ta-p/77476)

The API’s mentioned in the document are replaced by the below ones ;

> [@POST /api/emailTemplate/setAccountCreateNotificationOptions](https://developer.sailpoint.com/discuss/t/post-api-emailtemplate-setaccountcreatenotificationoptions/31517):
>
> Replaced by [update-source | SailPoint Developer Community](https://developer.sailpoint.com/idn/api/v3/update-source) Use the following request body to set the account create notification options. [{ "op": "add", "path": "/connectorAttributes/accountCreateNotification", "value": { "notifyAccountManager": false, "accountIdAttribute": "distinguishedName", "notifyList":["...@...","...@..."], "notifyAccountOwner": false, "enabled": true, "notifyAccountOwnerAltEmail": false } } ]

---

<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:** [June 12, 2024, 2:18pm UTC](https://developer.sailpoint.com/discuss/t/identity-create-workflow/65620/5 "2024-06-12T14:18:25Z")

</div>

Did you replace the filter with your AD source name and try.?

`$.accountRequests[?(@.source.name == "Active Directory Source" && @.accountOperation == "Create" && @.provisioningResult == "SUCCESS")]`

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [June 12, 2024, 2:22pm UTC](https://developer.sailpoint.com/discuss/t/identity-create-workflow/65620/6 "2024-06-12T14:22:06Z")

</div>

What does your workflow look like? What trigger are you using? You probably want the Source Account Created trigger, which is an early access trigger that requires a support ticket to unlock in your tenant. This trigger would fire anytime an account is created on a source, and the JSONpath filter expression would be easy to implement to filter on a given source.

> **[Source Account Created | SailPoint Developer Community](https://developer.sailpoint.com/docs/extensibility/event-triggers/triggers/source-account-created)**
>
> Fires after a source account is created.

---

<div class="post-metadata">

**Author:** ![VBsupport](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@VBsupport](https://developer.sailpoint.com/discuss/u/VBsupport)\
**Post date:** [June 12, 2024, 2:35pm UTC](https://developer.sailpoint.com/discuss/t/identity-create-workflow/65620/7 "2024-06-12T14:35:33Z")

</div>

> [@jesvin90](#):
>
> $.accountRequests[?(@.source.name == “Active Directory Source” && @.accountOperation == “Create” && @.provisioningResult == “SUCCESS”)]

pretty darn basic. I can also open a ticket. i may just use another attribute to just that account type but i rather to the whole source so if account type adds or removes i dont have to update the WF

 ![image](https://global.discourse-cdn.com/sailpoint/original/2X/1/13715c59433ec7e033feee75b8cc5724cc572fe4.png)

---

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [June 12, 2024, 2:40pm UTC](https://developer.sailpoint.com/discuss/t/identity-create-workflow/65620/8 "2024-06-12T14:40:34Z")

</div>

The identity created trigger doesn’t provide the source in the payload. It only provides the identity ID, name, and attributes associated with the identity.

> **[Identity Created | SailPoint Developer Community](https://developer.sailpoint.com/docs/extensibility/event-triggers/triggers/identity-created)**
>
> Fires after an identity is created.

If you need to trigger this workflow when an account is created on a specific source, then I suggest the [source account created trigger](https://developer.sailpoint.com/docs/extensibility/event-triggers/triggers/source-account-created).

Alternatively, the [provisioning completed trigger](https://developer.sailpoint.com/docs/extensibility/event-triggers/triggers/provisioning-completed) using @jesvin90 's filter expression should work.

`$.accountRequests[?(@.source.name == "Active Directory Source" && @.accountOperation == "Create" && @.provisioningResult == "SUCCESS")]`

---

<div class="post-metadata">

**Author:** ![VBsupport](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@VBsupport](https://developer.sailpoint.com/discuss/u/VBsupport)\
**Post date:** [June 12, 2024, 3:05pm UTC](https://developer.sailpoint.com/discuss/t/identity-create-workflow/65620/9 "2024-06-12T15:05:02Z")

</div>

Thanks Colin, The white pages really should give sample than just a sample json to help us. Anyhow i decided to use an attribute only for these account types and it is working as needed. Not ideal as i had to create another attribute but gets me what i need

---

<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:** [August 11, 2024, 3:05pm UTC](https://developer.sailpoint.com/discuss/t/identity-create-workflow/65620/10 "2024-08-11T15:05:10Z")

</div>

Closed on August 11, 2024, 3:05pm UTC

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