Need help to run python script from ServiceNow.

Anil Lande
Kilo Patron

I am trying to run python script from ServiceNow. I tried a way to run Commands through Mid Server but it is not detecting python command however other windows commands run properly.

Also I tried to run a Batch file by same way which then execute python script in Local environment, but no luck.

I am not sure if I need to make any additional changes on my Windows System to allow execution of Python from through Mid Server.

 

find_real_file.png

Any help would be appreciated.

Thanks

Anil

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande
2 REPLIES 2

Shekhar Deshin1
Mega Guru

You'll need to install Python on your MID servers that you intend to use.

This is probably the more OOB way to do it. You should be able to call it via a PowerShell activity using this syntax:

https://stackoverflow.com/questions/19676403/running-python-in-powershell

Harsh Vardhan
Giga Patron

 Adding one  blog here , kindly have a look.

 

Python Script Execution in Cloud Management Platform