The CreatorCon Call for Content is officially open! Get started here.

use python script in service now

prakharsinha
Kilo Explorer

I need to now if python scripts can be used in service now.

I need to achieve multiple task using python scripts on service now.

If that is possible how the scripts can be implemented ?

Also if python is not applicable what is the recommended alternative

12 REPLIES 12

So.. do you want to run Python scripts on the MID server, not in the platform?


yes we want to run script on MID server & that data will be exported to service now CMDB.


or is there any other approach?


yes we want to run script on MID server & that data will be exported to service now CMDB.


or is there any other approach?


Essentially, you could run python code on any machine in your infrastructure - if your MID has a python interpreter then you're fine.



What you won't be able to do with the code is interact with the MID - the Java process running there - so it's not actually running on the MID server, it's running on the OS that houses the MID server process.



When you say "exported to ServiceNow CMDB", do you mean "imported into our CMDB"?   If so, you could use the REST API to inject records into this table.


How can we import data from rest API to CMDB


prakhar sinha wrote:



How can we import data from rest API to CMDB


I'm unclear about this question... do you wish to:


  • import data into the CMDB
  • export data from the CMDB

Do you want to use Python to update the CMDB? Is that what you're trying to do?