Complete Guide On Open Source RPA Tool Automagica
(Step by Step Guide to create your first Bot Using Automagica Tool)
Welcome to our next edition of Open Source RPA Tools Coverage guide, today we will talk about “Automagica” The Opensource Smart Robotic Process Automation.
In this detailed blog, I will cover
- What’s is Automagica?
- How it’s Different from Other RPA Leading Tools (UiPath or BluePrism or Automation Anywhere)
- How to start working with Automagica, Quick Set up Guide
- Different ways of Automating Using Automagica
- Quick Example to Build First Robot Using Automagica Flow
- How to Perform various actions like deploying bot, creating jobs
- Monitor logs, Notification settings etc.
Introduction to Automagica
As per Automagica Website “Automagica is an open-source automation suite for fully automating tedious, manual tasks on any screen. Our vision is that people should not be doing a robot’s job. Our mission is to make these automation tools as accessible as possible to empower everyone to automate (almost) anything.”
With their recent release of 3.0, Which comes with exiting loaded features to build software bots easily. The all-new Automagica Flow (Visual Editor) and more enhanced Automagica Portal with lot of features make it more powerful and obvious choice for those who are looking for Open Source Solution.
The Command Line Interface (CLI) has been fully redesigned as well to interact well with Automagica Lab, Automagica Flow and the Automagica Wand.
Very similar to what we have for other leading tools known as Orchestrator/Cockpit or Control Room.
Automagica Flow provides a visual interface to build your bot, similar to Studio where you can build, test, debug.
Wand uses machine learning algorithms to look for elements on the screen that were recorded to build robust automation using the GUI.
Automagica Lab allows you to build software bots from an interactive development environment (IDE) Built on Top of Jupyter Notebooks
Runtime/agent responsible for performing the automated tasks.
Components of Automagica
- Automagica Portal– You can manage your entire digital workforce from a central location such as Scheduling, Reporting, Version Controls along with managing the Robot. It’s very similar to what we have for other leading tools known as Orchestrator/Cockpit or Control Room.
- Automagica Flow – Automagica Flow provides a visual interface to build your bot, it provides functionality similar to Studio where you can build, test, debug and configure your bots.
- Automagica Wand – Responsible for integrating with Ui Elements, Wand uses machine learning algorithms to look for elements on the screen that were recorded, which allows you to build robust automation using the GUI.
- Automagica Lab – Jupyter Notebooks needs no introduction to Python developers as it provides interactive development to build and collaborate code in the browser. Similarly, Automagica Lab allows you to build software bots from an interactive development environment (IDE) Built on Top of Jupyter Notebooks. This is great for Python Folks!
- Automagica Bot: runtime/agent responsible for performing the automated tasks.
Table of Contents
How it’s Different from Other RPA Leading Tools
Below are the key features of Automagica which make it Different than Other Proprietary RPA Tools.
- Under the hood Automagica is built on top of Python and some other great Open Source Python Eco-system library, hence it provides you with the full capability to use all Python Base Powerful Library to be used inside automation such as Pandas, TensorFlow, Numpy and many others.
- Fully open sourced Automagica Flow and source code can be found on Automagica GitHub!
- Automagica is fully cross-platform and built with Python, So it’s supported on different Operating System environment such as Linux, Mac and obviously on Windows too.
- Out of the box capability with Popular Machine Learning Libraries such as Torch, Tensorflow, Keras, Scipy etc.
- Automation Can be built on your choice of the editor not required to Mandatory use of Automagica Flow
- No Additional commercial software licenses needed other than the robot as its build on Open Source Tools Don’t require (Microsoft SQL Server, Elasticsearch and Kibana, IIS or any other tools)
- Provide better support for Docker as its quite straightforward to build and run Automagica bots from within containerized environments.
You can read more details here – Automagica compared to other RPA vendors
Build Your First Bot Using Automagica
- You need to sign up on Automagica Portal to gain access for centralized control and management for Robots.
- You need to have admirative right on Machine you wish to install
- If you work on windows-based system you can Download Automagica and start pretty quickly, it’s don’t require any additional tool and Installation is straight forward.
Install through pip-
Installation can be also done through the python package manager, All you need to do is
pip install automagica -U
As per Official Documentation currently is supported for Python 3.7, It could happen that the PyPi version is slightly behind the version available through GitHub or the Automagica Portal.
For Linux –
Fedora-like Linux (e.g. Red Hat Enterprise Linux/CentOS)
sudo yum install python3-devel chromium -y
sudo pip3 install automagica -U
sudo automagica configure
Debian-like Linux (e.g. Ubuntu)
sudo apt-get install python3-devel chromium -y
sudo pip3 install automagica -U
sudo automagica configure
Create your first automation using the Automagica
At this point of Article I assume, that you already have a portal account for automagica and you have successfully installed Automatica Flow as per your operating system.
Now, there are three ways of creating Automation flow for Automagica –
- You can use the Automagica Flow, Visual editor to create your automation, With the help of various activities available in the panel you would be able to create complex to complex examples.
- You can also use Automagica Lab to create python notebook to automate your process, It’s same as Jupyter Notebook Used to write python codes in Browser.
- You can use your favourite python editors such as PyCharm, VsCode, Sublime, Spyder or many more which supports Python language. All you need is Automagica Python Library which can be installed using pip.
for this article we have used Automagica flow to build the sample bot, However same can be built using the other two methods. for Simplicity we have created separate article to build bot using pythonic way ; Which can be accessed here if you looking for python example-
We are going to create a WebScarpper Bot, Which reads the outlook to get the email attachment for Input Search Term, Search it on Wikipedia and Send Scrapped Data on Pre-Configured email.
In this example to create our First Bot Using Automagica Flow, the following operations will be performed–
- Read Email from Outlook Using Outlook Activities & Save Input Attachment Excel
- Read Input File Using Excel Activities
- Loop Over the Content of Files to get Search Terms
- Open Wikipedia and Search for Given “Search term in Loop”
- Web Scrape Wikipedia Page and Send Result as Email to Configured Email
- If Error, Close Outlook and Browser and Work on Next “Search Term”
- Finally, Close all the open application
Application Used in Automation –
- Outlook Client
- Chrome Web Browser
How it will look like –
Download Code/Working Example -
Automagica Activities Used-
You need to configure different Automagica activities with different parameters, some require input, some require input, output and settings as well. It depends on the activity you are using.
- You can access the properties panel by double-clicking the Activity.
- Properties panel is also used to link the activity to its next node, or If error which node can be accessed.
Below is a brief intro of activities used while building our example–
- Start Outlook Application – Used to Initiate the Outlook instance
- Retrieve Emails – All email is fetched and stored in List of list
- Save Attachments – Saves all files and return List of Files as attachments.
- Start the Excel Application – Initialisation of Excel scope
- Read Worksheet – Read the active worksheet and return the Data as List of Dictionary.
- Loop (Used to loop over List of Dictionary )
- Open Chrome Browser – Initiate Chromium driver
- Browse URL – Go to Specific URL
- Log Message – Write Message to console
- Type Text – Type into Text field based on Xpath
- Press Key – Send hotkeys(‘Enter’)
- Find X Path in Browser – Get Browser element by XPath to read Data
- Send Email – Send Email using Outlook instance
- Quit Excel – Close Excel
- Quit Outlook – Close Outlook
- Exit Browser – Close Browser
- Empty Folder – Clean folder for next run
Congratulation! You have created your first robot using the automagica flow, But it’s not done unless we deploy it on Automagica portal for running in unattended mode or scheduled run.
In the next section, We will deploy the Workflow build above and run it from the portal.
Automagica Portal Dashboard
As discussed above, Automagica portal is used to manage, schedule and monitor the bots you have developed. Once you login into the dashboard you will see a screen like below.
From the Dashboard, You should be able to-
- Create Bots (Runtime Machine to run your automation)
- Create Process (It’s the Automation you have build.), Here you can define the trigger points and the notification as well based on completion of your process run.
- Create Jobs, Check Job Status, See logs etc.
- Events are audit messages to log whats all activity has been done on the portal.
- Credentials – Secure Vallet to store Password
- UI elements – All your recorded Ui Elements, This uses machine learning algorithms so that Ui Selectors are more reliable. You can access all the selectors here and can be used in a different process.
In the Next Section, We will create Bots, Then the Process and finally the Job to run the process.
How to Create Bots [Runtime Workers]
This is also pretty easy; all you need to do its Give Name to your Bot … (I call it Rob…) and the from drop-down menu download the installer (You can skip this if you already have Installer.)
Once Bot gets connected it will show status as Online.
How to Create Process on Automagica Portal
Once you are done with the changes in your Automagica Flow, you can deploy the Process on the Cloud Portal, all you need to give Name to your Process and Upload the JSON File, or the Automagica Lab or Plain python as you wish.
It’s Pretty Easy and straight forward to Deploy your first Version of Process if its break you can Deploy Changed Flow to Overwrite the flow.
Other Important Key Points here is –
- Define Triggers – Its really cool feature to add a trigger to your process, as of Now Schedule, email and API can be used to trigger the automation. This means you can Connect your automation with third part seamlessly without any hiccups …
- Define Notification – This keeps you in the loop for events based on your Automations, You can send Notification on Email, SMS, Slack, Teams and Telegram … This pretty much covers our needs to monitor it …
How to Create Jobs on Automagica Portal
Jobs are the instance of the process, It helps you to trigger the Process on the configured bot. All you need to do is select the Process Name from the dropdown and define parameters if any.
- To Create New Job, you need to navigate to the Jobs page and click “Create Job”
- In the New Window, you need to select the “Process Version”, Define Parameters if any and Priority.
- The moment you create the Job, it will get triggered and You should be able to check the status once completed.
- You can also restart the Job or See the logs and other details form the Context Menu.
- You can also download the “Console Logs ” to check what went wrong while the bot was running
How to Check Job Logs
If you have noticed, While running the automation inside Automagica Flow, It creates an entry for each activity in the console and provide other information in case any issues.
- However, When the bot is running from Automagica portal the logs can be downloaded from the job details page. (See screen below)
- It gives you the option to download the console.txt.
- If you are from a python background, It gives you full fledge features to build automation using various libraries.
- Seamless integration with other python libraries such as Pandas, Flask, Scipy, Numpy, Tensorflow, Keras etc.
- You are free to use the editor of your choice which is not possible with other proprietary RPA software
- Simple yet powerful
- Automagica Flow IDE needs improvements in terms of enhancement to support better user interaction.
- Option to Publish Process to Portal Missing
- No Support for Work Queues
Nice to Have Features –
Below list is based on my experience with different RPA tools to provide a good experience to #rpa developers.
- Option for Cut, Copy, Paste on Activities
- Option for Publishing the Bot to Automagica Portal
Automagica is indeed open-source and free for non-commercial uses, but industry uses will require a commercial license. That makes it a potentially good option for individuals looking to learn, experiment, and prototype, but commercial use cases will require moving up to its commercial Automagica Portal platform.
Robocorp, Another Open Source RPA tool works on similar lines of Automagica, It will be good to see how Automagica and Robocorp both perform in upcoming days.
One thing is sure, With the increase of more open-source rpatools, People will start looking for other alternatives instead of paying a hefty amount for tangled licensing models to run RPA automation.