You can use the trigger Provisionning Completed Triggers - SailPoint Identity Services
It look like this :
{
"trackingNumber":"4b4d982dddff4267ab12f0f1e72b5a6d",
"action":"IdentityRefresh",
"requester":{
"id":"2c91808b6ef1d43e016efba0ce470906",
"name":"Adam Admin",
"type":"IDENTITY"
},
"recipient":{
"id":"2c91808b6ef1d43e016efba0ce470909",
"name":"Ed Engineer",
"type":"IDENTITY"
},
"errors":[
"General Error",
"Connector AD Failed"
],
"warnings":[
"Notification Skipped due to invalid email"
],
"sources":"Corp AD, Corp LDAP, Corp Salesforce",
"accountRequests":[
{
"source":{
"id":"4e4d982dddff4267ab12f0f1e72b5a6d",
"name":"Corporate Active Directory",
"type":"SOURCE"
},
"accountId":"CN=example,ou=sample,ou=test,dc=ex,dc=com",
"accountOperation":"Modify",
"provisioningResult":"committed",
"provisioningTarget":"Corp AD",
"ticketId":"72619262",
"attributeRequests":[
{
"operation":"Add",
"attributeName":"memberOf",
"attributeValue":"CN=admin,DC=training,DC=com"
}
]
}
]
}
As you can see we have error arrays and provisioningResult you can combine these to check if you are error or not then you can send and email
And also to add error message you can define template contexte variable as described here Using IdentityNow Workflows to Send a List of Uncorrelated Accounts After Aggregation - Content / Community Blog - SailPoint Developer Community