Using Python with RPA is a popular question on many of the forums I visit. As many people have Python skills and want to use them in the popular RPA tools on the market.
Is Python used in RPA? Python isn’t the default programming language used by market leading RPA tools UIPath, BluePrism or Automation Anywhere. As these tools are use the Microsoft .Net programming languages like C#. UIPath, BluePrism and Automation Anywhere have options for running Python scripts.
Some RPA tools have the capability to run Python scripts. However, Python may be restricted in how it can be used by some of these RPA tools and only older programming languages can be used to fill in the gaps.
Most of these RPA tools try to avoid using any programming languages at all for the basics and this is why I find RPA a good area to learn about, as it allows people with basic technical skills to get an opportunity to learn about RPA.
For those with Python programming skills, I have reviewed UIPath, Blue Prism and Automation Anywhere to assess how Python could be used, if possible.
Can we use Python in UiPath? To be able to use Python scripts in UIPath, you have to download the Python Activities Package from UIPath. Once the download has completed, UIPath will show a list of Python activities in the Activities panel.
These activities Get Python Object, Python Scope, Invoke Python Method, Load Python Script and Run Python Script are discussed below.
Get Python Object
The Get Python Object activity is used to convert a Python.Object variable into data UIPath can understand, that is a .NET datatype.
This is a temporary working area used by UIPath for Python, storing Python objects until the Python Scope activities end, when they are deleted.
Invoke Python Method
UIPath can run a specified method (Python methods are functions which are members of a class) from a Python script directly in a workflow using this activity.
A Python method may be to do some calculations and return the result of those back to UIPath as data (using Get Python Object to convert the Python variable to a .NET datatype).
Load Python Script
This activity allows UIPath to store the handlers of a Python script in a PythonObject variable. Handlers in Python are functions designed for specific events, so when something happens (an event) the associated handler in Python is alerted.
For example, a folder on a computer has been set up where documents in Spanish can be moved to, every time a document is moved to this folder, a handler is alerted and this runs Python code to move the document to another folder.
Run Python Script
The UIPath ‘Run Python Script’ activity allows Python code to be run (executed) by UIPath. Python code can be directly entered into the activity being created (into text input fields) or a location of where the script is stored added, so UIPath knows where to access the Python script.
UIPath supported Python versions
Latest versions of python may not be supported, so an older supported version of python is required. Best to check on the UIPath website to see what is supported and what isn’t.
UIPath default programming language(s)
UIPath is the market-leading RPA tool and has some capabilities to use Python scripts but this is limited and the default programming languages of VB.Net with some support for Microsoft C# (pronounced C sharp) are necessary to get the full functionality of UIPath working.
The basics of UI Path don’t require any programming knowledge as their RPA tool has been designed to get up to speed quickly. Generally, most people will use the tool to record manual steps they take and then let the tool create the automation scripts automatically.
It’s when complex tasks need to be done where some form of manipulation is done, where programming is needed. Such as automatically pulling huge amounts of data from different sources and working out what data is relevant or not, will require some level of programming knowledge.
Can Blue Prism run a Python script? To use Python in Blue Prism seems a bit more convoluted as the versions I’ve seen didn’t have the ability to directly use Python instead Python is indirectly called using the built-in C# programming language Blue Prism uses. This is done by using C# to start a batch file, with the batch file being a Python Script.
Any data calculated by the Python script can be stored temporarily in a text file on the computer and Blue Prism can then read the text file and the data in the file to use in its activities.
At the time of writing, I couldn’t find any other way of passing data between Python and Blue Prism using built-in Blue Prism functionality, but that may change in due course.
Blue Prism supported Python versions
I’m assuming as the interaction between Blue Prism and Python doesn’t seem to have the levels of integration as UIPath has, the supported versions of Python won’t matter too much, as the data outputs to files, for example, can easily be used by Blue Prism independent of Python version.
Blue Prism default Programming languages(s)
As stated in the paragraph above Blue Prism uses Microsoft C# as it’s a default programming language with scope for Microsoft VB.Net and Microsoft J#.
Blue Prism basics
The basics of Blue Prism don’t require any programming knowledge as their RPA tool has been designed to get up to speed quickly. Generally, most people will use the Blue Prism tool to record manual steps they take and then let the tool create the automation scripts automatically.
Complex tasks, on the other hand, will require some knowledge of programming to be able to get Blue Prism to work at an advanced level.
Can we use Python in Automation Anywhere? Automation Anywhere has a Python Script package available allowing python scripts to be imported and used, as well as options to enter Python code directly. The Python Script package provide Open, Execute Function, Execute Script and Close Python functionality.
Opens a Python Script file by either providing the location of the Python script, allowing for the script to be imported or directly entering Python code manually into the Python field. The version of Python being used needs to be specified, either version 2 or version 3.
Executes a function within the Python Script by specifying the Python Script function name and any arguments if any, to the script opened in the ‘Open’ command above. The output from the Python function can be assigned to a variable for Automation Anywhere to understand and use.
Executes a script by specifying the Python Script name and any arguments if any, to the script opened in the ‘Open’ command above. The output from the Python script can be assigned to a variable for Automation Anywhere to understand and use.
Closes the session where the Python Script or Python Function opened was run. This is a mandatory step after any Python script or function has been run.
Automation Anywhere supported Python versions
Automation Anywhere can use Python version 2.x and 3.x, however, I would check to see if the latest version of Python can be used by looking at the Automation Anywhere support pages.
Automation Anywhere default programming language(s)
The core programming language used in Automation Anywhere is Microsoft C#.
Automation Anywhere basics
The basics of Automation Anywhere don’t require any programming knowledge as their RPA tool has been designed to get up to speed quickly. Generally, most people will use the Automation Anywhere tool to record manual steps they take and then let the tool create the automation scripts automatically.
Complex tasks, on the other hand, will require some knowledge of programming to be able to get Automation Anywhere to work at an advanced level.
Why is python required for RPA?
Advanced tasks in most RPA tools will require some programming knowledge as complex analysis and tasks can’t be done using the recording and capturing functionality.
Such as obtaining data using a web scrape (extract data from a website) and then manipulating this data to exactly how you’d like to use it. As the data may be in a raw state and require additional process and analysis to get the data to a state where it’s usable.
This is where programming languages like Python would make a good choice in being able to use the various libraries available for it to do the hard grunt of data manipulation.
Python’s demand in RPA is increasing down to there being more Python skilled people available and the possibilities Python offers when used with RPA.
Are you new to RPA, find out What is RPA? I have created this article with essential information you need to know.
Cognitive Robotic Process Automation (Cognitive RPA)
Cognitive Robotic Process Automation (Cognitive RPA) is the next stage in the development of RPA and allows the integration of RPA with Artificial Intelligence (AI).
This gives RPA cognitive abilities allowing RPA to listen, read and learn, all using Artificial Intelligence and then use these cognitive abilities to make decisions in their automation.
Being able to use Artificial Intelligence and more specifically the Machine Learning (ML) aspects requires programming skills to make the models that can do natural language learning, so voice recognition can work and these activities require skills in Python.
The information gathering by listening (voice data), analysing using speech recognition, from reading using natural language learning uses Python programming to analyse the information using Machine Learning.
Once this has been done, Python programming is used to pass this analysed information to the RPA tools into a format the RPA tools can understand.
.NET dying languages
Many people believe the .NET languages are becoming old and obsolete in essence, they are dying out. This leads to fewer people learning about these languages which makes getting skilled individuals to do complex RPA becomes more difficult.
Python, on the other hand, is an abundant leading-edge language with a massive talent pool that the RPA companies are realising are important in the development of RPA in the future.
No programming required to get started in RPA
To start using most of the RPA tools requires no programming to get started, so if you don’t have any Python or other programming skills this isn’t necessarily an issue to get going.
To get up to speed with the basics of RPA the manufacturers of the RPA tools made them easy to use. The easier the RPA tool is to use the more they can sell. It’s a basic good business strategy to do this, as it means more profit from increased sales.
Some of the newer tools do have python capabilities but these tools do not have the market share of the top three leading RPA tools.
The leading pack of UIPath, Blue Prism or Automation Anywhere do offer some capabilities to use Python with some limitations. Some of the newer RPA tools do have stronger Python capabilities than the leading RPA tools but these tools are not widely used.
Cognitive RPA could increase the need for Python programming as Python is used extensively in AI and Machine Learning to be exact.
Is Python scripting used for RPA? Yes, Python scripts can be used UIPath, Automation Anywhere and called from Blue Prism. However, Python is not the default programming language in these tools.
Python vs UIPath? Python can be used for automation but it doesn’t have the speed of creating automation that UIPath can do, using it’s recording and scraping technologies.