# IDN Workflow to send notification when the accounts are due to expire

**URL:** <https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309>\
**Category:** SHF Discussion and Questions\
**Tags:** sailpoint-identity-security\
**Created:** [August 13, 2025, 1:28pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309 "2025-08-13T13:28:41Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssel](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@ssel](https://developer.sailpoint.com/discuss/u/ssel)\
**Post date:** [August 13, 2025, 1:28pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/1 "2025-08-13T13:28:41Z")

</div>

I have set up a scheduled trigger to send notifications when accounts are about to expire, got the error below

| {“error”:“unable to get value with path ‘$.getIdentity1.attributes.endDate:[now TO now+8d]’, output value was ‘’: jsonslice.Get was unable to get value with path ‘$.getIdentity1.attributes.endDate:[now TO now+8d]’: path: invalid character at 33”} |
| --- |
| |

“

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/6/e/6edb757a7ea0b6bfe08e5255f976c1e443354950.png)

---

<div class="post-metadata">

**Author:** ![LEOS](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/leos/32/27180_2.png) [@LEOS](https://developer.sailpoint.com/discuss/u/LEOS)\
**Post date:** [August 13, 2025, 1:42pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/2 "2025-08-13T13:42:31Z")

</div>

Hello @ssel ,

Could you test with ‘$.getIdentity1.attributes.endDate:**[now TO now+8d/d]**’ please ?

---

<div class="post-metadata">

**Author:** ![ssel](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@ssel](https://developer.sailpoint.com/discuss/u/ssel)\
**Post date:** [August 13, 2025, 2:28pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/3 "2025-08-13T14:28:03Z")

</div>

could you please tell me how to test?

---

<div class="post-metadata">

**Author:** ![LEOS](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/leos/32/27180_2.png) [@LEOS](https://developer.sailpoint.com/discuss/u/LEOS)\
**Post date:** [August 13, 2025, 4:17pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/4 "2025-08-13T16:17:41Z")

</div>

Can you send me your workflow in JSON please ?

So I can fix in yours and send it to you back 🫠

---

<div class="post-metadata">

**Author:** ![ssel](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@ssel](https://developer.sailpoint.com/discuss/u/ssel)\
**Post date:** [August 13, 2025, 4:25pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/5 "2025-08-13T16:25:20Z")

</div>

Sure thing,

{  
“id”: “13a9ba68-3ee6-4ece-ae69-4704d1759c40”,  
“name”: “Notify Manager of Non Employee End Date”,  
“description”: “”,  
“created”: “2025-08-11T19:22:59.368147099Z”,  
“modified”: “2025-08-13T15:04:49.957669419Z”,  
“modifiedBy”: {  
“type”: “IDENTITY”,  
“id”: “1e7b01ebe4a441558d14addda5a1f60c”,  
“name”: “”  
},  
“definition”: {  
“start”: “Get List of Identities”,  
“steps”: {  
“End Step - Success 1”: {  
“actionId”: “sp:operator-success”,  
“displayName”: “”,  
“type”: “success”  
},  
“Get List of Identities”: {  
“actionId”: “sp:get-identities”,  
“attributes”: {  
“inputQuery.$”: “$.getIdentity1.attributes.endDate:[now TO now+15d]”,  
“inputSavedSearch”: “6848b8ac-e33f-4376-bc7b-1e5d15ff52e0”,  
“searchBy”: “savedSearch”  
},  
“displayName”: “”,  
“nextStep”: “Loop”,  
“type”: “action”,  
“versionNumber”: 2  
},  
“Loop”: {  
“actionId”: “sp➿iterator”,  
“attributes”: {  
“context.$”: “$.loop.context.manager”,  
“input.$”: “$.getListOfIdentities.identities”,  
“start”: “Get Identity”,  
“steps”: {  
“Compare Timestamps 1”: {  
“actionId”: “sp:compare-timestamps”,  
“choiceList”: [  
{  
“comparator”: “TimestampEquals”,  
“nextStep”: “Send Email 1”,  
“variableA.$”: “$.defineVariable.varToday”,  
“variableB.$”: “$.defineVariable.var8Days”  
}  
],  
“defaultStep”: “Compare Timestamps 2”,  
“displayName”: “8 Days to End Date”,  
“type”: “choice”  
},  
“Compare Timestamps 2”: {  
“actionId”: “sp:compare-timestamps”,  
“choiceList”: [  
{  
“comparator”: “TimestampEquals”,  
“nextStep”: “Send Email 2”,  
“variableA.$”: “$.defineVariable.varToday”,  
“variableB.$”: “$.defineVariable.var1Days”  
}  
],  
“defaultStep”: “End Step - Success”,  
“displayName”: “1 Day to End Date”,  
“type”: “choice”  
},  
“Define Variable”: {  
“actionId”: “sp:define-variable”,  
“attributes”: {  
“id”: “sp:define-variable”,  
“variables”: [  
{  
“description”: “”,  
“name”: “var8Days”,  
“transforms”: [  
{  
“id”: “sp:transform:subtractTime:time”,  
“input”: {  
“length”: 8,  
“unit”: “days”  
}  
}  
],  
“variableA.$”: “$.getIdentity.attributes.endDate”  
},  
{  
“description”: “”,  
“name”: “var1Days”,  
“transforms”: [  
{  
“id”: “sp:transform:subtractTime:time”,  
“input”: {  
“length”: 1,  
“unit”: “days”  
}  
}  
],  
“variableA.$”: “$.getIdentity.attributes.endDate”  
},  
{  
“description”: “”,  
“name”: “varToday”,  
“transforms”: [  
{  
“id”: “sp:transform:subtractTime:time”,  
“input”: {  
“length”: 0,  
“unit”: “days”  
}  
}  
],  
“variableA.$”: “$.getIdentity.attributes.endDate”  
}  
]  
},  
“displayName”: “”,  
“nextStep”: “Compare Timestamps 1”,  
“type”: “Mutation”  
},  
“End Step - Success”: {  
“actionId”: “sp:operator-success”,  
“displayName”: “”,  
“type”: “success”  
},  
“Get Identity”: {  
“actionId”: “sp:get-identity”,  
“attributes”: {  
“id.$”: “$.loop.loopInput”  
},  
“displayName”: “”,  
“nextStep”: “Define Variable”,  
“type”: “action”,  
“versionNumber”: 2  
},  
“Send Email 1”: {  
“actionId”: “sp:send-email”,  
“attributes”: {  
“body”: "  
“context”: {},  
“from”: “no-reply@sailpoint.com”,  
“recipientEmailList.$”: “$.getIdentity.attributes.email”,  
“replyTo”: “Test@Dummycu.org”,  
“subject”: “Notification: Non-Employee End Date in 10 days”  
},  
“displayName”: “”,  
“nextStep”: “End Step - Success”,  
“type”: “action”,  
“versionNumber”: 2  
},  
“Send Email 2”: {  
“actionId”: “sp:send-email”,  
“attributes”: {  
“body”: "  
“from”: “no-reply@sailpoint.com”,  
“recipientEmailList.$”: “$.getIdentity.attributes.email”,  
“replyTo”: “TEst@Dummycu.org”,  
“subject”: “Notification: Non-Employee End Date in 5 days”  
},  
“displayName”: “”,  
“nextStep”: “End Step - Success”,  
“type”: “action”,  
“versionNumber”: 2  
}  
}  
},  
“description”: null,  
“displayName”: “”,  
“nextStep”: “End Step - Success 1”,  
“type”: “action”,  
“versionNumber”: 1  
}  
}  
},  
“enabled”: false,  
“executionCount”: 0,  
“failureCount”: 0,  
“creator”: {  
“type”: “IDENTITY”,  
“id”: “e3e3d148b64a42daa11549fe47033183”,  
“name”: “12264”  
},  
“owner”: {  
“type”: “IDENTITY”,  
“id”: “e3e3d148b64a42daa11549fe47033183”,  
“name”: “12264”  
},  
“trigger”: {  
“type”: “SCHEDULED”,  
“attributes”: {  
“cronString”: “0 7 \* \* \*”,  
“dailyTimes”: [  
“1969-12-31T12:00:00.000Z”  
],  
“frequency”: “daily”,  
“id”: “idn:cron-schedule”,  
“timeZone”: “America/New\_York”  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![ssel](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@ssel](https://developer.sailpoint.com/discuss/u/ssel)\
**Post date:** [August 13, 2025, 4:27pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/6 "2025-08-13T16:27:12Z")

</div>

also, need a search query to return identities exaclty 7 days from the day, meaning it needs to return only the users whose enddate is 08/20

---

<div class="post-metadata">

**Author:** ![ssel](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@ssel](https://developer.sailpoint.com/discuss/u/ssel)\
**Post date:** [August 13, 2025, 4:43pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/7 "2025-08-13T16:43:10Z")

</div>

Thank you so much, it means a lot

---

<div class="post-metadata">

**Author:** ![ssel](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@ssel](https://developer.sailpoint.com/discuss/u/ssel)\
**Post date:** [August 13, 2025, 7:08pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/8 "2025-08-13T19:08:07Z")

</div>

any idea, please?

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/e/f/ef9d7dc5b112d960fdaefea8acd8892e1f0e057e.png)

---

<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:** [August 13, 2025, 8:27pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/9 "2025-08-13T20:27:33Z")

</div>

Hi @ssel

In your use case have tried to use ISC out to the box saved search [Managing Saved Searches - SailPoint Identity Services](https://documentation.sailpoint.com/saas/help/search/saved-searches.html) ?

---

<div class="post-metadata">

**Author:** ![ssel](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@ssel](https://developer.sailpoint.com/discuss/u/ssel)\
**Post date:** [August 13, 2025, 8:42pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/10 "2025-08-13T20:42:28Z")

</div>

How do I cc on these notifications if I have to choose a variable for the recipient? meaning I need to add a DL to the recepient email address along with manager’s email

“recipientEmailList.$”: “$.getIdentity1.attributes.email”,

---

<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:** [August 14, 2025, 8:14am UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/11 "2025-08-14T08:14:47Z")

</div>

Who will receive the notification? The manager?

---

<div class="post-metadata">

**Author:** ![LEOS](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/leos/32/27180_2.png) [@LEOS](https://developer.sailpoint.com/discuss/u/LEOS)\
**Post date:** [August 14, 2025, 8:58am UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/12 "2025-08-14T08:58:03Z")

</div>

Hello @ssel ,

Here you can find the workflow that I fixed for you :

[NotifyManagerofNonEmployeeEndDate20250814.json](https://developer.sailpoint.com/discuss/uploads/short-url/zPtopGaskXADjZOs2KujM4Cl25J.json) (4.8 KB)

1/ First of all, in your Get Identity Action, the `id`was missing inside the Identity choose variable :

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/e/0/e0a371f5a379d7b6a5da9db6fcdd2a2bfff81ae7.png)

I fixed it !

2/ I also changed the Get List of Identities method to be more easy to manage it instead of using Saved Search :

 ![image](https://global.discourse-cdn.com/sailpoint/original/3X/f/b/fb390ab43e86005d6c9dea171fe6b90367f53ec0.png)

This Search Query means all identities whose attributes.endDate is between now TO now + 15 days.

3/ If you want to return identities exaclty 7 days from the day, you can change the Query to`attributes.endDate:[now+7d/d TO now+7d/d]` but you should also delete your define variable and all others comparators.

I hope my post will help you 😀

---

<div class="post-metadata">

**Author:** ![ssel](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@ssel](https://developer.sailpoint.com/discuss/u/ssel)\
**Post date:** [August 14, 2025, 2:56pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/13 "2025-08-14T14:56:52Z")

</div>

Thank you so much !! Also, email needs to be sent to manager as well as the distribution list in choose variable, can we do that?

---

<div class="post-metadata">

**Author:** ![ssel](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@ssel](https://developer.sailpoint.com/discuss/u/ssel)\
**Post date:** [August 14, 2025, 2:57pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/14 "2025-08-14T14:57:40Z")

</div>

Yes, also it needs to go to the distribution list

---

<div class="post-metadata">

**Author:** ![suresh4iam](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/suresh4iam/32/29513_2.png) [@suresh4iam](https://developer.sailpoint.com/discuss/u/suresh4iam)\
**Post date:** [August 14, 2025, 7:31pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/15 "2025-08-14T19:31:06Z")

</div>

Yes, you can do that by adding multiple emails in the Send Email action in the Workflow.

```auto

"recipientEmailList": [
                        "{{$.getManagerIdentity.attributes.email}}",
                        "testDL@domain.com"
                    ]

```

---

<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:** [October 13, 2025, 7:31pm UTC](https://developer.sailpoint.com/discuss/t/idn-workflow-to-send-notification-when-the-accounts-are-due-to-expire/169309/16 "2025-10-13T19:31:30Z")

</div>

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