Triggering External Script on creation of an ticket or incident in service now

madan
Kilo Explorer

Is there any option to invoke or trigger an external custom shell or python script on creation of an ticket or incident in service now.

Also, sysid or incident number should be passed as input parameter to the script.

How do we achieve this in service now?

-Madan

7 REPLIES 7

SandySeegers..   Thank you for your reply.   I will tell you the scenario.   I have a incident where I will need to pass one or two parameters I picked up from the incident record to the MID server topic command.   Can that be done?


Randy,



You would create a business rule on the INC that executes on Save.   This business rule would contain script very similar to my original response.   Notice the assignment of the name field.   I'm passing 3 parameters to the execution of the .sh script. (INC# plus 2 status values).   You need to craft your Python script to accept   passed parameters ( (again I'm just assuming this is possible - I don't have any Python experience).



egr.name = /opt/patrol/release/SAM/smarts/local/script/ic-update-from-TT-SN.sh INC000003766544 "Resolved" "Closed"



Sandy


how do we pass the data back to SN.   my desired outcome is either to pass the data as a file or pass the data back to SN for further processing.