How to fetch errors from logs in a workflow for triggering mail?

rathikaramamurt
Giga Expert

Hi Team,

I am currently working on an Orchestration workflow, which is used from creating users through SN automation to Active Directory. There is an issue while creating users. i.e., for already existing users, an error is triggered in the logs--> "The specified account already exists"

find_real_file.png

In such cases for Failure, I want to fetch the error from logs in the workflow and notify User (create event OR email notification), about this error "The specified account already exists, submit a new request through General SR form".

Any help wold be greatful!

1 ACCEPTED SOLUTION

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Why not check for this in the workflow instead and do a notification activity to the user if the user exits. If not a mail is what you want to happen?



//Göran


View solution in original post

8 REPLIES 8

Hi,



Sorry for the late reply. Have you solved it yet? Not sure what you are meaning. If you look at the result, it says failure,so that is the reason it takes the "failure" way.



//Göran


And it would be good to see the condition set in the conditions.


Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Why not check for this in the workflow instead and do a notification activity to the user if the user exits. If not a mail is what you want to happen?



//Göran


Hi Goran,



Thanks a lot for your suggestions!



I tried out that way and it worked out for me.



Since the error for exisitng user came from AD, this was the only reason for failure. I have created a notification event in the workflow for the error triggered and this way my issue was solved.