I want to create a workflow that sends an email only when the aggregation of a specific source fails

I have created a workflow, and it is working well—an email is sent only when an aggregation ends with an error. However, I want it to trigger only for a specific source’s aggregation, not for all sources.

Based on the workflow test pane, the input for an “Account Aggregation Completed” trigger is:

{
  "source": {
    "id": "4e4d982dddff4267ab12f0f1e72b5a6d",
    "name": "Corporate Active Directory",
    "type": "SOURCE"
  },
  "status": "Success",
  "started": "2020-06-29T22:01:50.474Z",
  "completed": "2020-06-29T22:02:04.090Z",
  "errors": [],
  "warnings": [
    "Account skipped"
  ],
  "stats": {
    "scanned": 200,
    "unchanged": 190,
    "changed": 6,
    "added": 4,
    "removed": 3
  }
}

You can add a Compare Strings operator right after the Account Aggregation Completed trigger to check on the $.trigger.source.name and see if it matches the specific source. If false, End Step Success. If true, send your email notification.

2 Likes

Hello @AbhijeetPatil

I writte this blog that help Using IdentityNow Workflows to Send a List of Uncorrelated Accounts After Aggregation - Content / Community Blog - SailPoint Developer Community

The usecase was to send a notification after each aggregation.

Also it explain how to filter for specific sources.
In that trigger I also filter on Success aggregation but in your case you have to filter on success like :

$[?((@.source.name in ["My source 1", "My source 2", "My source 3"]) && (@.status != "Success"))]

or

$[?((@.source.name in ["My source 1", "My source 2", "My source 3"]) && (@.status != "Error"))]

Just check the exact name of error status.

2 Likes

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