Integrating Python with UIPath

Hi Team,

can anyone help me with 2 or 3 examples, how python can be used with UiPath.

is it only by declaring a function in py file and passing parameters from UiPath is the only way we can call from UiPath, any other ways we can work with python


thats the way we can work with python

there are technically no other ways…one more way also includes creating py file and you can together create a bat file to invoke python script and run the bat file from UiPath …which is not needed…so better would be direct invoke…here is an example


what is the difference between code and File options in Run Python Script activity


is it either of the properties we need to use or both of them, and i understand that File is the python file then what about Code paramter

in code field you can write the python code and in file field you can give the python script.

Hi @devasaiprasad_K,

Also, to add—it’s an either/or situation. So, you can either provide the code directly or provide the path to the Python file. If you provide both, it will show an error (see screenshot).

It might sound silly, yet in cases like this, it’s always worth checking the UiPath documentation since it’s pretty good.

Activities - Run Python Script (


As mentioned code is to directly write code in the editor no .py file is needed

In file use a .py file

If the code is reaticey small then we can use code directly


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.