Introduction to Robotic Process Automation

Eleonora Fontana
Betacom
Published in
3 min readJun 28, 2021
Photo by NeONBRAND on Unsplash

Introduction

Robotic Process Automation (RPA) refers to all the technologies, products and procedures involved in the automation of work processes. It is based on intelligent software that can automatically perform the repetitive activities of operators, imitating their behavior and interacting with IT applications.

“Intelligent software” refers to the possibility to add elaborate components. For example, there are robots that learn by watching the user’s activity, similarly to the Excel macro tool. In this way, human actions can literally be copied and imitated by a robot.

In this article we will discuss the advantages and uses of RPA and we will look at a simple example using Python.

Why RPA?

Businesses can use RPA in several tasks, such as generating mass emails, extracting data from documents, creating and sending invoices, employee history verification, payroll automation, and so on.

The typical benefits of Robotic Process Automation include the following:

  • reduced cost, thanks to the reduction of employees and their reuse for other tasks;
  • increased accuracy, given that the activities subject to automation are those that, if carried out by the human operator, are more prone to errors since they are repetitive;
  • reduction of the time required for carrying out activities;
  • no impact on information systems, since existing applications are not interfaced (by definition, robots use applications in the same way as the human operator);
  • extra security, especially for sensitive data and financial services.

There are multiple areas of application of the RPA, from the front-office to the back-office. The most suitable sectors are the ones characterized by significant volumes of repetitive activities, such as:

  • Financial Services (e.g. for bank loan approvals),
  • Tourism (for order confirmations),
  • Health Care (for patient reporting),
  • Customer Care,
  • eCommerce Merchandising Operation,
  • OCR Application,
  • Data Extraction Process.

According to Harvard Business Review, most operations groups adopting RPA have promised their employees that automation would not result in layoffs. Instead, workers have been redeployed to do more interesting work. One academic study (Robotic Process Automation at Xchanging) also highlighted that workers did not feel threatened by automation: they embraced it and viewed the robots as team-mates. It results in greater productivity with the same number of people.

RPA for Python

There are of course different ways to perform RPA in Python. The one we will discuss today is based on the rpa package distributed by Tebel.Automation, an open-source company started in 2016 by Ken Soh. The package documentation is available at tebelorg/RPA-Python: Python package for doing RPA.

In this section we will go through a simple example of RPA: the robot will just open a browser window and go to a given website. We assume you are familiar with Python.

The first thing to do is download the package: open a command prompt and execute pip install rpa. You also have to install Amazon Corretto, a no-cost, multi-platform, production-ready distribution of the Open Java Development Kit (OpenJDK). You should install the version 8 which is available at this link. It is necessary to look at the actions that the robot will perform.

Let’s now write a simple Python code which goes to the Betacom publication page on Medium.

First of all we need to import the rpa package:

import rpa

Now we can initialize the rpa to open a new browser window. The browser used by the rpa package is Google Chrome.

rpa.init()

The aim of the example is to navigate to the Betacom publication on Medium. To do so we just need o provide the page url to the url method:

rpa.url(‘https://medium.com/betacom')

The last thing to do is to close the browser windows by closing the rpa connection:

rpa.close()

Obviously, this is a very basic RPA and is supposed to give you just a sample of what you can achieve with it. Between the rpa.init() and rpa.close() you can add all the actions you need the robot to perform. They can be operations such as mouse and keyboard automation (you can replicate the human action of clicking a button and writing texts), OCR automation (e.g. read an image or a PDF file), and so on.

Conclusion

You should now be familiar with the concept of RPA and its advantages. In the next article we will explain more advanced operations the RPA could perform and we will provide an example code in Python for them.

--

--