3. OpenRPA¶
3.1. What is OpenRPA?¶
OpenRPA is where the actual automation happens, inside it you create workflows and invoke them, run all the activities needed to complete your task and deploy them with the assistance of OpenFlow and Node-RED. The framework also offers integration with other tools that are essential such as a message broker and repository management tools. OpenRPA also includes other features within itself, such as Image detection/OCR, Browser Navigation and many others.
3.2. Installing, First Run¶
In this section, the user is provided with a thorough explanation of how to install OpenRPA.
Note
Although not recommended unless you are creating a developer setup, you may also always run OpenRPA directly from the source code by using Visual Studio 2019.
3.2.1. Installing OpenRPA through Windows .msi¶
To install OpenRPA, you first need to download the installer executable provided here (https://github.com/open-rpa/openrpa/releases/latest/download/OpenRPA.msi
).
3.2.1.1. Installing Universally or User-Only¶

OpenRPA’s installation scope.¶
The installer first prompts the user whether OpenRPA should be installed only for the specific single user or universally (all users). It is recommended to install it universally (requires administrator previleges), as it have no downsides, so unless something (or someone) prohibits you from installing it for all users, always do it so. Installing OpenRPA single-user prevents other regular users from the machine from using OpenRPA, however, both OpenFlow and NodeRED accesses are not limited nor related to this, as they are accessed by simply using a browser. After selecting the desired option, click Next.
3.2.2. Installing OpenRPA Plugins¶
During OpenRPA installation, you may specify which Plugins should be installed.
For production, it is extremely recommended to install only the Plugins that will be used. The reasoning is: some plugins such as NM, SAP and Java (as well as others) use machine resources in order to run and just by having them installed and enable, they might significantly impact CPU usage, specially when running OpenRPA on low-spec machines (such as cloud-hosted ones, as they are commonly low-spec in order to save costs). Be aware that CPU usage is further amplified when using HD Robots service, as for each instance of HD Robot user each Plugin will takes its toll.
For development (and experimentation), it is obviously encouraged to run as many plugins as you can afford and are willing to try, our solution has already a wide range of plugins and users can themselves develop plugins as well.

OpenRPA’s installation libraries.¶
After selecting the plugins you desire to install, click Next
once again and Install
so the installation can be concluded.
If everything goes well the installation finishes and the window on Fig. 3 appears.

OpenRPA finished installation.¶
3.3. Configuring OpenRPA¶
OpenRPA settings are saved locally in a file named settings.json
and it is always¹ located in user’s Documents\OpenRPA
folder (or full path C:\Users\{YOUR_USER}\Documents\OpenRPA
). This file contains all configuration parameters for OpenRPA, including some which are not accessible through the GUI.
OpenRPA GUI layout settings, however, are saved in another file: layout.config
. Deleting layout.config
bears no trouble, since it will only lose the user’s layout preferences (panel sizes, order, location etc).
Editing either file (settings.json
/ layout.config
) while OpenRPA is running will have no effect and, when the application is closed, any value changed will be lost/overwritten. Hence, if you desire to edit any setting, always make sure that OpenRPA is not running.
Further on this section, readers will find documentation for all the parameters which rule the configuration settings for OpenRPA.
¹ - Currently, it is not possible to specify the directory where OpenRPA local temporary files (workflows, settings) will be saved.

3.3.1. Parameters¶
These parameters can be set either from settings.json
or by adding keys inside the Windows Registry Editor.
3.3.1.1. Setting parameters locally¶
If the user desires to set parameters for the local user instance of OpenRPA, he may navigate to the Computer\HKEY_USERS\{USER_KEY}\SOFTWARE\OpenRPA
registry key and add an entry for each parameter he wants to change. Here, the name of the key corresponds to the name of the parameter and its value corresponds to the value.
The process below shows how to set the ocr_language
parameter to rus
locally by using the Windows Registry Editor.
First, navigate to the Computer\HKEY_USERS\{USER_KEY}\SOFTWARE\OpenRPA
registry key.
Click with the right-mouse button inside the empty area in the Windows Registry Editor window.

Then, click on New
> String value
and type ocrlanguage
and press ENTER
.

Finally, double click the newly set register entry and intended register value, in our case rus
- which corresponds to the Russian language.

Now restart OpenRPA to verify the changes were properly made.
3.3.1.2. Setting parameters globally¶
The same process above is done but for the Computer\Computer\HKEY_LOCAL_MACHINE\SOFTWARE\OpenRPA
registry key to enforce parameters globally in the scope of the machine. This means users can’t override these parameters.
3.3.1.3. wsurl (OpenRPA online/offline[local])¶
This parameter dictates to which OpenFlow enviroment OpenRPA should connect.
The expected value is a valid websocket URL.
Default value is OpenIAP demo enviroment: wss://app.openiap.io/
.
If the value is set as blank ""
(empty string), OpenRPA will run locally, that is, without being connected to an OpenFlow (and consequently, NodeRED) and will no longer benefit from the cloud features of the OON stack, such as MongoDB or Workflows
remote invoking (as well as many others features).
Examples of valid websockets URL:
"wsurl": "wss://app.openiap.io/",
"wsurl": "ws://localhost.openrpa.io",
"wsurl": "",
Notice that wss
indicates that the websocket URL is secured, whereas URLs starting with ws
are not (same principles as http
vs https
for webpages). Therefore, users should make use of the respective protocol that matches with their OpenFlow enviroment.
Note
User that were once connected to an OpenFlow websocket, but changed this parameter to blank and are now running OpenRPA locally, will still have access to the Workflows
(and Detectors
) that were cached in the last access to the repository. However, they must be careful. Next time they connect to the environment, they will NOT commit their changes to the cloud repository and these changes will be overwritten (by latest version available on the cloud repository) and lost, unless properly exported.
Note
Users are always welcome to use wss://app.openiap.io/
as demo and proof-of-concept enviroment for experimentation purposes, without a subscription. However, when running production processes in this environment it its recommended to supplement this with a paid plan for the Node-RED instances.
3.3.1.4. username / jwt / password / entropy¶
These four parameters work somewhat together and are used by OpenRPA to keep track of the last logged user, besides allowing automatic logins, provided that the saved jwt
is still valid.
Default value for username
is empty string ""
.
Default values for jwt
and password
are null
.
Default value for entropy
is a randomly generated key created by the user’s Windows (example "JungBLhauG+JvQipkQPIp9sLwJw="
).
After an user logs in to OpenRPA, the application will automatically generate a JSON Web Token jwt
from the combination of username
and password``¹, with a given secret ``entropy
. After the user logs out (or the application is closed), this jwt
is then saved and, from there, the same user may log back in without the need of typing the credentials again.
¹ - username
and password
that were typed in the login screen, not from the settings.json
file.
If, for any reason, the login is not possible (password
has been changed, user no longer exists or jwt
is invalid), OpenRPA will prompt the user to login again.
3.3.1.5. isagent¶
This parameter modifies OpenRPA GUI. It should be used when it is desirable to hide Workflows
logic or if user wants to prevent other users from making changes to Workflows
.
Expected values are either true
or false
.
Default value is false
.
If this parameter is set to true
, OpenRPA client will no longer show the UI elements that allow users to view or edit Workflows
, but it will still be possible to invoke them (both manually/locally or remotely).
3.3.1.6. cancelkey¶
This parameter refers to which key button is responsible for stopping execution inside OpenRPA.
Default value is {ESCAPE}
.
3.3.1.7. showloadingscreen¶
This parameter defines whether OpenRPA loadscreen should show up or not (i.e, the splashscreen with the gears in grey scale when the application is initialized).
Default value is true
.
There are no pro/cons performance-wise in disabling the loadscreen. In some cases, it might be desirable to turn it off, especially when the robot is running on someone’s computer who is not (and does not need to be) aware of the robot.
3.3.1.8. culture¶
This parameter defines the language used in most elements (tooltips, buttons etc.) in the OpenRPA GUI. Notice that the list of all possible values will not be shown here, since this list is still expanding (thanks to our contributors).
The most intuitive way to set this parameter is by choosing the language through UI Language
, on the upper ribbon of the the OpenRPA GUI, in the Settings tab
.
Default value is the user’s local input language, if supported by OpenRPA. Else, it will default to en
(which stands for “English”).
3.3.1.9. ocrlanguage¶
This parameter sets the language OCR will use to interpret text on images. The full list of supported languages can be found on OpenRPA GUI ribbon in the Settings tab
under the name Tesseract
(next to UI Language
).
Default value is eng
(which stands for “English”).
3.3.1.10. openworkflows¶
A list of IDs of the Workflows
that were open the last time OpenRPA was closed. This parameter exists so that OpenRPA can keep track of the Workflow
tabs and automatically open them next time the application is initialized.
Default value is an empty list []
.
3.3.1.11. mainwindow_position¶
This parameter stores information about size and position of the OpenRPA GUI on the screen, so that it will be displayed in the same way next time the application is initialized.
The four values refer to the Windows Coordinate System. The first two represent the X and Y coordinates of the upper-left corner of the window, whereas the second pair of values represent the coordinates of the bottom-left corner of the windown.
Default value is “0, 0, 0, 0”.
3.3.1.12. designerlayout¶
[DEPRECATED] This is no longer needed as it was replaced by ``layout.config` file.`
This parameter sets the default OpenRPA UI elements, such as the size and position of Toolbox
, Design
and Properties
.
Default value is an empty string ""
and it means that these elements were never adjusted and are on their original spot.
3.3.1.13. properties¶
This parameter is a set of inherited classes settings. This is a dynamically created list of the add-ons settings that are loaded when OpenRPA is executed. In the case of new plugins, their settings can be added to the global settings in this list. Note that the first word of each parameter is the name of the plugin being setted.
This is an important parameter, since it allows users to configurate their own plugins.
These settings can also be accessed through OpenRPA GUI, in Recorder plugins
in the Settings
tab.
IE_enable_xpath_support
- It enables experimental XPath support in IE. Default value is true
.
NM_unique_xpath_ids
- A list of unique IDs for creating XPath selectors.
NM_debug_console_output
- It writes debug information to browser console. Default value is false
.
NM_wait_for_tab_after_set_value
- It waits for tab status to be in ready state after setting a value. Default value is false
.
NM_wait_for_tab_click
- It waits for tab status to be in ready state after clicking a button. Default value is false
.
NM_compensate_for_old_addon
- It adds pixel compensation for old add-ons. Default value is false
.
Script_csharp_intellisense
- It activates Intellisense for C# scripts. Default value is true
.
Script_vb_intellisense
- It activates Intellisense for Visual Basic scripts. Default value is true
.
Script_use_embedded_python
- OpenRPA comes with Python embedded, but will use default system Python if disabled. Default value is true
.
Script_py_create_no_window
- It states whether the Python script should be started in a new window or not. Default value is true
.
Windows_allow_child_searching
- If an Element in a Selector is not found, automatically search all children for match. Default value is false
.
Windows_allow_multiple_hits_mid_selector
- It allows an Element Selector in a Selector to find more than one children. Default value is false
.
Windows_enum_selector_properties
- It tests each Selector Element for the minimum required amount of properties needed. Default value is true
.
Windows_get_elements_in_different_thread
- GetElement
uses another thread while searching in order to avoid locks if selector finds robot. Default value is true
.
Windows_traverse_selector_both_ways
- It traverses UI tree both ways to filter out ghost Selector Elements. Default value is true
.
Windows_cache_timeout": "00:05:00
- Timeout for caching of Elements. Default value is true
.
Windows_enable_cache
- It enables caching of Elements for faster automation at the expense of RAM. Default value is true
.
Windows_search_descendants
- It searches all descendants. Please note that this makes the robot slower, so it is recommended to use this option for more simple Selectors. Default value is false
.
3.3.1.14. record_overlay¶
The Recording Overlay
checkbox (which can also be set inside OpenRPA ribbon in the Settings tab) is used to highlight the Elements as they are moused over while recording. Be aware that CPU performance may be affected when this parameter is set to true
, hence it is recommended to keep it to false
and change it only during debugging/presentations purposes.
Default value is true
.
3.3.1.15. querypagesize¶
This parameter sets the maximum number of results per MongoDB query when Activities in OpenRPA are using OpenFlow’s API to communicate with the MondoDB.
Each query has a cost of its own and then the data transfer (querypagesize) also has a cost. A high value for querypagesize
means that MongoDB will be queried less often, but the load of each query will be higher.
There is no perfect value for this parameter, but knowing the differences may optimize specific scenarios for an OpenRPA Workflow
needs.
Default value is 50.
3.3.1.16. lastupdatecheck / updatecheckinterval / doupdatecheck¶
These parameters refer to update checking done by the robot when it is started. If a new update is found, a message will be displayed to the user for him to decide if the updates should be installed or not.
lastupdatecheck
is a log of the last time the robot checked for updates.
updatecheckinterval
sets the interval between update checks. Default value is “1.00:00:00” (i.e., one day).
doupdatecheck
is a boolean value that states if the robot should look for updates or not. Default value is true
.
3.3.1.17. autoupdateupdater¶
This parameter sets if the Updater should auto update itself or not. If true
, it will proceed with the updating without displaying any message to the user.
Default value is true
.
3.3.1.18. log (12 parameters)¶
The following parameters refer to the log file created to store all the outputs of the Workflows
, as well as error or exception messages. There will be more information in this file than in the Logging
section of the Output bar, since showing too much information in this section slows down the robot. Some of these parameters can be set through the upper ribbon of the GUI, in the Settings
tab.
The “Level” refers to the type of information user wants to get. Lower numbers mean more critical information, whereas higher numbers mean less critical information. In other words, if user sets minimum and maximum values to, e.g., 1 and 2, only the most important information will be logged. if, on the other hand, the user sets the values to 1 and 7, less critical information will be added to the log file.
The broader the range between the lowest to the highest level, the more information will be retrieved. Please note that this operation slows the robot down, since more processing is required.
log_to_file
- If user enables logs, the robot will create a .txt log file and save it in the root folder of the robot. Default value is false
.
log_file_level_minimum
- Default value is “2”.
log_file_level_maximum
- Default value is “5”.
log_verbose
- This parameter habilitates the verbose mode, that is, more words are added to log file in order to make it more readable to humans. Default value is false
.
log_activity
- When set to true
, this parameter adds logs of the activities performed by user during execution of OpenRPA, such as changes to Designer
. Default value is false
.
log_debug
- It adds information about debugging to log file. Default value is false
.
log_selector
- It adds logs of Selectors
activities. Default value is false
.
log_selector_verbose
- This parameter habilitates verbose mode for selector logs. Default value is false
.
log_information
- This parameter enables logging information that is not fundamental to the operation of the robot, but is important for humans to be aware of or keep record of. Default value is true
.
log_output
- It adds messages that were displayed in the Output
tab, as well as messages from Writeline
Activity. Default value is true
.
log_warning
- It adds warning messages to the log file, that is, issues that had an effect on the platform or robot, but did not prevent it from running. Default value is true
.
log_error
- It adds error messages to the log file, that is, issues that could not be handled by the robot and prevented it from running. Default value is true
.
3.3.1.19. use_sendkeys¶
When set to true
while recording, this parameter mimics an user typing one key at the time. When set to false
, the Recorder will try to directly change the control on the selected application and apply the whole text at once. Each application/control may react in a different way, hence the reason why this parameter might be useful.
This parameter can also be accessed through OpenRPA ribbon, in the Settings
tab.
Default value is false
.
3.3.1.20. use_virtual_click¶
OpenRPA tries to do a Virtual Click instead of actually clicking with the mouse. See more at Virtual Click.
Default value is true
.
3.3.1.21. use_animate_mouse¶
When playing a recorded Sequence, the cursor will appear changing its position throughout execution. It becomes easier to visualize the actions that were recorded. It also is a way to produce material for RPA presentations.
This parameter can also be accessed through OpenRPA ribbon, in the Settings
tab.
Default value is true
.
3.3.1.22. use_postwait¶
This parameter sets the default value for all Activities that have post_wait
property.
It means that the robot will wait this amount of time after each of these Activity to make sure that the computer is responsive before moving on to the next.
It slows down the performance of the robot when running the Workflow
, as each Activity will have an overhead. This parameter is not necessary, but for extremely specific cases, this is already implemented and may come handy.
Default value is “00:00:00”.
3.3.1.23. minimize¶
This parameter defines whether OpenRPA UI should minimize when running the robot or not.
In order to optimize performance, this parameter should be set to true
. When running, the robot will access the Desktop and check all open windows to find the one required. So, it doesn’t need to check its own window.
It may be useful to have the window maximized when debugging, so that the user will be able to see what is happenning during execution.
Default value is true
.
3.3.1.24. recording_add_to_designer¶
The Record directly into designer
checkbox (set inside OpenRPA ribbon in the Settings
tab) is used when the user wants to see the activities being inserted into the designer as they are recording it.
Having this parameter enabled is advised during development or while debugging, but be aware that it might cause some input delay. If disabled, the Recorder
will memorize the activities and only insert them after recording is over.
Default value is true
.
3.3.1.25. reloadinterval¶
Time interval that the robot will use to reload local files when OpenRPA is running connected to an OpenFlow.
The robot will query OpenFlow for a list of Workflows
and Detectors
and it will compare the last updated assign on those with the time it has on its local copy. If there are any changes, it will then reload the file or files.
If the Worflow
or Detector
is already open in the Designer, OpenRPA will then raise a warning to the user and ask if the newer version should be loaded or not. If new files are found or if files were deleted, OpenRPA will automatically proceed to create or delete files in local directory.
There is also the option of realoding at any time through OpenRPA UI, at the General
tab at the upper ribbon.
Default value is “00:05:00”. If value is set to “00:00:00”, it will never be reaload.
3.3.1.26. move_animation_run_time / move_animation_steps¶
When playing a recorded Sequence, the user may choose whether the movement of a window will be shown as an animation or not. It can be set in the Properties menu of the Activity.
move_animation_run_time
- This parameter sets the amount of time between each of the steps of the animation. Default value is “00:00:00.5000000”.
move_animation_steps
- This parameter sets how many steps the animation will take. If set to 1, no movement will visible, since the window will move directly to the new position. The more steps, the smothier the movement. Default value is “20”.
3.3.1.27. remote_allow_multiple_running / remote_allow_multiple_running_max¶
When a robot is running Workflows
that rely on application GUI, keyboard or mouse and parallel Workflow
executions would result in conflicting actions, these parameters set limitations so OpenFlow/Node-RED will only invoke a given number of workflows at once.
remote_allow_multiple_running
- This parameter sets the permission for the robot to run additional Workflows
at the same time. Default value is false
.
remote_allow_multiple_running_max
- It sets the maximum number of Workflows
that can be run at the same time. Default value is “2”.
Note
These parameters only apply when the Workflows
are invoked remotely. When running manually (i.e.: clicking the Play button), the number of allowed Workflows
is not limited by these.
3.3.1.28. cef_useragent¶
This parameter allows user to define what user-agent
value should the robot use when logging in a Google account. Some users may find issues when loggin in OpenRPA using a Google account due to different versions of Chromium browser, so this parameter makes sure the robot is using the most up-to-date version.
Default value is an empty string ""
.
Possible values are the literal user-agent
header used in most common http-requests
, such as “Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0) Gecko/20100101 Firefox/42.0”.
3.3.1.29. show_getting_started¶
This parameter lets the user decide if the “Getting Started” tab will be shown when OpenRPA is initialized. This message contains basic information about the App, such as most common shortcuts, as well as links to the Wiki page and explanatory videos.
Default value is true
.
Users may also disable “Getting Started” on the right botton corner of the page (“Show again” checkbox).
3.3.1.30. notify_on_workflow_remote_start / notify_on_workflow_end / notify_on_workflow_remote_end¶
These parameters set the notification behavior of OpenRPA during execution start and end.
notify_on_workflow_remote_start
- It shows a notification when the Workflow
is started remotely. Default value is true
.
notify_on_workflow_end
- It shows a notification when Workflow
ends running. Default value is true
.
notify_on_workflow_remote_end
- It shows a anotification when Workflow
ends running remotely. Default value is false
.
3.3.1.31. log_busy_warning¶
This parameter defines if a message is logged everytime OpenFlow tries to run a Workflow
and the robot is busy.
This is a performance oriented parameter. It is advised to keep it set to false
if it is expected for the message to show up often.
Default value is `true
.
3.4. Quick Start¶
3.4.1. Create New Project¶
To create a new project on OpenRPA simply click on New > New Project at the Ribbon. It will then open an empty Workflow named New Workflow.
3.4.2. Granting permissions to users/roles¶
To set the permissions for the current workflow or project, whichever is selected, simply click in the Permissions button at the Ribbon. It opens the Permissions Window with the names of all current users for the workflow. There are 4 types of permission available which will be discussed next.
3.4.2.1. Read¶
Users have access to execute and view the content of the workflow.
3.4.2.2. Update¶
Users have access to update and view the content of the workflow.
3.4.2.3. Delete¶
Users have access to delete the workflow or group of workflows from the workspace.
3.4.2.4. Invoke¶
Users have access to invoke the content of the workflow.
To set these permissions simply click in the user you want to grant or revoke permissions and click the desired button. If the user is available at the OpenFlow repository but not in the current workflow, simply click the new button and type their username, a dropdown will come up with suggestions for the name of the user you are looking for. Select the user and click OK.

3.4.3. New Workflow¶
Immediately after clicking New Project inside the New ribbon, a new empty workflow appears on the screen with a single sequence containing the caption Drop activity here. This is where you are going to add activities to build and implement the BPM process you have in mind.
If you are running OpenRPA online (that is, connected to a websocket/OpenFlow), your workflows are automatically inside OpenFlow’s repository and will be automatically be synced after each save. The OON stack takes care of workflow deployment, storage and readily makes the most recent version immediately available¹ to everyone (that have permission) in the same OpenFlow.
¹ - After a save occurs, **OpenFlow* is immediately updated but other users may need to wait until their synchronization happens before your changes are reflected to them (they can also force an update by manually refreshing / reopening OpenRPA).*

3.4.4. Using the Designer¶
Below are instructions on how to use OpenRPA’s Designer to accomplish a few common tasks inside OpenRPA.
3.4.4.1. Dragging an Activity¶
To drag an activity into OpenRPA, simply click the activity inside the Toolbox keep the left button of the mouse pressed and drag it into the workspace.
Then, the activity will appear inside the sequence.
This shows how easy it is to drag it to the main sequence! Try it yourself! Drag another activity into the main sequence.
If, on the other hand, you’d like to drag it into a nested sequence simply repeat the procedure but instead of simply dragging it into the workspace, drag it into the block inside the desired sequence.
3.4.4.2. Organizing the Workflow¶
Organizing the workflow in OpenRPA is easily done through changing activities’ display names and organizing sequences by nesting them.
Changing an Activity’s Display Name
To change an activity’s display name, the user can either click the name of the activity or change its property DisplayName
inside the Properties box, as seen in the image below.
Nesting Sequences
Nesting a sequence inside the main sequence is easy. Simply drag a Sequence activity inside the main sequence.
After that, a new sequence will appear with its default display name set as Sequence
.
To do the same into already nested sequences or activities containing pseudo sequences, simply drag the Sequence activity into the desired block.
3.4.4.3. Creating and Deleting Variables & Arguments¶
Creating a Variable
To create a variable automatically, the user must have the text caret inside an input field and inside some activity or property belonging to any. Afterwards, they can simply press Ctrl+K
to create that variable. Remember that after creating that variable, the user must assign a value to its alias through the Variables
section inside the Variables, Arguments & Imports box or through the Assign activity. In our case, this variable is assigned to the value “This is variable one”.
To create a variable manually, the user can simply click the field containing the Create Variable
placeholder inside the Variables
section in the Variables, Arguments & Imports box, type the variable’s name and if needed, assign a Variable type
to it - or just leave it as String
- then assign its Default value
. The user can change its Scope
as well, which is discussed in the Variables, Arguments sections next in this chapter.
It is useful to remind the user that a variable must always have a specific type. Refer to Appendix A for more information on types.
Note
Press Ctrl+K
to automatically create the variable when entering it upon an input field or create it manually by clicking the Variables box under the bottom part of the screen. Use the right-hand side to enter the value which will be assigned to the variable.
Deleting a Variable
To delete a variable, simply click with the right button mouse in its row inside the Variables
section of the Variables, Arguments & Imports box and click Delete
.
Creating an Argument
The process for creating an argument is similar, yet there is no way to create an argument automatically. The user must always create it inside the Arguments
section in the Variables, Arguments & Imports box and obligatorily set its Direction
, which will be discussed in the Variables, Arguments section next in this very same chapter.
In order to create an argument, simply click the field containing the placeholder Create Argument
inside the Arguments
section of the Variables, Arguments & Imports box type the argument’s name and assign a type to it, if needed - else just leave it as String
.
Deleting an Argument
To delete an argument, simply click with the right button mouse in its row inside the Arguments
section of the Variables, Arguments & Imports box and click Delete
.
3.4.4.4. Output & Debug¶
The Output
section inside the Output bar is used to output every information pertaining to the execution of workflows inside OpenRPA. This information includes debugging output, ie. error messages, output from the WriteLine activity - more on this below - and messages indicating that the workflow has executed successfully. Please refer to the Designer section to see a thorough explanation of the Output bar.
Debugging Error Messages
OpenRPA’s error messages are very similar to any C# trace output, an example follows below.
[13:00:08.797][Output] Using the Designer failed in 00:03.325
# OpenRPA.Interfaces.ElementNotFoundException: Failed locating 1 item(s)
at OpenRPA.Windows.GetElement.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
This is the most common error in OpenRPA, it occurs when an element is selected with any Get Element activities but it ends up not existing upon running the workflow - either because its existence has timed out or because the user has willingly closed it.
The first block inside the square brackets ([13:00:08.797]
) is the Timestamp
of the debug error message. It denotes the exact time when it occurred.
The second block inside the square brackets ([Output]
) denotes the type of message - in our case, obviously, it is an output message.
The third block is the content of the debug error message. It contains the name of the workflow which failed (Using the Designer
), followed by its relative execution time (00:;03.325
) - ie. the time that has elapsed from its start to the failure - and the error which occurred - in our case OpenRPA.Interfaces.ElementNotFoundException
.
It is recommended that when reporting bugs the user denotes the type of error which occurred - in our case ElementNotFoundException
- for the purposes of making it easier for people to understand and thus be able to quickly help you solving the error!
Writing Output to the Console with WriteLine
The user can also write expressions to the Output
console by using the WriteLine activity. Any object of type String
can be used inside an expression which is going to be outputted to the console. Everything else will need to be casted into the type String
, more on that in Appendix A. Expressions need to be prefixed suffixed with "
to indicate they are strings.
The user can also write any expressions involving variables, just remember to concatenate them using the +
operator.
3.4.5. Running the Workflow¶
Running a workflow using the Designer is very easy! Simply click the Play button inside OpenRPA’s ribbon, as shown below, or press F5. The workflow will run and its output can be seen in the Output
section of the Output bar.
3.5. Interface¶
3.5.1. Activities/Toolbox¶
The toolbox is where all the possible activities in OpenRPA are contained. Imagine it as a box where all the instruments you’d normally use are, such as a screwdriver or drill. The toolbox is essentially where you’d reach out for getting these tools.
The activities in OpenRPA are separated by categories which clearly represent what they are used for. These categories are properly discussed in the next section.
3.5.2. Designer¶
The designer is where the main process of desigining and implementing a task happens inside OpenRPA. It is where you drag and drop activities and add or nest sequences to fulfill your implementation choices, as well as set properties and variables pertaining to your workflow business process. It contains five components: Toolbox & Snippets sidebar, Workspace, Properties box, Output bar and Connection bar.

OpenRPA Designer components.¶
3.5.2.1. Toolbox & Snippets sidebar¶
This is the place where all activities lie as well as some code snippets which teaches the user on how to use of the tool for various purposes.
To use an activity, simply drag it into the Workspace
sequence you want to add it to.
For more information on these activities, such as a detailed explanation of each one, refer to the Toolbox Detailed section.

OpenRPA’s Toolbox.¶
3.5.2.2. Workspace¶
The workspace is where the user organizes all the activities pertaining to the task which will be fulfilled by the workflow. It is also where the user will set all variables, arguments and import namespaces for further use.
Once the user drags activities into the sequence, upon pressing the Play button inside the ribbon or pressing the F5
key, they will be executed in a cascading manner - each one after the previous one. And if there are any errors - untreated by TryCatch or Throw activities - the workflow execution will stop and the error message will appear in the Output box, which will be discussed in the Output bar section.
Each Sequence activity has its own scope as well, which will be discussed in the Variables section, further below.

OpenRPA’s Workspace.¶
The user can also organize their workflow by nesting Sequence activities, as shown in the picture below.

Nesting sequences inside OpenRPA.¶
As well as nesting, the user can use the Comment Out activity to ignore everything inside it. In the picture below, all activities inside the Comment Out activity won’t be executed.

Commenting activities out outside OpenRPA.¶
3.5.2.3. Properties Box¶
Every activity in OpenRPA has its own property box, containing parameters passed that change the workings of the given activity. Inside the property box there are also sections which are pretty much self explanatory and refer to the given parameters they cause changes upon, such as Input, Output or Misc.

Properties box.¶
The only property common to all activities is Displayname
, which changes the name of the activity inside the workspace. It is shown below.

Displayname Property.¶
3.5.2.4. Output bar¶
The output bar contains three sections: Logging
, Output
and Workflow Instances
.
Logging
The Logging
section shows the output of the Workflows
as well as any instance of any error or exception which occurred inside OpenRPA.
Output
The Output
section contains only outputs generated by any workflows that were executed.
Workflow Instances
The Workflow Instances
section contains all workflow instances pertaining to the queues file path the currently logged user is listening. It is useful as a catalog of recent workflow results and to see which workflows are queued, idle, complete, failed or running (in progress).
3.5.2.5. Connection bar¶
The connection bar contains information related to the connection status of the OpenFlow web service set in the Configuring OpenRPA section as well as the status of both NM
and SAP
plugins.
3.5.3. Variables, Arguments¶

Variables, Arguments & Import box.¶
3.5.3.1. Variables¶
Variables, as their very name states - are changeable values assigned to aliases inside the execution of a sequence. These aliases can be used in mathematical or computational expressions. For example, if you want to save a variable named “price” to assign the price of a product along a sequence. You can use the assign activity and an expression to assign it’s value.
Upon inserting an activity with an input box, if you mention a non-existent variable and want to easily create it you can press Ctrl+K
and a dropdown will appear with many types of variable to be selected.
Variables in OpenRPA are statically typed and their type can be selected from the variable type field inside the argument box.
3.5.3.1.1. Variable use case: Saving the result of a computation¶
A use case of a variable is demonstrated next. In this example, we will save the result of a computation into a variable.
First, drag an Assign activity to the main sequence.
Then, type a name for the variable and press Ctrl+K
to create it automatically. In this case, the chosen name is resultOfComputation
.
Afterwards, assign the result of the computation (2*6
)[right-hand side] to the variable [left-hand side].
The user now may notice that a warning now appears in the right-hand side of the activity. That is because the expression is a Int32
type, the variable resultOfComputation
is a string
and Microsoft Workflow Foundation is strongly typed. if the user has no experience with programming a thorough explanation is given on Appendix A. For now, just select the type of the variable as Int32
in the Variable type
parameter inside the Variables, Arguments & Imports box, as seen in the picture below.
3.5.3.2. Scope¶
It refers to the reach of the objects contained within a sequence. If you have some knowledge of programming and scope, you can skip this part. First, let’s think of it as sets. In this example, we are going to use variables since arguments function as if they were globally scoped.
Per the code block below, one may observe that sequence B has access to only variables x, - but since B is inside the scope of A, it makes sequence B to have access to all variables {n, p, x, y}. In simple words, sequences can be used to organize variable scopes and to group activities, just like a developer would normally do in a programming language using functions to avoid monolithic code.
Sequence A {
variables = n, p
Sequence B {
variables = x, y
}
}
3.5.3.3. Arguments¶
Arguments are simply variables that can be passed to other sequences, external services or workflows and have global scope. They act exactly as variables, except for that single characteristic. If you pass an argument to a sequence created within another sequence, the argument is still valid within the outer sequence. If you pass a variable, that does not happen.
It is important to notice that both variables and arguments can have a default value, which are assigned to both if a value isn’t necessarily assigned during the execution of the sequence. It is also required for arguments with the isRequired property checked to have an ‘In’ value, ie. already passed or having a default value.
Similarly to Variables, Arguments in OpenRPA are statically typed and their type can be selected from the variable type field inside the argument box.
Output (In - In/Out - Out) Output refers to the way a variable or argument is handled during run-time. They are classified below.
In
In this case the argument is received from external service and is only given an input value that can’t be returned after the execution of the workflow
In/Out
In this case the argument can both be given an input value or be changed and outputted after the execution of the workflow
Out
In this case the argument returns a value to an external service, and it can’t be changed after the execution of the workflow
Properties
This turns the argument into a
Property
, which means it has the same features of an In/Out argument but can also have a default value
3.5.3.4. Imports¶
Imports tab shows all the modules used and referenced in the selected sequence.
3.5.3.5. Serializable vs Non-Serializable Arguments¶
Microsoft Workflow Fundation (MWF), the technology which OpenRPA is based on, diversificates variables/arguments into two diferent categories: Serializable
and Non-Serializable
.
For the great majority of workflows there is no need to understand the differences, as they will not affect anything, but there are cases that knowing the technical limitations of non-serializable objects might explain why your workflow or process is not working exactly as you may expect.
In short: non-serializable objects, as the name suggests, can not be serialized. This term, in this context, can be simplified to: these objects can not be saved / can not be transmitted over a network. That consequently implies that a workflow state can not be saved if the workflow contains any variable/argument that is non-serializable, and also, invoking workflows with non-serializable arguments is not supported. The most common non-serializable variable/arguments types are: DataTables
and DataSets
but other types (from the infinitely many existing types from all the namespaces) also fall into this category.
With this brief explanation, here are some limitations that users may face when dealing with workflows containing non-serializable variables/arguments as well as some suggested workarounds:
Saving workflow states
When OpenRPA is connected to an OpenFlow, workflows states are saved automatically in OpenFlow whenever specific activities¹ are reached. These states exist to indicate the current situation relevant to a workflow instance, such as the designer layout (activities, sequences) being run, the variables and arguments and their current values, etc. Hence, if the workflow contains non-serializable objects such a DataTable, the state can not be saved.
¹ - All the activities that “go idle” (Detectors, Delay, Invoke Remote with wait) as well as Persist activity.
Workaround: Split complex workflows into smaller workflows, leaving the smaller workflows to manage the non-serializable objects. That way if an unexpected interruption occurs, you will not lose all the data.
Remote Remote OpenRPA / invoking with non-serializable arguments
Invoke Openflow / Node-RED invoke and data return
If one desires to use
Invoke Remote OpenRPA
Activity, be aware that the workflow being invoked may not use non-serializable arguments. As the destination computer / OpenRPA is different than the source OpenRPA, the non-serializable arguments can not be passed around and thus the invoking will fail.Similar limitation also happens when an user invokes a flow in Node-RED by using the
Invoke Openflow
activity, non-serializable objects are not supported to be used as arguments. Exception to this rule is theDataTable
type, OpenRPA will attempt to neatly convert these toJArray Objects
before contacting Node-RED as well as convert it back toDataTable
when the data is returned / nodeworkflow out
is used.Workaround: Use the activities from
OpenRPA.OpenFlowDB
toolbox to upload files/update data/create entities and collections in OpenFlow MongoDB and then, on the destionation computer, access the data by querying OpenFlow MongoDB. This way, the entireData/DataSet/DataTable
(any non-serializable object) is stored within MongoDB and the parameter being passed during the invoke can be the_id
or some other identifier.Workaround2: Convert the non-serializable object into a serializable one, for example base 64 string, then pass it as parameter and convert it back if needed.
3.5.4. Toolbox Detailed¶
3.5.4.1. OpenRPA¶
The reader will find below the activities located inside the OpenRPA toolbox.
-
Click Element
Click on an Element found with GetElement.
Properties Parameters
Animate Mouse
- If set toTrue
, the cursor will appear changing its position throughout execution. It only works on Physical Clicks!Displayname
- Title of the Activity inside the Sequence.Double Click
- If set toTrue
, the cursor clicks twice inside the window.Element
- The application selected with the Get Element activity.Key Modifiers
- If set, the corresponding keys act as if pressed during execution.Mouse Button
- Set to1
if the Left Mouse button is to be clicked;``2`` if it is the Middle Mouse button;3
for the Right Mouse button.Post Wait
- Time OpenRPA should wait for this activity to finish after completing its execution.Virtual Click
- Set by default asTrue
. OpenRPA tries to do a Virtual Click instead of actually clicking with the mouse. Visit Appendix B - Virtual Clicking for more information.X Offset
- The horizontal offset inside the window to be clicked. Units are in pixels. It also allows for negative values. Only works on Physical Click!Y Offset
- The vertical offset inside the window to be clicked. Units are in pixels. It also allows for negative values. Only works on Physical Click!

OpenRPA Click Element.¶
-
Close Application
Closes a given application selected with the Get Element activity.
Properties Parameters
Displayname
- Title of the activity inside the sequence.Force
- If set toTrue
, it kills the application.Selector
- Contains all the data belonging to the application selected.Timeout
- Time interval until the Activity ceases if not successfully able to close the application. Can be a simple 00:00:00.00 {hh:min:ss.mili} or an object from the TimeSpan class.

OpenRPA Close Application.¶
-
Comment Out
Every Activity inside Comment Out is ignored by the execution of the workflow. This Activity is useful for remarking something out of the sequence.
Properties Parameters
Displayname
- Title of the Activity inside the sequence.
-
Copy Clipboard
Saves the content from Windows clipboard into a variable.
Repetitive sequential usage of this Activity, however, is not recommended, as it is unreliable due to buffer issues. As a suggestion/workaround, one can use the
Invoke Code
Activity and run the following AHK codevariable1 := Clipboard
. Notice thatvariable1
is the name of the variable.If the content of the Windows clipboard that will be copied is a
String
the user has to specify the variable inside theString Result
field in the Properties Box. If it is an image the user has to specify theBitmapSource
variable file path the image will be saved insideImage Result
.Properties Parameters
Displayname
- Title of the Activity inside the sequence.Image Result
- Creates a bitmap from the image copied into the clipboard and returns it as aBitmapSource
variable.Send Ctrl+C
- SendsCtrl+C
before trying to copy the Clipboard Content.String Result
- Returns the result from the clipboard as a string.

OpenRPA Copy Cliboard.¶
-
Detector Activity
Detector turns workflow into idle mode, waiting on selected Detector to trigger.
It is worthy reminding the user that Detectors can also be used to trigger StateMachines inside OpenRPA.
An example of how to set a Detector is found at Windows Automation section.
Properties Parameters
Detector
- ID of the Detector which will be used to trigger the condition.Displayname
- Title of the Activity inside the sequence.
-
Foreach DataRow
Foreach DataRow enumerates through each row inside a
DataTable
.This Activity iterates through a
DataTable
orDataView
.² All the Activities inside Foreach DataRow will be looped over each row. Examples of using Foreach DataRow Activities are shown both at Web Automation and Excel Read workflow examples.Properties Parameters
DataTable
- The data table used to gather the data.DataView
- The data view used to gather the data. For more information on how to use aDataView
, please refer to Appendix B’s DataView.Displayname
- Title of the Activity inside the sequence.

OpenRPA Foreach DataRow.¶
² - What is the difference between DataView and DataTable? (https://stackoverflow.com/questions/7382932/what-is-the-difference-between-dataview-and-datatable
)
-
Highlight Element
Highlights an Element found with GetElement Activities.
Users can also define a specific Element to be highlighted when using this Activity outside of a GetElement Activity. Besides that, it allows users to specify the duration of the highlighting by inserting a
TimeSpan
object in the formatHH:mm:ss
inside theDuration
parameter, such as00:00:30
to highlight this given element for 30 seconds. It also allows for blocking the execution of the Workflow until the highlighting has finished by setting theBlocking
parameter toTrue
.Properties Parameters
Blocking
- If set toTrue
, it blocks the execution of the Workflow until the highlighting has finished.DisplayName
- Title of the Activity inside the Sequence.``Duration`- Duration of the highlighting. Can be a simple 00:00:00.00 {hh:min:ss.mili} or an object from the TimeSpan class.
Element
- The Element to be highlighted by GetElement.Result
- [DEPRECATED] Currently unused parameter.

OpenRPA Highlight Element¶
-
Insert Clipboard
Sets the content of parameter
Text
into the Windows clipboard buffer. Repetitive sequential usage of this Activity, however, is not recommended, as it is unreliable due to buffer issues. As a suggestion/workaround, one can use theInvoke Code
Activity and run the following AHK code:
Clipboard := variable1
Timeout := 3
WaitForAnyData := 1
ClipWait, % Timeout, % WaitForAnyData
; "variable1" is the name of the variable, can be changed.
; More info about ClipWait at https://www.autohotkey.com/docs/commands/ClipWait.htm (yes .htm, not .html)
Properties Parameters
Displayname
- Title of the Activity inside the sequence.
Ignore Errors
- If an error occurs, will ignore it and continue. Default value is False
.
Text
- Text which will be inserted into the clipboard.

OpenRPA Insert Clipboard.¶
-
Invoke OpenFlow
Invoke OpenFlow allows the user to invoke
Workflows
which have been configured with OpenFlow/Node-RED, i.e., available at the Workflows page (e.g.http://localhost.openiap.io/#/Workflows
).Properties Parameters
Displayname
- Title of the Activity inside the sequence.Wait until Completed
- If set toTrue
, OpenRPA waits until theWorkflow
invoke call is finished - either success or error. If successful, the message containing the data (as designed in the flow at Node-RED) is returned to the OpenRPA robot.If set to
False
, however, OpenRPA will no longer have access to the returned message - communication will be one-way. Therefore, all logic that would otherwise depend on it must then be redesigned. Think of it as a try/catch exception block that does not return any exception message. ³Workflow
- TheWorkflow
which is to be invoked.
Note
The Workflow
is invoked by the user currently logged in OpenRPA/OpenFlow. It means that the user must have access to the desired Workflow
which is to be invoked, otherwise it won’t even be displayed in the Workflows
dropdown.

OpenRPA Invoke OpenFlow.¶
-
Invoke OpenRPA
Invoke OpenRPA allows the user to invoke OpenRPA
Workflows
saved in OpenFlow’s repository - those available at the RPA Workflows page (eg.http://localhost.openiap.io/#/RPAWorkflows
).The Map Variables button allows the currently set variables and arguments to be passed to the
Workflow
invoke call. In order to do that, after choosing yourWorkflow
from the dropdown, create the arguments in the Variables, Arguments & Imports box and click the Map Variables button in the activity.Properties Parameters
Displayname
- Title of the Activity inside the sequence.Wait until Completed
- If set toTrue
, OpenRPA waits until the Workflow invoke call is finished - either success or error. If successful, the message containing the data (as designed in the flow at Node-RED) is returned to the OpenRPA robot.If set to
False
, however, OpenRPA no longer has access to the returned message - communication now is one-way - and therefore all logic that would otherwise depend on it must then be redesigned. Think of it as a try/catch exception block that does not return any exception message.Workflow
- TheWorkflow
which is to be invoked.

OpenRPA Invoke OpenRPA.¶
-
Invoke Remote OpenRPA
Allows to remotely invoke RPA Workflows, saved in OpenFlow’s repository, to be executed at other OpenRPA clients.
The Map Variables button allows the currently set variables and arguments to be passed to the workflow invoke call. In order to do that, after choosing your workflow from the dropdown, create the arguments in the Variables, Arguments & Imports box and click the Map Variables button in the activity.
Properties Parameters
Displayname
- Title of the activity inside the sequence.Target
- OpenFlow’s hash string identifying the target which will be activated to execute the workflow.Wait until Completed
If set to
True
, OpenRPA waits until the Workflow invoke call is finished - either success or error. If successful, the message containing the data (as designed in the flow at Node-RED) is returned to the OpenRPA robot.If set to
False
, however, OpenRPA no longer has access to the returned message - communication now is one-way - and therefore all logic that would otherwise depend on it must then be redesigned. Think of it as a try/catch exception block that does not return any exception message.Workflow
- OpenFlow’s hash string identifying the workflow which will be executed.

OpenRPA Invoke Remote OpenRPA.¶
-
Move Mouse
Move mouse cursor to a location relative to an element found with GetElement (or desktop if no element is supplied).
This Activity has two modes of usage.
The first mode of usage is Selector-less. In this mode, the Activity will use the absolute values of the screen to find the
X
andY
offset values. As an example, if theuser
has a1366x768
display, the activity will move the mouse according to that resolution inside the screen. To use this mode, all theuser
needs to do is to delete any value inside theElement
property of the activity - its default value isitem
- and you can define theX
andY
offset values.The second mode of usage is Selector-bound. In this mode, after selecting a Windows element, the activity will use the relative values of the part of the screen which the element occupies to find the
X
andY
offset values. To use this mode, all the user needs to do is drag the Move Mouse activity into the element selected and define theX
andY
offset values.The application must be selected by using the Get Element Activity.
Properties Parameters
Animate Mouse
- If set toTrue
, the cursor will appear changing its position throughout execution. Good for showing what is happening in a presentation.Displayname
- Title of the Activity inside the sequence.Element
- The application selected with the Get Element Activity.Post Wait
- How long OpenRPA should wait for this Activity to finish after completing its execution.X Offset
- The horizontal offset inside the window which the cursor will be moved to. Units are in pixels. It also allows for negative values.Y Offset
- The vertical offset inside the window which the cursor will be moved to. Units are in pixels. It also allows for negative values.
Note
This activity requires a Mouse IO. If it fails to find one, it will return the error: Could not send mouse input. Error Code: 5
. This may happen if OpenRPA Client was launched from inside a Windows Remote Desktop and the session was disconnected. To avoid this, please use HDRobots extension, do not disconnect/close the RDP session or make the session persistent by using other techniques (i.e.: running a VNC server).

OpenRPA Move Mouse.¶
-
Open Application
Open Application searches for Windows element based on a
Selector
, and focus on it. If the Application was not found, it will start it.Clicking Highlight will red-highlight the first element that matches the criteria on the
Selector
. Useful for checking if theSelector
is properly set up.This Activity also supports working with
Selector
inside itself. All you need to do is drag aGetElement
, or according activity, inside its sequence.This activity can also be used to work with browsers and other applications such as Java, SAP etc. Properties Parameters
Animate Move
- Visibly move the window of the application which will be opened, instead of instantly moving it. Useful for presentations.Check Running
- Check if application is already running using theSelector
. If set toFalse
, it will launch a new application no matter what.Displayname
- Title of the Activity inside the sequence.Height
- If set, the application is opened with this given height. Units are in pixels.Result
- Save the result of the execution to a variable. By default, it saves the application Element itself.Selector
- Contains all the data used to identify applications.Timeout
- Time to check for whether the application was found. Essentially a timeout for theCheck Running
parameter. Can be a simple 00:00:00.00 {hh:min:ss.mili} or an object from the TimeSpan class.Width
- If set, the application is opened with this given height. Units are in pixels.X
- If set, move the application to this horizontal offset. Units are in pixels. It also allows for negative values.Y
- If set, moves the application to this vertical offset. Units are in pixels. It also allows for negative values.

OpenRPA Open Application.¶
-
Show Balloon Tip
Show Balloon Tip shows a message similar to the Show Notification activity near the system tray. It differs from Show Notification only in that it also contains a title and allows for other types of notifications such as Error or Warning.
Properties Parameters
Duration
- How long the message will appear.Message
- Message which will be shown. Needs to be included inside quotes.Title
- Title of the balloon tip.Displayname
- Title of the Activity inside the sequence.NotificationType
- Different notification types: Information, Error or Warning.
Note
Refrain from using too many Activities that change UI elements (such as Show Balloon Tip, WriteLine or Show Notification). These activities run single-threaded, which means that each time they are executed, they briefly stop Workflow execution.

OpenRPA Show Balloon Tip.¶
-
Type Text
The user is strongly discouraged from using this Activity. It is preferable to select an element with the GetElement activity and use the Assign property to assign a string value to it.
Type Text sends keystrokes from the text contained inside Hint to the window currently focused. Instead of memorizing every keystroke, it is recommended to use the Recorder as it will map every keystroke automatically.¹
The key stroke syntax should be “{{Modifier1, Key1} {Modifier2, Key2} {…} {ModifierN, KeyN}}”.Keep in mind that Modifiers, which would be auxiliary keys - such as
Ctrl
,Alt
,Shift
- are not obligatory.The user can also send variables or hardcoded text, such as sending “{{Modifier1, Key1} SOME TEXT ” + desired_variable + “{Enter}”.
Properties Parameters
Click Delay
- Delay between each keystroke.Displayname
- Title of the Activity inside the sequence.Text
- Displayname inside theWorkflow
designer.
Note
This activity requires a Keyboard IO. If it fails to find one, it will return “Could not send keyboard input. Error Code: 5”. This may happen if OpenRPA Client was launched from inside a Windows Remote Desktop Session and the session was disconnected. In order to avoid this, please use the HDRobots extension. Do not disconnect/close the RDP session or persist the session using other techniques (e.g. running VNC).

OpenRPA Type Text.¶
¹ - `Overview of TypeText Activity <https://openrpa.openiap.io/pages/typetext-syntax>`_ (``https://openrpa.openiap.io/pages/typetext-syntax``)
3.5.4.3. OpenRPA.Database¶
Here belong the activities located inside the OpenRPA.Database toolbox.
-
Database Scope
Selects the database that will be used to query, insert, update or delete data by opening a connection and ending it once all the activities inside its scope are concluded. A thorough example is shown in the OpenRPA.Database Activities, DataTable, DataView section.
Properties Parameters
ConnectionString
- The ConnectionString (https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnection.connectionstring?view=dotnet-plat-ext-3.1
) which will be used to connect to the database. An example is"Server=localhost;Port=3306;Database=using_datatables;Uid=root;Pwd='life is fine 9#';"
.DataProvider
- The provider used for the given database. Default for MySQL is"MySql.Data.MySqlClient"
.DataSource
- The name of thedatabase schema
that will be used to gather data from.DisplayName
- Title of the Activity inside the sequence.Timeout
- Time to wait until the connection is completed. If the connection is not completed until this time, activity will pass on through others inside the outer sequence. Can be a simple 00:00:00.00 {hh:min:ss.mili} or an object from the TimeSpan class.

OpenRPA.Database Database Scope.¶
-
Execute Non Query
Runs a query that returns no results, useful for
INSERT
,UPDATE
, andDELETE
statements. TheResult
value is the number of rows affected by the command. If no rows are affected, it returns0
.Properties Parameters
Query
- The query which will be executed.activity_displayname
- Title of the Activity inside the sequence.CommandType
- Default is set toText
- which means the command inside theQuery
field will be executed. If set toStoredProcedure
, the text insideQuery
should be the name of a stored procedure. If set toTableDirect
all rows and columns of the named table will be returned when you call one of the Execute methods.Result
-Int32
output of the executed query.

OpenRPA.Database Execute Non Query.¶
-
Execute Query
Runs a query and returns the results as a DataTable. Useful to be used with
SELECT
statements.Properties Parameters
Query
- The query which will be executed.activity_displayname
- Title of the Activity inside the sequence.CommandType
- Default is set toText
- which means that the command inside theQuery
field will be executed. If set toStoredProcedure
, the text insideQuery
should be the name of a stored procedure. If set toTableDirect
all rows and columns of the named table will be returned when you call one of the Execute methods.DataTable
- TheDataTable
object where to save the result of the query.

OpenRPA.Database Execute Query.¶
Note
In OpenRPA, a DataTable
corresponds to a 2-dimensional non-serializable object used to hold values. Think of it as a matrix with i
rows and j
columns. The i
rows are accessible by using the .Rows(n)
attribute, where n
is the number of the row - starting from 0 - which you want to access. The j
columns are accessible by using the .Item(n)
attribute, where n
is the number of the column - starting from 0 - which you want to access. It is useful to remind here that the user must have accessed the Rows
attribute, therefore, if the user wanted to access the 2nd column on the 3rd row of the datatable they would use .Rows(2).Item(1)
attribute.
-
Execute Scalar<>
Runs a query that returns exactly one result, such as aggregate functions:
SUM
,AVG
,MAX
,MIN
andCOUNT
.Properties Parameters
Query
- The query which will be executed.activity_displayname
- Title of the Activity inside the sequence.ArgumentType
- Type of the result which will be returned.CommandType
- Default is set toText
- which means that the command inside theQuery
field will be executed. If set toStoredProcedure
, the text insideQuery
should be the name of a stored procedure. If set toTableDirect
all rows and columns of the named table will be returned when you call one of the Execute methods.Result
- Result output of the executed query. - has its type defined as inArgumentType
.

OpenRPA.Database Execute Scalar<>.¶
-
Update from DataTable
It adds in
SQL table
the data contained inside the givenDataTable
.The
DataTable
must first be selected with the Execute Query Activity by using the"SELECT * from ${TABLE};"
statement, where"${TABLE}"
is the table file path the data will be added. Then, the user can change its data by adding rows with the AddDataRow activity and finally update it employing the above-mentioned method.It is important to remind users that the headers and content must match those of the
SQL Table
.Properties
DataTable with the data you want to update from
- self-explanatory.TableName
- Table to insert rows into.activity_displayname
- Title of the Activity inside the Sequence.Result
- number of rows affected.

OpenRPA.Database Update from DataTable.¶
3.5.4.4. OpenRPA.ElisRossum¶
Here belong the activities located inside the OpenRPA.ElisRossum toolbox.
-
Auth Activity
Authenticates the user into the Rossum Platform (
https://rossum.ai/
) by using his Rossum credentials and it also saves theJWT token
returned to a variable. User must have first configured an account.After typing the desired name for the variable in the
Result
parameter inside the Properties Box, the user must also create it by pressingCtrl+K
. This variable will hold the contents of theJWT token
returned so users can make use of it in the activities discussed below to perform the invoice processing.For more information on the Rossum Platform, please refer to Quick Start Guide on Rossum - FAQ | Help Center (
https://rossum.ai/help/article/quick-start-guide/
).Properties Parameters
DisplayName
- Title of the activity inside the sequence.Password
- Password for the Rossum credentials.Result
- Variable to which theJWT token
will be saved.Username
- Username for the Rossum credentials.OpenRPA.ElisRossum Auth.
This platform provides invoice extraction services through cognitive data capture, which is the recommended way over common OCR for this type of data. Please visit Rossum - FAQ | Help Center (
https://rossum.ai/help/faq/
) for more information.
-
Export File Data
This activity exports the data acquired from the Rossum Platform annotation (
https://api.elis.rossum.ai/docs/#annotation
) into a variable of typeOpenRPA.ElisRossum.ExportResult
. Furthermore, this object allows the users to iterate through it and consume the following datatypes:invoice_id
,date_issue
,date_due
,sender_ic
,recipient_ic
,amount_total_base
,amount_total_tax
.The users must have a
JWT token
returned by the Auth Activity previously saved into a variable, which will be inserted in theKey
parameter.The users must also have previously initialized a Rossum Platform queue into a variable by using the Get Queue activity.
The
Fileurl
variable which will be used to acquire the data for the Rossum Platform annotation must have been initialized as theResult
from an Upload File activity.After typing the desired name for the
ExportResult
variable in theResult
parameter inside the Properties Box the user must also create it by pressingCtrl+K
. This variable will hold the current data of the Rossum Platform annotation acquired by using theFileurl
specified.Properties Box
DisplayName
- Title of the activity inside the sequence.Fileurl
-URL
for the Rossum Platform annotation acquired with the Upload File activity.Key
-JWT token
returned by the Auth Activity.Queue
-URL attribute
for the indexed queue which is returned from the variable acquired through the Get Queue activity - ie.qs(0).url
.Result
- Variable to which the data acquired will be saved.OpenRPA.ElisRossum Export File Data.
-
Get File Status
Gathers the status for a Rossum Platform annotation (
https://api.elis.rossum.ai/docs/#annotation
) and saves it into a variable.The users must have a
JWT token
returned by the Auth Activity previously saved into a variable, which will be inserted in theKey
parameter.The users must also have previously initialized a Rossum Platform queue into a variable by using the Get Queue activity.
The
Fileurl
variable which will be used to gather the status data for the Rossum Platform annotation must have been initialized as theResult
from an Upload File activity.For more information on possible file statuses, please refer to Rossum Platform Annotation Lifecycle (
https://api.elis.rossum.ai/docs/#annotation-lifecycle
).Properties Parameters
DisplayName
- Title of the activity inside the sequence.Fileurl
-URL
for the Rossum Platform annotation acquired with the Upload File activity.Key
-JWT token
returned by the Auth Activity.Result
- Status returned by the activity. Refer to Rossum Platform Annotation Lifecycle (https://api.elis.rossum.ai/docs/#annotation-lifecycle
) for more information.OpenRPA.ElisRossum Get File Status.
-
Get Queue
Acquires all queues contained inside the given account for the Rossum credentials provided with the Auth Acivity and saves them to a variable.
The users must have a
JWT token
returned by the Auth Activity previously saved into a variable, which will be inserted in theKey
parameter.In Rossum Platform, a queue is a space into which users import documents they want to process. Each queue is an organizational unit that typically represents a particular document type that needs to be processed. Learn how to create a Rossum Platform queue at Creating a New Queue on Rossum - FAQ | Help Center (
https://rossum.ai/help/article/creating-a-new-queue/
).After typing the desired name for the variable in the
Results
parameter inside the Properties Box the user must also create it by pressingCtrl+K
. This variable will hold the contents of theJSON Object
containing the ``Queues[]``returned by the Rossum Platform.Properties Parameters
DisplayName
- Title of the activity inside the sequence.Key
-JWT token
returned by the Auth Activity.Results
- Variable which will hold the contents of theQueues[]
.

-
Upload File
Uploads a file into one of the queues returned by the Get Queue activity and saves the resulting URL for the Rossum Platform annotation (
https://api.elis.rossum.ai/docs/#annotation
).The users must have a
JWT token
returned by the Auth Activity previously saved into a variable, which will be inserted in theKey
parameter.The users must also have previously initialized a Rossum Platform queue into a variable by using the Get Queue activity.
The users must also provide the
absolute filepath
of the file in theFilename
parameter inside the Properties Box. This file must obligatorily have thePDF
file format or else the activity will return an error. It must also be enclosed between quotes.After typing the desired name for the variable in the
Result
parameter inside the Properties Box the user must also create it by pressingCtrl+K
. This variable will hold the contents of the URL`for the `Rossum Platform annotation.Properties Parameters
DisplayName
- Title of the activity inside the sequence.Filename
-Absolute filepath
of the file which will be uploaded.Key
-JWT token
returned by the Auth Activity.Queue
-URL attribute
for the indexed queue which is returned from the variable acquired through the Get Queue activity - ie.qs(0).url
.Result
- Variable to which theURL
for the document just uploaded will be saved.
-
Wait for File Status
Sets the workflow status to
idle
until the status of the Rossum Platform annotation (https://api.elis.rossum.ai/docs/#annotation
) is equal to the one provided by the users.The users must have a
JWT token
returned by the Auth Activity previously saved into a variable, which will be inserted in theKey
parameter.The
Fileurl
variable which will be used to match the status data for the Rossum Platform annotation must have been initialized as theResult
from an Upload File activity.After typing the desired name for the variable in the
Result
parameter inside the Properties Box the user must also create it by pressingCtrl+K
. This variable will hold the current status of the Rossum Platform annotation acquired by using theFileurl
specified.For more information on possible file statuses, please refer to Rossum Platform Annotation Lifecycle (
https://api.elis.rossum.ai/docs/#annotation-lifecycle
).Properties Box
DisplayName
- Title of the activity inside the sequence.Fileurl
-URL
for the Rossum Platform annotation acquired with the Upload File activity.Key
-JWT token
returned by the Auth Activity.Result
- Variable to which the Rossum Platform Annotation Status will be saved.Status
-Status
which the current status of the file will be matched against. For more information on possible file statuses, please refer to Rossum Platform Annotation Lifecycle (https://api.elis.rossum.ai/docs/#annotation-lifecycle
).Timeout
- Time interval for which the workflow will wait before ceasing to check whether the status of the file in the Rossum Platform matches the status provided in theStatus
parameter. Can be a simple 00:00:00.00 {hh:min:ss.mili} or an object from the TimeSpan class.
3.5.4.5. OpenRPA.Forms¶
Here belong the activities located inside the OpenRPA.Forms toolbox.
-
Invoke Form
Allows the user to create a static form which uses ForgeForms language (
https://wpf-forge.github.io/Forge.Forms/guides/getting-started.html
).SimpleForm
andImageForm
examples are shown in the Snippets toolbox, just besides the Activities toolbox. This is very useful when a Workflow needs to gather input from an user before executing its business logic. The user can set up the form and preview it by clicking the Open Designer button. After creating it, all the user needs to do to create the variables used by it is click the Create variables button. An example is shown in the OpenRPA Forms section.Properties Parameters
DisplayName
- Title of the Activity inside the sequence.Form
- String containing the form which will be created.Result
- Creates aFormResult
variable which will hold the DOM object created by the form. To access the values inside the DOM object created, the user can simply use theModel.Values(i).ToString
to access thei-th
input variable.
-
Show Notification
Shows a notification in the lower right corner of the screen for a limited amount of time.
Properties Parameters
DisplayName
- Title of the Activity inside the sequence.Message
- Message which will be shown.NotificationType
- Different notification types: Information, Error or Warning.
Note
Refrain from using too many Activities that change UI elements (such as Show Balloon Tip, WriteLine or Show Notification). These activities run single-threaded, which means that each time they are executed, they briefly stop Workflow execution.

OpenRPA.Forms Show Notification.¶
3.5.4.6. OpenRPA.IE¶
Here belongs the activities located inside the OpenRPA.IE toolbox.
-
Get Element
This Activity is similar to OpenRPA.GetElement. It selects an Element - or elements - filtered with the IE selector.
Clicking Highlight will red-highlight the first element that matches the criteria on the selector. Useful for checking if the selector is properly set up.
This activity also supports nesting GetElements. In order to know more about that, please refer to Return multiple elements section.
Properties Parameters
Displayname
- Title of the Activity inside the sequence.
Elements
- the selected IE Elements.
From
- Allows search only within an Element found within any of the IEElement’s instances.
LoopAction
- Loop the selectedActivity
until something is found.
MaxResults
- Maximum number of elements to be found.
MinResults
- Number of minimum results. If this value is higher than 0 and this Activity fails to find an element, it throws an exception (ElementNotFound
). If you want to check whether an element exists or not, set this value to 0 and test for ‘item.Length() == 0’ inside the sequence.
Selector
- Contains all the data to identify the IE application.
Timeout
- Time when the Activity ceases if it is not successfully able to find an element.
Wait for ready
- If true, wait until the page is fully loaded.
Note
The user can also use XPath Selector to select elements inside the page. XPath Selectors use the following syntax:
Matches any element node
@* - Matches any attribute node
node() - Matches any node of any kind
So, for instance, if the user wanted to select all the child element nodes of a bookstore node, they’d use /bookstore/*
. To select all elements in a document, they’d use //*
. Now if they’d like to select all title elements which have at least one attribute of any kind, they’d use //title[@*]
. To concatenate XPath expressions, the user can use the | operator
. So, if they’d like to select all title AND price elements of all book elements, they’d use the expression //book/title | //book/price
.¹
¹ - `XPath Syntax <https://www.w3schools.com/xml/xpath_syntax.asp>`_ (``https://www.w3schools.com/xml/xpath_syntax.asp``).
Note
As well as the XPath Selector, the user can also use the CSS Selector. CSS Selectors use the following syntax:
.{CLASS} - Matches all elements with that class.
#{CLASS} - Matches all elements with that id.
** * ** - Matches all elements.
{ELEMENT} - Matches all <p> elements.
The syntax is pretty similar to that of XPath Selectors. For more on CSS Selectors, refer to CSS Selectors (https://www.w3schools.com/cssref/css_Selectors.asp
).

OpenRPA.IE Get Element.¶
-
Open URL
Opens an URL in the currently selected InternetExplorer.Application instance. If there is no URL set, it will automatically start a new Internet Explorer instance.
Properties Parameters
DisplayName
- Title of the Activity inside the sequence.FocusBrowser
- If set toTrue
, will focus the window opened by the browser.Url
- The URL which the browser will navigate to.

OpenRPA.IE Open URL.¶
3.5.4.7. OpenRPA.Image¶
Here belongs the activities located inside the OpenRPA.Image toolbox.
Note
Activities that use OCR to recognize text inside images must have first have the language which OCR will use first on the Settings tab.
-
Get Color
Gets RGBA color at the specified coordinates inside an element provided by Image.GetElement.
Properties Parameters
Displayname
- Title of the Activity inside the sequence.Element
- Element from which the colors will be acquired.Result
- Variable file path to save the color.X Offset
- The horizontal offset inside the element from which to capture the color. Units are in pixels. It also allows for negative values.Y Offset
- The vertical offset inside the element from which to capture the color. Units are in pixels. It also allows for negative values.

OpenRPA.Image Get Color.¶
-
Get Element
Locates an image in screen or in a specific application window and creates an ImageElement from it. Use the Select Image button to select the image you want to capture or use the Recorder.
The Recorder at first tries to create Elements from controls in Windows Applications, Java Apps or Web elements. As a last resource, it will then make use of Image.GetElement to create Elements by capturing the smallest unique images inside the image you drag while recording.
Clicking the Highlight button will red-highlight the first element that matches the criteria in the Selector. It is useful for checking if the Selector is properly set up.
Properties Parameters
CompareGray
- If set toTrue
, compares the image in grayscale to find the desired element. This parameter also saves performance.Displayname
- Title of the Activity inside the sequence.Elements
- Element from which the image will be gathered.From
- Allows search only within an Element found within any of the ImageElement’s instances.Limit
- Limit the number of Elements.LoopAction
- Loop the selectedActivity
until something is found.MaxResults
- Number of maximum results.MinResults
- Number of minimum results. If this value is higher than 0 and this activity fails to find an Element, it throws an exception (ElementNotFound
). If you want to check whether an image exists or not, set this value to 0 and test for ‘item.Length() == 0’ inside the sequence.Processname
- Limits the Element’s process to a specific processname.Threshold
- Threshold used to find a matching image.Timeout
- Time until the Activity ceases if not successfully able to find an Element.

OpenRPA.Image Get Element.¶
-
Get Image
Gets an image from the screen relative to another image or Element found with Image.GetElement.
First of all, user must use the Image.Get Element Activity to select the image which this Activity will act upon, then use the Select Image button to specify the relative area within the screen you want to capture. That is, the selection Get Image does it match to another image selected with the Image.Get Element Activity.
Clicking Highlight will green-highlight the image selected that is relative to the other one, which will appear blue-highlighted. This is useful for checking if the Selector is properly set up.
For more on Image Handling inside OpenRPA, please visit Appendix B - Image Handling.
Properties Parameters
Displayname
- Title of the Activity inside the sequence.Element
- Element from which the image will be gathered.Height
- Height of the image to be captured.OffsetX
- The horizontal offset inside the Element from which to capture the image. Units are in pixels. It also allows for negative values.OffsetY
- The vertical offset inside the picture from which to capture the image. Units are in pixels. It also allows for negative values.Result
- Variable file path the image Element will be saved.Width
- Width of the image to be captured.

OpenRPA.Image Get Image.¶
-
Get Text
Gets text from an image using OCR. It can be limited to a specific word or sentence. It can also be used to split or limit text gathered from other image-related activities.
The
Limit to
orWordLimit
parameter is used to limit the output of the OCR processing. It is useful if you want to limit the output ofGet Text
to a given set of words. To access the text created from OCR, simply access theitem.Value
variable - or theValue
property of theElement
defined.Properties Parameters
CaseSensitive
- Differentiate between lowercase and uppercase letters.Displayname
- Title of the Activity inside the sequence.Element
- Element from which the image will be gathered.Result
- Variable file path the ImageElement gathered will be saved.WordLimit
- Maximum numbers of words to gather.

OpenRPA.Image Get Text.¶
-
Load From File
Loads an image from a file and returns it as an ImageElement.
It also uses OCR Image Recognition automatically to capture the text inside the screenshot and saves it inside the result’s
ImageElement.value
attribute. The extensions allowed are:gif, jpg, jpeg
andpng
, that is, only image extensions.Properties Parameters
Displayname
- Title of the Activity inside the sequence.Filename
- Filename of the file that will be used to obtain the image from.Result
- Variable file path to save the ImageElement.Note
Note: OCR Image Recognition is done automatically upon the image. Users may access the resulting text by accessing
ImageElement.value
property.

OpenRPA.Image Load From File.¶
-
Take Screenshot
Takes a screenshot of the whole screen or of a specific Element found by using Image.GetElement and returns it as an ImageElement.
This Activity has two modes of usage.
The first mode of usage is Selector-less. In this mode the Activity will take a screenshot of the whole screen if no
Width
,Height
and offsets are set. To use this mode, all the user needs to do is deleting any value inside theElement
property of the activity - its default value isitem
- and define theX
andY
offset values, if desired.The second mode of usage is Selector-bound. In this mode, after selecting an Image Element, the Activity will use the relative values of the Image Element to find the
X
andY
offset values. To use this mode, all the user needs to do is drag the Take Screenshot activity into the Element selected and define theWidth
,Height
andX
,``Y`` offset values.Properties Parameters
Displayname
- Title of the Activity inside the sequence.Element
- Name of the Element from which the screenshot will be captured.Height
- Height of the screenshot.Result
- Variable file path to save the screenshot.Width
- Width of the screenshot.X
- The horizontal offset inside the picture from which to capture the screenshot. Units are in pixels. It also allows for negative values.Y
- The vertical offset inside the picture from which to capture the screenshot. Units are in pixels. It also allows for negative values.Note
Note: OCR Image Recognition is done automatically upon the image and you may access the resulting text by accessing the
value
property of the resultingImage Element
.

OpenRPA.Image Take Screenshot.¶
3.5.4.8. OpenRPA.Java¶
Coming soon - Work in progress
3.5.4.9. OpenRPA.NM¶
Here belong the activities located inside the OpenRPA.NM toolbox.
-
Close Tab
This Activity allows the users to close the currently opened tab or all tabs inside one of the three browsers currently supported by OpenRPA:
Chrome
,Firefox
orEdge
.The users need to set the desired browser inside the
Browser
parameter. This can be"chrome"
,"ff"
or"edge"
. Corresponding, respectively, to each browser cited above.If the users desire to close all tabs they must set the
CloseAll
parameter toTrue
, else the Activity will only close the currently opened tab.Properties Parameters
Browser
- Browser which OpenRPA will close the tab - or tabs. This parameter can be set to"chrome"
,"ff"
or"edge"
.CloseAll
- If set toTrue
, OpenRPA will close all tabs currently opened inside the browser.Displayname
- Title of the activity inside the sequence.

-
Execute Script
This Activity allows the users to execute
JavaScript
scripts inside one of the three browsers currently supported by OpenRPA:Chrome
,Firefox
orEdge
and returns the value of the last expression evaluated. It is useful to remind users that the browser must already be opened, else the Activity will return aSystem.NullReferenceException
.The script which will be run can be inserted by clicking the
Open Editor
and pasting or typing the script inside theCode Editor
.The users also need to set the desired browser inside the
Browser
parameter in which the script will be executed. This can be"chrome"
,"ff"
or"edge"
. Corresponding, respectively, to each browser cited above.To return the value of the last expression evaluated as an
Object
users must type the name of the variable inside theResult
parameter and pressCtrl+K
to create it.Users can also set the
FrameId`´ corresponding to the ``Frame
in which the script will be injected. For more information on this, please visit Window.frames (https://developer.mozilla.org/en-US/docs/Web/API/Window/frames
).Properties Parameters
Browser
- Browser in which OpenRPA will execute the script. This parameter can be set to"chrome"
,"ff"
or"edge"
.DisplayName
- Title of the activity inside the sequence.FrameId
-ID
of the frame in which the script will be injected. Must be of typeInt32
.Result
- Variable to which the result of the last expression evaluated will be saved.Script
- Script which will be executed.

-
Get Element
This Activity is similar to OpenRPA.Get Element. It selects an element - or elements - filtered with the NM Selector.
Clicking Highlight will red-highlight the first Element that matches the criteria on the selector. Useful for checking if the selector is properly set up.
Properties Parameters
Displayname
- Title of the Activity inside the sequence.Elements
- The selected NM elements.From
- It allows search only within an Element found within any of the NMElement’s instances.MaxResults
- Maximum elements to be found.MinResults
- Number of minimum results. If this value is higher than 0 and this activity fails to find an element, it throws an exception (ElementNotFound
). If you want to check whether an elements exists or not, set this value to 0 and test for ‘item.Length() == 0’ inside the sequence.Selector
- Contains all the data to identify the NM application.Timeout
- Time until the activity ceases if not successfully able to find an element.Wait for ready
- If set to “True”, it waits until the page is fully loaded.
Note
The user can also use XPath Selector to select Elements inside the page. XPath Selectors use the following syntax:
Matches any element node
@* - Matches any attribute node
node() - Matches any node of any kind
So, for instance, if the user wanted to select all the child element nodes of a bookstore node, they’d use /bookstore/*
. To select all elements in a document, they’d use //*
. Now, if they’d like to select all title elements which have at least one attribute of any kind, they’d use //title[@*]
. To concatenate XPath expressions, the user can use the | operator
. So, if they’d like to select all title AND price elements of all book elements, they’d use the expression //book/title | //book/price
.¹
¹ - `XPath Syntax <https://www.w3schools.com/xml/xpath_syntax.asp>`_ (``https://www.w3schools.com/xml/xpath_syntax.asp``).
Note
As well as the XPath Selector, the user can also use the CSS Selector. CSS Selectors use the following syntax:
.{CLASS} - Matches all elements with that class.
#{CLASS} - Matches all elements with that id.
** * ** - Matches all elements.
{ELEMENT} - Matches all <p> elements.
The syntax is pretty similar to that of XPath Selectors. For more on CSS Selectors, refer to CSS Selectors (https://www.w3schools.com/cssref/css_Selectors.asp
).

OpenRPA.NM Get Element.¶
-
Open URL
Opens an
URL
inside one of the three browsers currently supported by OpenRPA:Chrome
,Firefox
orEdge
. If noURL
is set, it will automatically start a new browser instance.The users need to set the desired browser inside the
Browser
parameter in which theURL
will be opened. This can be"chrome"
,"ff"
or"edge"
. Corresponding, respectively, to each browser cited above.The users also need to set whether the tab will be opened inside a new tab or in the currently opened tab by setting the
NewTab
parameter toTrue
orFalse
.Properties Parameters
Browser
- Browser in which OpenRPA will execute the script. This parameter can be set to"chrome"
,"ff"
or"edge"
.DisplayName
- Title of the Activity inside the sequence.NewTab
- If set toTrue
, it opens the URL inside a new tab in the browser. Else, if set toFalse
, opens the URL inside the currently opened tab.Url
-URL
which will be opened inside the browser.

OpenRPA.NM Open URL.¶
3.5.4.10. OpenRPA.Office¶
Here belongs the activities located inside the OpenRPA.Office toolbox.
-
Add Paragraph
Adds a new paragraph to a Microsoft Word document, which is inserted at position
Index
.Properties Parameters
Filename
- Full path orfilename
of the Microsoft Word document file path the paragraph will be added.Index
- Index file path the paragraph will be added. Initially, the file that will be read will index each paragraph starting at1
. So, if the user adds at a position that contains a paragraph after it, the new paragraph will be added in between.Text
- Text which will be added - i.e., paragraph.DisplayName
- Title of the activity inside the sequence.

OpenRPA.Office Add Paragraph¶
-
Clear Range
Clears all data and formatting from a range of cells.
Properties Parameters
Cells
- Either select a range of cells to wipe or leave blank if it is desired to clear all cells.Filename
- Full path orfilename
of Microsoft Excel workbook.Worksheet
- Name of worksheet from which cells will be cleared.DisplayName
- Title of the activity inside the sequence.ReadPassword
- Provides a way to open Microsoft Excel files if a password is needed. Remember to insert the password between quotes - ie."password"
.Visible
- Actually opens Microsoft Excel interface.WritePassword
- Provides a way to save Microsoft Excel file if a password is needed. Remember to insert the password between quotes - ie."password"
.Workbook
- Provides a way to select whichWorkbook
will be read.

OpenRPA.Office Clear Range¶
-
Close Document
Closes a Microsoft Word document. Also closes Microsoft Word application itself if no other documents are open. This activity works very similarly to OpenRPA.Close Application, the only difference here is that it saves the Word document by default when closing it.
Properties Parameters
Filename
- Full path orfilename
of Microsoft Word document which will be closed.Save Changes
- Whether or not to save changes when closing the Word document. The default isTrue
.DisplayName
- Title of the activity inside the sequence.

OpenRPA.Office Close Document¶
-
Close Workbook
Closes an open Microsoft Excel workbook. Also closes Microsoft Word if no other workbooks are open. This activity works very similarly to OpenRPA.Close Application, the only difference here is that it saves the Excel document by default when closing it.
Properties Parameters
Filename
- Full path orfilename
of Microsoft Excel workbook which will be closed.Save Changes
- Whether or not to save changes when closing the Excel workbook. The default isTrue
.Workbook
- The user can also pass thevariable
name of aWorkbook
which is already open.DisplayName
- Title of the activity inside the sequence.

OpenRPA.Office Close Workbook¶
-
Get Mails
Gets all emails from a Microsoft Outlook folder and automatically saves them into the
item
variable. Users can then choose to loop through all emails in the selected folder or save it into a variable of typeIEnumerable<email>
by inserting it into theEmails
field.It also allows the use of
DASL queries
to filter through theemails
gathered. An example is the"@SQL=urn:schemas:httpmail:subject LIKE '%${SUBJECT}%'"
query, which will filter through all mails containing in its subject the parameter passed in${SUBJECT}
.Users can also download all the attachments in a given folder or specific email by using the
item.SaveAttachments(${FOLDERPATH}, ${OVERWRITE})
function, where${FOLDERPATH}
is theString
variable containing the path of the folder file path the attachments will be saved and${OVERWRITE}
is theBoolean
value which specifies whether to overwrite files, if set toTrue
, or not.Properties Parameters
Filter
- The user can pass a filter to get only emails containing the specified string.Folder
- Folder from which the emails will be gathered.MaxResults
- Specify a maximum number of emails to be acquired.UnreadOnly
- If set toTrue
, will only acquire unread emails. Else, will acquire any read and unread emails.DisplayName
- Title of the activity inside the sequence.Emails
- Will save all emails to a variable of theIEnumerable<email>
type containing all emails acquired.

OpenRPA.Office Get Mails¶
-
Get Paragraph
Gets one or more paragraphs from a Microsoft Word document starting at index
1
. User must first set thevariable
file path the text acquired will be saved inside theText
parameter. If user sets no index, activity will capture all the text inside the Word document. If desired, they can also set the maximum number of results inside theMax Results
parameter, as to limit the amount of paragraphs captured as well as a variable to hold the number of paragraphs contained in the Word document inside theCount
parameter. They must also save the changes made to the Word document with the Set Paragraph activity in order for them to take effect!Properties Parameters
Filename
- Full path andfilename
of the Microsoft Word document from which the paragraph (or paragraphs) will be acquired.Index
- Starting index for the paragraph or paragraphs which will be gathered. Leave this field blank to gather whole text inside Word document.DisplayName
- Title of the activity inside the sequence.Max Results
- Limit number of paragraphs which will be acquired. Leave blank to get all from index onwards.Count
- Returns the total number of paragraphs inside the document.Text
- Save the result text to this variable.

OpenRPA.Office Get Paragraph¶
-
Get Selected Range
It gets the
Cell
indexes for a range selected inside the Excel Worksheet within Microsoft Excel application’s Windows UI. Click...
to select the file from which the Excel Worksheet will be opened. If no cells are selected, return theC11
cell by default.Properties Parameters
ColumnAbsolute
- If set toTrue
, it returns the absolute index of the column. The letter must be prepended by$
, e.g.,$A
will return the first column.External
- If set toFalse
, it returns a local reference without including a Workbook and Worksheet reference.Filename
- Full path orfilename
of Microsoft Excel Workbook.RowAbsolute
- If set toTrue
, it returns the absolute index of the row. The number must be prepended by$
, e.g.,$9
will return row number 9.Worksheet
-String
value of the Worksheet from which cells will be selected.DisplayName
- Title of the Activity inside the sequence.ReadPassword
- Password used to read the file.Visible
- If set toTrue
, visibly opens Excel Worksheet and execute the Activity.WritePassword
- Password used to write the file.Range
- Variable file path the selected range will be saved.Workbook
- Users can also use an already openWorkbook
instead of the filename.

OpenRPA.Office Get Selected Range¶
-
Move MailItem
It moves an
email
captured with the Get Mails Activity into the selected folder in the dropdown.First, select the folder inside the dropdown and, then, enter the
email
object that will be moved inside theMail
input field. Thisemail
object is indexed from theIEnumerable<email>
variable from the Get Mails Activity.Properties Parameters
Folder
- Folder file path theemail
will be moved.Mail
-Email
object corresponding to theemail
inside Outlook that will be moved.

OpenRPA.Office Move MailItem¶
-
New MailItem
Creates a new
email
item and either sends it to the desiredemail contact
or opens a new Outlook Message box prompt for the user to execute any other activities inside it. If user chooses the latter option, Outlook will either create a new draft if the user clicksYes
when asked to save changes or simply discard the wholeemail
message.Users can also send attachments by specifying a
String list
variable containing the paths for the desired files. User is also allowed to consume the attachments - ie. media - by using them withHTMLBody
parameter.Properties Parameters
Attachments
-String list
containing the paths for the attachments. E.g.,{"C:/BPA/attachment1.pdf", "C:/BPA/attachment2.png"}
. N.B. the type of the variable must be set asString[]
, i.e., list of strings.BCC
-Blind Carbon Copy
. It sendsemail
to predefined recipients and does not allow them to see other receivers.Body
- Text body ofemail
message.CC
-Carbon Copy
. Sendsemail
to predefined recipients and allows them to see other receivers.HTMLBody
-HTML
body ofemail
message.Subject
- Subject ofemail
message.To
- Main recipient ofemail
message.DisplayName
- Title of Activity inside the sequence.UIAction
- If selected toSend
, it sends the email right away. Else, it shows Outlook Message box prompt.Email
-email
object file path the result of the Activity will be saved to. Can be used to manipulate message after sent, such as sending it to another folder.

OpenRPA.Office New MailItem¶
-
Read Cell
Reads the content of a single cell in a Microsoft Excel sheet into a variable.
Properties Parameters
Cell
- The cell which will be read - ie."A8"
.ArgumentType
- Type of the variable file path the content of the cell will be saved.DisplayName
- Title of the activity inside the sequence.Filename
- Filename of the file which will be read.Result
- Variable file path the content of the result of the cell will be saved.Workbook
- Variable file path the entireWorkbook
object will be saved. Despite this Activity reading a specific cell, theWorkbook
is also available.Worksheet
- Worksheet from which to gather the data.Formula
- Variable file path it saves the content of the formula inside the cell.Range
- Range which will be read.

OpenRPA.Office Read Cell.¶
-
Read Range
Reads a range of cells in a Microsoft Excel sheet.
Properties Parameters
Cells
- The cells which will be read, can be delimited with a colon.Filename
- Filename of the file which will be read.Worksheet
- The sheet inside the Excel file which will be read.Clear Formats
- Clear cell formatting.DisplayName
- Title of the Activity inside the sequence.IgnoreEmptyRows
- Ignores empty rows in the file which will be read. Please notice that it changes the numbering of the rows.ReadPassword
- String containing the password for the file, if there is any.Use Header Row
- Read header from the range of cells selected.Visible
- OpenRPA will actually open an Excel file in Windows UI.WritePassword
- Password with which the file will be written after being read.DataTable
-DataTable
file path data will be saved.lastUsedColumn
- Save last used column index to variable.lastUsedRow
- Save last used row index to variable.Workbook
- SaveWorkbook
to a specific variable.

OpenRPA.Office Read Range.¶
-
Run Excel Macro<>
This Activity is responsible for running Microsoft Excel Macros.
Once this Activity is created, a dialog window named “Select Types” will appear. If the
VBA macro procedure
which defines the macro actually returns any data, then the users must select the data type of the return output. Else, the user can set this parameter asString
. For more on what macros are and how to use them, please refer to the Getting started with VBA in Office (https://docs.microsoft.com/en-us/office/vba/library-reference/concepts/getting-started-with-vba-in-office
) page. If theVBA macro procedure
must receive any parameters, they must be declared inside theParameters
as aString array
- ie. enclosed between{}
.If Microsoft Excel is closed, it will be opened once the Workflow reaches this Activity.
Properties Parameters
Name
- Name of the macro which will be executed. Notice that this is not the filename, but the name of the macro inside the chosen file. This name must be between quotation marks.Parameters
- The parameter required by the macro. This must be an array containing all parameters.DisplayName
- Title of the Activity inside the Sequence.Filename
- Full path or filename of thexlsm
file that contains the macro to be executed.Result
- The variable or argument file path the result (i.e., the output) of the macro will be stored, if there is any. Must be created before running the Workflow.Workbook
- Variable file path the entireWorkbook
object can be saved. The type of this variable must be “Microsoft.Office.Interop.Excel.Workbook”.Worksheet
- Name of the worksheet from which the macro will be read. It must be astring
.OpenRPA.Office Run Excel Macro<>
-
Run Slideshow
This Activity is responsible for presenting a previously created Microsoft PowerPoint slideshow.
Properties Parameters
Filename
- Full path or filename of the Microsoft PowerPoint slideshow that will be presented.StartingSlide
- Index of the slide from which the robot should start presenting the slideshow.AdvanceTime
- Time interval for which OpenRPA should wait before visualizing the next slide in the presentation. Can be a simple 00:00:00.00 {hh:min:ss.mili} or an object from the TimeSpan class.CloseAtEnd
-Boolean
value. If set toTrue
, the Microsoft PowerPoint Application will cease execution when the presentation is over. Otherwise, it will remain open.DisplayName
- Title of the Activity inside the Sequence.EndingSlide
- The index of the last slide that will be presented.KioskMode
- Boolean value. If set toTrue
, it enables kiosk mode for Microsoft PowerPoint, that is, the slideshow will be presented automatically in a manner that users cannot interfere with the execution of the slideshow.OpenRPA.Office Run Slideshow
-
Save MailItem
Saves a Microsoft Outlook
email
item as a file.First, enter the
email
object - indexed from theIEnumerable<email>
variable - inside theEMail
parameter in the Properties Box. Thisemail
object is indexed from theIEnumerable<email>
variable acquired with the Get Mails activity. The email will be automatically saved into theFolder
specified with theSubject
of the e-mail as itsfilename
.Properties Parameters
EMail
-Email
item which will be saved into a file. Indexed from aIEnumerable<email>
variable.Folder
- Folder path file path theemail
item will be saved.DisplayName
- Title of the Activity inside the Sequence.Type
- Type of file which will be used to save theemail
item. Current supported formats are.doc
,.html
,.ics
,.mht
,.msg
,.rtf
,.oft
,.txt
,.vcs
,.vcf
.Filename
- Currently unused parameter.

OpenRPA.Office Save MailItem¶
-
Set Paragraph
This Activity sets the content of a paragraph inside a Microsoft Word document.
The user may choose to overwrite the entire document with the text specified by not providing any value to the
Index
parameter. It is recommended that after setting the changes that will be made, they use the Close Document Activity to properly close and save the Word document.Properties Parameters
Filename
- Full path andfilename
of the Microsoft Word document file path the paragraph (or paragraphs) will be set.Index
- Index of the paragraph which will be set.Text
- Textvariable
orString
containing the text that will overwrite the given paragraph or whole document.DisplayName
- Title of Activity inside the sequence.

OpenRPA.Office Set Paragraph¶
-
Write Cell<>
This method sets value or formula to a single cell inside a Microsoft Excel document.
The user must first set the type of
Result
, which corresponds to thedatatype
that will be saved in the cell. Please remind that thedatatype
must be already set inside the Excel document. Users can also specify the Workbook that will be used inside theWorkbook
parameter as well as theWorksheet
that will be used to write or overwrite the cell.Properties Parameters
Cell
- Cell that will have its contents changed.Formula
- Formula from which the value will be acquired and placed inside the cell.Value
- Variable or content with prespecifieddatatype
which will be obtained and placed inside the cell.DisplayName
- Title of the Activity inside the sequence.Filename
- Full path andfilename
of the Microsoft Excel document file path the cell will be set.Result
- Currently unused parameter.Workbook
- Workbook that will be used to insert or change the cell’s content.Worksheet
- Worksheet that will be used to insert or change the cell’s content.


OpenRPA.Office Write Cell<>¶
-
Write Range
This Activity writes all data contained inside a
DataTable
into a Microsoft Excel Worksheet.The user must first click the
...
button and find the file file path it will be saved or added. Users can also specify aWorkbook
Properties Parameters
Cell
- The firstCell
that corresponds to the row file path it will start writing.DataTable
-DataTable
from which data will be gathered.Filename
- Full path andfilename
of the Microsoft Excel document file path the cell will be set.Worksheet
- Name of the sheet file path it will write.DisplayName
- Title of the Activity inside the sequence.ReadPassword
- Password used to read the file.Use Header Row
- If set toTrue
, it will use the header fromDataTable
to write the range of cells selected.Visible
- If set toTrue
, it will visibly open and write Microsoft Excel document.WritePassword
- Password used to write the file.Workbook
- Workbook that will be used to insert or change the cell’s content.

OpenRPA.Office Write Range¶
3.5.4.11. OpenRPA.OpenFlowDB¶
Here belong the activities located inside the OpenRPA.OpenFlowDB toolbox.
-
Assign OpenFlow
Assigns an OpenFlow Workflow to an user or role. This activity works very similarly to the
assign
node inside Node-RED.Properties Parameters
DisplayName
- Title of the activity inside the sequence.InitialRun
- This parameter attributes an initial run to the Workflow assigned.targetid
- ID of the user file path the Workflow will be assigned.Wait until Completed
- If set toTrue
, OpenRPA waits until theWorkflow
invoke call is finished - either success or error. If successful, the message containing the data (as designed in the flow at Node-RED) is returned to the OpenRPA robot.workflowid
- ID of the Workflow that will be assigned.

OpenRPA.OpenFlowDB Assign OpenFlow¶
-
Delete File
Deletes a file from the OpenFlow MongoDB database. The user can use either the
Filename
of the file he wants to delete or theid
, available at OpenFlow’s page > Admin > Files > Clicking the Edit button for the file >Show json
or by checking the URL.Properties Parameters
_id
-ID
of the file which will be deleted.DisplayName
- Title of the activity inside the sequence.Filename
- Filename of the file which will be deleted.IgnoreErrors
- Ignore any errors which may have occurred and forcibly delete the file.

OpenRPA.OpenFlowDB Delete File¶
-
Delete One
Deletes one item from the OpenFlow MongoDB database. Users must specify the desired
Collection
file path the item belongs. User can also specify an object which will be deleted in batch from the database as well.Properties Parameters
_id
-ID
of the item which will be deleted.Collection
- Collection file path the item belongs.DisplayName
- Title of the activity inside the sequence.IgnoreErrors
- Ignore any errors which may have occurred and forcibly delete the item.Item
- Object which the user can specify instead of the_id
.

OpenRPA.OpenFlowDB Delete One¶
-
Get Credentials
Gets a set of encrypted credentials from OpenFlow. This is the most recommended way of acquiring previously saved credentials into the OpenFlow MongoDB database with the Set Credentials activity. It is a great replacement for any kind of local safe, such as KeePass.
Properties Parameters
DisplayName
- Title of the activity inside the sequence.Name
- Name of credential which will be acquired.Password
- Saves the password to a variable of type SecureString (https://docs.microsoft.com/en-us/dotnet/api/system.security.securestring?view=netcore-3.1
).UnsecurePassword
- Saves the password acquired to a variable of typeString
.Username
- Saves username acquired to a variable of typeString
.

OpenRPA.OpenFlowDB Get Credentials¶
-
Get File
Downloads a file saved inside the OpenFlow MongoDB database and saves it to the specified
LocalPath
. The user can use either theFilename
of the file he wants to download or theid
, available at OpenFlow’s page > Admin > Files > Clicking the Edit button for the file >Show json
or check the URL. The folder file path the file will be saved must exist already.Properties Parameters
_id
-ID
of the file which will be downloaded.DisplayName
- Title of the activity inside the sequence.Filename
- Filename of the file which will be downloaded.IgnorePath
- If set toTrue
, will ignore the last name of theLocalPath
. Useful for downloading full folders created inside OpenFlow.LocalPath
- Path of the folder file path the file will be saved.

OpenRPA.OpenFlowDB Get File¶
-
Grant Permission
It adds or updates permissions for a user or role on the specified object. The document must be updated in OpenFlow after changing permissions with Insert or Update One. The object must also be supplied from an OpenFlowDB.Query Activity.
Properties Parameters
Delete
- If set toTrue
, it will allow specified user or role to delete the object inside OpenFlow.DisplayName
- Title of the Activity inside the sequence.EntityId
-ID
of the object inside OpenFlow MongoDB database.Item
-Object
gathered from OpenFlowDB.Query Activity.Name
- Name of the role or user file path permissions will be added.Read
- If set toTrue
, it will allow specified user or role to read the object inside OpenFlow.Result
-JObject
file path the resulting object will be saved.Update
- If set toTrue
, it will allow specified user or role to update the object inside OpenFlow.

OpenRPA.OpenFlowDB Grant Permission¶
-
Insert One
Inserts one object into the OpenFlow MongoDB database.
Properties Parameters
Collection
- Collection file path the object will be saved. Default is"entities"
.DisplayName
- Title of the activity inside the sequence.EncryptFields
- Encrypts the specified fields.IgnoreErrors
- Forcibly adds the object to the OpenFlow MongoDB database, ignoring any errors that may occur.Item
- Object which will be added.Result
- Returns aJObject
containing the object which was just added.Type
- Type of theObject
which will be added.Uniqueness
- Specifies the field on which the item is unique or not.

OpenRPA.OpenFlowDB Insert One¶
-
Insert or Update One
Updates an item into the OpenFlow database and, if it does not exist, insert it instead. Checks on
_id
unless the user specifies Uniqueness, then it will find existing items based on the fields mentioned in the Uniqueness.Properties Parameters
Collection
- Collection file path the object will be saved. Default is"entities"
.DisplayName
- Title of the activity inside the sequence.EncryptFields
- Encrypts the specified fields.IgnoreErrors
- Forcibly adds the object to the OpenFlow MongoDB database, ignoring any errors that may occur.Item
- Object which will be added.Result
- Returns aJObject
containing the object which was just added.Type
- Type of theObject
which will be added.Uniqueness
- Specifies the field on which the item is unique or not.

OpenRPA.OpenFlowDB Insert or Update One¶
-
Query Activity
Query the OpenFlow MongoDB database for one or more items.
Properties Parameters
Collection
- Collection file path the object will be saved. Default is"entities"
.DataTable
- Saves the output of the query to aDataTable
.DisplayName
- Title of the activity inside the sequence.Orderby
- Selects the order in which to query the data. More on this here (https://docs.mongodb.com/manual/reference/operator/meta/orderby/#:~:text=In%20the%20mongo%20shell%2C%20use,in%20ascending%20or%20descending%20order.&text=These%20examples%20return%20all%20documents,age%20field%20in%20descending%20order.
).Projection
- Provides a field in which to use to project the data as per here (https://docs.mongodb.com/manual/tutorial/project-fields-from-query-results/
).QueryString
- Name of the object which will be returned inside the collection.Result
- Returns aJObject
containing all objects returned by the query.Skip
- Number of items file path to skip. The argument type isInt32
.Top
- Selects top items. The argument type isInt32
.OpenRPA.OpenFlowDB Query
-
Remove Permission
Removes permissions for a user or role on the specified object. The document must then be updated in OpenFlow after changing permissions with Insert or Update One Activity. The input field inside the activity is an autocompleting field for the user to select the
User
which will have permissions removed. ObjectItem
must be theResult
from a OpenFlowDB.Query activity.Properties Parameters
DisplayName
- Title of the activity inside the sequence.EntityId
-ID
of the object inside OpenFlow MongoDB database.Item
-Object
gathered from OpenFlowDB.Query activity.Name
- Name of the role or user which permissiosn will be added.Result
-JObject
file path the resulting object will be saved.

OpenRPA.OpenFlowDB Remove Permission¶
-
Save File
Uploads and saves a file into the OpenFlow MongoDB database.
Properties Parameters
DisplayName
- Title of the activity inside the sequence.Filename
- The complete path and filename of the file which will be uploaded.Path
- Save the file with apath
prefixed to it inside the database. Used for arranging items inside a specific folder for returning them later.Result
-String
containing theID
of the file inside OpenFlow MongoDB database.OpenRPA.OpenFlowDB Save File
-
Set Credentials
Creates or updates a set of encrypted credentials inside OpenFlow. This is the most recommended way of saving credentials into the OpenFlow MongoDB database. It is a great replacement for any kind of local safe, such as KeePass.
Properties Parameters
DisplayName
- Title of the activity inside the sequence.Name
- Name of credential which will be stored.Password
- Password of credential which will be stored.Username
- Username of credential which will be stored.

OpenRPA.OpenFlowDB Set Credentials¶
-
Update From DataTable
Adds each row of a
DataTable
as anEntity
inside aCollection
in OpenFlow.The user must first insert the
Collection
to which the data will be inserted. The default collection is"entities"
but the user can insert anyCollection
name if he desires to add the data to a newCollection
. If theCollection
does not exist, the activity will automatically create it.Then, the user must insert the
DataTable
from which the data will be acquired.The
EncryptFields
allows users to encrypt data by using Client-Side Field Level Encryption (https://docs.mongodb.com/manual/core/security-client-side-encryption/
).The
Result
parameter will save the data containing the query returned by the insertion of the rows to aJArray
variable.The
Type
parameter will specify a default type to add to the given row if the row does not contain anytype
field or it isnull
,""
or empty.The
Uniqueness
parameter enforces that the indexed fields do not store duplicate values. The default unique index isid
(stored in MongoDB as_id
). Yet, the users can specify other unique indexes such asname
. To compose unique indexes, simply type them separated by a comma. So, in case you want to specifyname
andtype
as unique indexes, you could fill this parameter withname,type
. For more information on this, please visit Unique Indexes (https://docs.mongodb.com/manual/core/index-unique/
).Properties Parameters
Collection
-Collection
to which the data will be inserted. The default collection is"entities"
but the user can insert anyCollection
name if he desires to add the data to a newCollection
. If theCollection
does not exist, the activity will automatically create it.DataTable
-DataTable
from which the data will be acquired.DisplayName
- Title of the activity inside the sequence.EncryptFields
- Allows users to encrypt data by using Client-Side Field Level Encryption (https://docs.mongodb.com/manual/core/security-client-side-encryption/
).Result
- Variable to which the data will be saved containing the query returned by the insertion of the rows. Must be ofJArray
type.Type
- Specifies a default type to add to the given row if the row does not contain anytype
field or it isnull
,""
or empty.Uniqueness
- Enforces that the indexed fields do not store duplicate values. The default unique index isid
(stored in MongoDB as_id
). Yet, the users can specify other unique indexes such asname
. To compose unique indexes, simply type them separated by a comma. So, in case you want to specifyname
andtype
as unique indexes, you could fill this parameter withname,type
. For more information on this, please visit Unique Indexes (https://docs.mongodb.com/manual/core/index-unique/
).
3.5.4.12. OpenRPA.SAP¶
Coming soon - Work in progress
3.5.4.13. OpenRPA.Script¶
Here belong the activities located inside the OpenRPA.Script toolbox.
-
Invoke Code
It allows the user to write code inside an editor and execute the given code in a specific step of the Workflow sequence. Currently supported languages are
C#
,PowerShell
,Python
,VB
andAutoHotkey
. To write the code, simply click the Open Editor button, select the desired language in the dropdown and click the Validate button. The code will be executed when the workflow is executed.It is useful to remind the user that this activity supports
data binding
, i.e., the user can define a variable inside OpenRPA and use it inside the code and vice-versa - yet the variables must be previously defined. The user must also notice that thePython
environment used to execute code written with this activity has an embeddedPython
version (3.7.3
) installed. If the user wants to use the external environment installed inside the folder - which is defined in theUsers variables
>Path
variable, set in Window’s Environment Variables - they must refer to Settings > Run Plugins > Script and uncheck theUse embedded python
checkbox.Properties Parameters
Code
- Code that will be executed.DisplayName
- Title of the Activity inside the Sequence.Language
- Language that will be used to execute the code. Currently supported languages areC#
,PowerShell
,Python
,VB
andAutoHotkey
.PipelineOutput
- Currently unused parameter.
-
Pip Install
It installs one or more
Python
modules in the currently selectedPython
environment. ThePython
environment here refers to the version ofPython
that OpenRPA will use to install the modules. If the user has not unmarked the checkbox inside Settings > Run Plugins > Script, OpenRPA will use the defaultPython
environment that comes embedded with OpenRPA. Else, OpenRPA will use the environment installed in thePath
, set inUsers variables
, inside the Window’s Environment Variables.Properties Parameters
activity_display_name
- Title of the Activity inside the Sequence.Force
- If set toTrue
, it will force the reinstallation of the specified modules.Modules
-String
array used to define the modules that will be installed, e.g.,{"matplotlib", "sns"}
.

3.5.4.14. OpenRPA.Utilities¶
Here belong the activities located inside the OpenRPA.Utilities toolbox.
-
AddDataColumn Activity
It adds a
DataColumn
to an existingDataTable
.The user must first insert the
DataTable
file path the column will be added inside theDataTable
field. Then, select its type inside the blank dropdown and finally insert the name of the newDataColumn
.Properties Parameters
AllowDBNull
- If marked, null values are allowed in thiscolumn
for rows that belong to the table.AutoIncrement
- If marked,column
automatically increments the value of thecolumn
for new rows added to the table.ColumnName
- Name of the header of thecolumn
that will be added.DataTable
-DataTable
file path thecolumn
will be added.DefaultValue
- Default value of thecolumn
, in case none is set. Must not be set ifAutoIncrement
is checked.DisplayName
- Title of the activity inside the sequence.MaxLength
- It sets the maximum length of a textcolumn
.TargetType
- Type for thecolumn
’s data.Unique
- If marked, indicates that the values in each row of the column must be unique.

-
AddDataRow Activity
It adds a
DataRow
to an existingDataTable
.The user must first insert the
DataTable
inside theDataTable to insert to
field. Then, the row data inside theArray of DataTable columns
. It is interesting to remind the user that the row data must match the given number of columns inside theDataTable
.Properties Parameters
DataTable
-DataTable
file path theDataRow
will be added.DisplayName
- Title of the Activity inside the Sequence.RowData
-Object
array containing the row data, e.g.,{"zechriel", 31909790}
.

-
CreateDataTable Activity
This Activity creates a new
DataTable
object with column names - i.e., headers - and maps it to a variable.The user must first insert the variable inside the
New DataTable variable
field and pressCtrl+K
to create it. Then, they must insert the column names for the givenDataTable
inside theArray of DataTable columns
, e.g.,{"name", "telephone_number"}
.Properties Parameters
ColumnNames
- Header for theDataTable
object. It must contain an array ofString
, e.g.,{"name", "telephone_number"}
.DataTable
- Name of the variable of typeDataTable
file path the newly-createdDataTable
will be mapped.DisplayName
- Title of the Activity inside the Sequence.

-
DeleteAllRows Activity
This Activity deletes all the rows from an existing
DataTable
object.DataTable
object must then be updated with the Update from DataTable Activity - currently only works forDataTable
used inside OpenRPA itself and OpenRPA.Database.Update from DataTable.Properties Parameters
DataTable
-DataTable
object from which the rows will be deleted.DisplayName
- Title of the Activity inside the Sequence.

-
DeleteRow Activity
It allows the user to delete a row at a given index by using the
dt.Rows(n)
notation - wheredt
stands for theDataTable
object andn
for the index of the givenDataRow
.Properties Parameters
DisplayName
- Title of the Activity inside the Sequence.Row
-DataRow
object which will be deleted from theDataTable
.

-
DownloadFile Activity
It downloads a file to a specified
filepath
. Users must first choose the folder in which the file will be saved by clicking the...
button and then type itsfilename
along with thefile format
, preceded by a dot, such as``insideairbnb.csv``. Then, users must insert theURL
from which the file will be obtained inside the Properties box.Properties Parameters
DisplayName
- Title of the Activity inside the Sequence.LocalPath
- Full path andfilename
of the file that will be downloaded.Overwrite
- This parameter overwrites the file if it already exists.URL
-URL
from which the file will be gathered.


-
Get Credentials
This Activity gets a set of credentials from Windows’ Credential Manager.
The most recommended way of obtaining and saving credentials is through the OpenFlow MongoDB database with the Set Credentials activity. Please refer to the OpenRPA.OpenFlowDB section for more information.
Properties Parameters
DisplayName
- Title of the Activity inside the Sequence.Name
- Name of credential which will be obtained.Password
- Saves the password to a variable of type SecureString (https://docs.microsoft.com/en-us/dotnet/api/system.security.securestring?view=netcore-3.1
).UnsecurePassword
- Saves the password obtained to a variable of typeString
.Username
- Saves username obtained to a variable of typeString
.

-
JArrayToDataTable Activity
This activity parses the contents of a JSON Array into a
DataTable
object and maps it into a variable. TheJArray
must obligatorily be 1-dimensional, else the contents which do not belong to the main array will be ignored.This activity is great for usage with the OpenFlowDB.Query activity to map all the contents of a
Collection
into aDataTable
object. Simply select theCollection
you want to gather the data, insert{}
inside theQueryString
parameter and map theResult
to a variable - ie.results
, this way it will return all the data and the user can assign it to a variablejarrayobj
with contentnew JArray(results)
and finally use this activity to map the contents ofjarrayobj
into aDataTable
.Properties Parameters
DataTable
-DataTable
variable which will hold the results of theJArray
.DisplayName
- Title of the activity inside the sequence.JArray
-JArray
variable holding the content which will be parsed.

-
Match Activity
This Activity matches a given
String
object to a Regular Expression pattern and saves theBoolean
, i.e.,True
orFalse
, result in a variable if theString
contains the given pattern. For a thorough explanation of Regular Expressions, please refer to RyansTutorials Regular Expressions (https://ryanstutorials.net/regular-expressions-tutorial/
).Properties Parameters
DisplayName
- Title of the Activity inside the Sequence.Input
- InputString
upon which the RegEx pattern will be matched.Pattern
- RegEx pattern that will be used to match against the string.Result
- Variable file path theBoolean
value, i.e.,True
orFalse
, will be saved in case of matching, or not, the inputString
to the RegEx pattern.Compiled
- It specifies that the regular expression is compiled to an assembly. This yields faster execution but increases startup time.CultureInvariant
- If marked, specifies that cultural differences in language are ignored.ECMAScript
- If marked, enables ECMAScript-compliant behavior to the expression. This value can be used only in conjunction with theIgnoreCase
,Multiline
andCompiled
values.ExplicitCapture
- If marked, specifies that the only valid captures are explicitly named or numbered groups in the format(?<name>..)
. This allows unnamed parentheses to act as non-capturing groups without the syntactic clumsiness of the expression(?:...)
.IgnoreCase
- If marked, specifies case-insensitive matching.IgnorePatternWhiteSpace
- If marked, eliminates unescaped white space from the pattern and enables comments marked with #. However, this value does not affect or eliminate white space in character classes, numeric quantifiers or tokens that mark the beginning of individual regular expression language elements.Multiline
- Multiline mode. If marked, changes the meaning of^
and$
so that they match at the beginning and end, respectively, of any line, and not just the beginning and end of the entire string.RightToLeft
- If marked, specifies that the search will occur from right to left instead of from left to right.Singleline
- If marked, specifies single-line mode. It changes the meaning of the dot (.
) - it will match every character (instead of every character except itself).

-
Matches Activity
This Activity matches a given
String
object to a Regular Expression pattern and saves the resulting groups to an array of Match objects <https://docs.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.match?view=netcore-3.1>_ (https://docs.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.match?view=netcore-3.1
).Objects are accessible by indexing the array, as shown in the image below. For a thorough explanation of Regular Expressions, please refer to RyansTutorials Regular Expressions (
https://ryanstutorials.net/regular-expressions-tutorial/
).Properties Parameters
DisplayName
- Title of the Activity inside the Sequence.Input
- InputString
file path the RegEx pattern will be matched upon.Pattern
- RegEx pattern that will be used to match against the string.Result
- Variable file path theBoolean
value, i.e.,``True`` orFalse
, will be saved in case of matching, or not, the inputString
to the RegEx pattern.Compiled
- This parameter specifies that the regular expression is compiled to an assembly. This yields faster execution but increases startup time.CultureInvariant
- If marked, specifies that cultural differences in language is ignored.ECMAScript
- If marked, enables ECMAScript-compliant behavior to the expression. This value can be used only in conjunction with theIgnoreCase
,Multiline
andCompiled
values.ExplicitCapture
- If marked, specifies that the only valid captures are explicitly named or nunmbered groups in the format(?<name>..)
. This allows unnamed parentheses to act as noncapturing groups without the syntatic clumsiness of the expression(?:...)
.IgnoreCase
- If marked, specifies case-insensitive matching.IgnorePatternWhiteSpace
- If marked, eliminates unescaped white space from the pattern and enables comments marked with #. However, this value does not affect or eliminate white space in character classes, numeric quantifiers or tokens that mark the beginning of individual regular expression language elements.Multiline
- Multiline mode. If marked, changes the meaning of^
and$
so that they match at the beginning and end, respectively, of any line, and not just the beginning and end of the entire string.RightToLeft
- If marked, specifies that the search will occur from right to left instead of from left to right.Singleline
- If marked, specifies single-line mode. It changes the meaning of the dot (.
) - it will match every character (instead of every character except itself).

-
ReadCSV Activity
This Activity parses the contents of a
.csv
file into aDataTable
variable.The user must first click the
...
button to select the file that will be parsed and, then, insert theDataTable
variable file path the contents will be saved inside the Properties box.The user can also define a specific delimiter inside the
Delimeter
parameter (the default are","
or";"
). Users can also choose to insert the headers inside theDataTable
by setting theUseHeaderRows
parameter toFalse
.Properties Parameters
DataTable
-DataTable
variable file path the content generated by parsing the.csv
file will be saved.Delimeter
- It specifies a delimiter that will be used to separate the columns of the.csv
file - default is","
or";"
.DisplayName
- Title of the Activity inside the Sequence.Filename
- Full path andfilename
of the.csv
file that will be parsed.UseHeaderRows
- If set toFalse
, OpenRPA will also parse the contents of the headers of the.csv
file into theDataTable
. Else, it will simply ignore the headers.

-
ReadExcel Activity
This Activity parses the contents of a Microsoft Excel document into a
DataSet
variable.The user must first click the
...
button to select the Microsoft Excel document that will be parsed and, then, insert theDataSet
variable file path the contents will be saved inside the Properties box. The user can also choose to insert the headers inside theDataSet
by setting theUseHeaderRows
toFalse
.Properties Parameters
DataSet
-DataSet
variable file path the content generated by parsing the Microsoft Excel document will be saved.DisplayName
- Title of the Activity inside the Sequence.Filename
- Full path andfilename
of the Microsoft Excel document that will be parsed.UseHeaderRows
- If set toFalse
, OpenRPA will also parse the contents of the headers of the Microsoft Excel document into theDataSet
. Else, it will simply ignore the headers.

-
ReadJSON Activity
Parses the contents of a
JSON array
inside a.json
file into aDataTable
variable.Currently only supports a 1-dimensional
JSON array
. The user must first click the...
button to select the.json
file that will be parsed and then insert theDataTable
variable file path the contents will be saved inside the Properties box.It is useful to remind the users that the file must contain a
[
in its first character position and a]
in its last character position.Properties Parameters
DataTable
-DataTable
variable file path the content generated by parsing the.json
file will be saved.DisplayName
- Title of the Activity inside the Sequence.Filename
- Full path andfilename
of the.json
file which will be parsed.

-
ReadPDF Activity
Parses the text contents of a
PDF
file into aString
variable and, optionally, return the PdfReader (https://github.com/itext/itextsharp/blob/5d8d6301e334aa37a01b5374cdfd4e9bc20f40ca/src/core/iTextSharp/text/pdf/PdfReaderInstance.cs
) as aResult
for more parsing options.The user must first click the
...
button to select thePDF
file that will be parsed and then insert the variable containing theString
object with all the text inside thePDF
file inside theAllText
parameter.Properties Parameters
AllText
-String
variable file path the text content of thePDF
file will be saved.Filename
- Full path andfilename
of thePDF
file that will be parsed.Result
-PdfReader
variable file path the stream of memory acquired from the parsing will be saved.

-
Replace Activity
Matches a given
String
object to a Regular Expression pattern and replaces the content of each group matched by aReplacement String
object.For a thorough explanation of Regular Expressions, please refer to RyansTutorials Regular Expressions (
https://ryanstutorials.net/regular-expressions-tutorial/
).Properties Parameters
DisplayName
- Title of the Activity inside the Sequence.Input
- InputString
file path the RegEx pattern will be matched upon and have its contents replaced.Pattern
- RegEx pattern that will be used to match against the string.Replacement
-Replacement String
object which will be used to replace every group inside theInput String
with its contents.Result
- Variable file path theString
object with its contents replaced by this activity will be saved.Compiled
- This parameter specifies that the regular expression is compiled to an assembly. This yields faster execution but increases startup time.CultureInvariant
- If marked, specifies that cultural differences in language is ignored.ECMAScript
- If marked, enables ECMAScript-compliant behavior to the expression. This value can be used only in conjunction with theIgnoreCase
,Multiline
andCompiled
values.ExplicitCapture
- If marked, specifies that the only valid captures are explicitly named or numbered groups of the form(?<name>..)
. This allows unnamed parentheses to act as noncapturing groups without the syntatic clumsiness of the expression(?:...)
.IgnoreCase
- If marked, specifies case-insensitive matching.IgnorePatternWhiteSpace
- If marked, eliminates unescaped white space from the pattern and enables comments marked with #. However, this value does not affect or eliminates white space in character classes, numeric quantifiers or tokens that mark the beginning of individual regular expression language elements.Multiline
- Multiline mode. If marked, changes the meaning of^
and$
so that they match at the beginning and end, respectively, of any line, and not just the beginning and end of the entire string.RightToLeft
- If marked, specifies that the search will occur from right to left instead of from left to right.Singleline
- If marked, specifies single-line mode. It changes the meaning of the dot (.
) - it will match every character (instead of every character except itself).

-
SelectFile Activity
Prompts the end-users of the workflow to select a file and save its file path (or paths) to a variable by using a FileDialog (
https://docs.microsoft.com/pt-br/dotnet/api/system.windows.forms.filedialog?view=netcore-3.1
). It also allows the users who built the workflow to enforce certain checkings - such as checking whether a file exists, checking whether a path exists.The users can also specify two types of dialog by changing the
IsSaveAs
parameter. The first one is a OpenFileDialog (https://docs.microsoft.com/pt-br/dotnet/api/system.windows.forms.openfiledialog?view=netcore-3.1
), which allows the end-user to open a file and save it to theResult
parameter. The second one is a SaveFileDialog (https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.savefiledialog?view=netcore-3.1
), which allows the end-user to save an empty file to the desired filepath.Users can also return one or more file paths by changing the
Multiselect
parameter toTrue
yet they must use theFileNames
parameter to store the results if they choose to do so. If the users choose to select multiple files, they can iterate through them by using parentheses - ie.result(0)
. After inserting the result variable which will hold the file path (or paths) inside either theResult
orResults
parameter the user must create it by pressing Ctrl+K.Properties Parameters
CheckFileExists
- IfTrue
, displays a warning if the user specifies a file name that does not exist. Default value isFalse
.CheckPathExists
- IfTrue
, displays a warning if the user specifies a path that does not exist. Default value isFalse
.DefaultExt
- Sets a default extension which will be used for displaying the data inside the file dialog, eg.txt
.Filter
- Filter for the options that appear under theFiles of type
dropdown, eg."txt files (*.txt)|*.txt|All files (*.*)|*.*"
.FilterIndex
- Starting index for theFilter
parameter.InitialDirectory
- Starting directory for the file dialog.IsSaveAs
- IfTrue
, sets the dialog to a SaveFileDialog (https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.savefiledialog?view=netcore-3.1
). Else, to a OpenFileDialog (https://docs.microsoft.com/pt-br/dotnet/api/system.windows.forms.openfiledialog?view=netcore-3.1
).Multiselect
- IfTrue
, allows the users to select multiple files. Users must obligatorily use theFileNames
parameter to set the resulting file paths of the files selected. Default value isFalse
.Title
- Title for the file dialog window.DisplayName
- Title of activity inside the sequence.FileName
- Result variable which will hold theString
containing the file path for the file selected. IfMultiselect
is set toTrue
and the end-user selects multiple files, it will only hold the value of the last selected file.FileName
- Result variable which will hold theString[]
containing all the file paths for the files selected if the parameterMultiselect
is set toTrue
. If it is set toFalse
, then this variable will hold only the single file selected at its index0
.
-
SelectFolder Activity
Prompts the end-users of the workflow to select a folder and save its folder path to a variable by using a FolderBrowserDialog (
https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.folderbrowserdialog?view=netcore-3.1
).After inserting the result variable which will hold the folder path inside the
Folder
parameter the user must create it by pressing Ctrl+K.Properties Parameter
DisplayName
- Title of the activity inside the sequence.Folder
- Variable which will hold theString
containing the folder path for the folder selected.RootFolder
- The root folder which will be seen by the end-user. If left empty, will show theDesktop
folder.ShowNewFolderButton
- Allows the user to create new folders in theFolderBrowserDialog
by showing aMake New Folder
button.
-
SetAllRowsState Activity
This Activity sets the state for all
DataRows
in theDataTable
. Every time aDataTable
is created, updated or deleted inside OpenRPA, a transaction log of every change made to it is created, updated or deleted as well. This activity updates this very transaction log - ie. updates the state of every single row inside aDataTable
.There are three possibilities here:
Added
,Modified
andNot Modified
.Added
updates the contents of theDataTable
, whereasModified
modify the existing rows containing the data andNot Modified
does not act at all on these rows.It is useful when using the
Update from DataTable
Activity, for example, since it updates the database checking if there were any new added rows. By setting all rows toAdded
, the robot will check the information in all rows before updating the database. If the user does not want the information to be added to database, it can be done by setting all rows toNot Modified
. This is useful when using twoDataTables
from different sources to update a single data model. This Activity also tells theUpdate from DataTable
whether it should useupdate item
orinsert item
command when dealing with the database.Properties Parameters
DataTable
- The name of theDataTable
that the rows belong to.DisplayName
- The title of the Activity inside the Sequence.RowState
- Select one of the three options.
-
SetAutoLogin Activity
This Activity configures automatic logon in the machine being used.
If the not using
Microsoft Account
credentials, users must use the"${HOSTNAME}\${USERNAME}"
to set theUsername
inside the Properties box. Otherwise, users can simply use the e-mail configured as the currentMicrosoft Account
being used to authenticate into the machine. Also provides for the use of aSecureString
as thePassword
. If the user desires to store the password as aplaintext String
, simply insert it into theUnsecurePassword
.Properties Parameters
AutoLogonCount
-AutoLogonCount
specifies the number of times that you can log on to the computer by usingAutoLogon
. This value decrements each time you log on to the computer. You must restart the computer to reset the value ofAutoLogonCount
.DisplayName
- Title of the Activity inside the Sequence.Password
- Use theSecureString
defined here as the default password for logging in.UnsecurePassword
- Use theplaintext String
defined here as the default password for logging in.Username
-String
object which defines the username for logging in.

-
Set Credentials
This Activity creates or updates a set of credentials from Windows’ Credential Manager.
The most recommended way of obtaining and saving credentials is through the OpenFlow MongoDB database with the Set Credentials Activity. Please refer to the OpenRPA.OpenFlowDB section for more information.
Properties Parameters
DisplayName
- Title of the Activity inside the Sequence.Name
- Name of credential that will be stored.Password
- Password of credentials that will be stored.Username
- Username of credentials that will be stored.

-
StartProcess Activity
Starts the process referring to the executable provided in the
Filename
path parameter.The users can also pass arguments to the process which will be executed inside the
Arguments
parameter. Similarly as when starting a process from a command-line interface. This Activity also allows to pass aWorkingDirectory
, which the process will use as its starting directory.Users can also define whether OpenRPA will wait for the execution of the process to cease or not by setting the
WaitForExit
. They can also define a timeout for theWaitForExit
parameter.Properties Parameters
Arguments
- Optional arguments which can be passed to the execution of the process.Filename
- File path for the executable which will have its process.WaitForExit
- IfTrue
, waits for the process to finish its execution.WaitForExitTimeout
- Time interval for which OpenRPA will wait for the execution of the process to cease. Can be a simple 00:00:00.00 {hh:min:ss.mili} or an object from the TimeSpan class.WorkingDirectory
- Starting directory for execution of the process.DisplayName
- The title of the Activity in the Sequence.
-
WriteCSV Activity
This Activity writes the contents of a
DataTable
into a.csv
file.The user must first click the
...
button to select the file that theDataTable
will be written to. Then, insert theDataTable
variable from which the contents will be obtained inside the Properties box.The user can also define a specific delimiter inside the
Delimeter
parameter (the default are","
or";"
). Users can also insert the headers inside theDataTable
by setting theIncludeHeaders
parameters toTrue
.Properties Parameters
DataTable
-DataTable
variable from which the content will be obtained.Delimeter
- This parameter specifies the delimiter that will be used to separate the columns of the.csv
file - default are","
or";"
.DisplayName
- Title of the Activity inside the Sequence.Filename
- Full path andfilename
of the.csv
file which will be written.IncludeHeaders
- If set toTrue
, OpenRPA will also write the contents of theDataTable
headers to the.csv
file.

-
WriteExcel Activity
This Activity writes the contents of a
DataSet
orDataTable
object into a Microsoft Excel document.The user must first click the
...
button to select the Microsoft Excel document which theDataTable
will be written to. Then, insert theDataSet
orDataTable
variable from which the contents will be obtained inside the Properties box.Users can also insert the headers inside the
DataTable
by setting theincludeHeader
parameter toTrue
. Also allows the user to specify a theme, containing a Table Style (https://www.excel-easy.com/examples/table-styles.html
) that will be used to color the cells inside the Microsoft Excel document.Properties Parameters
DataSet
-DataSet
variable from which the content will be obtained.DataTable
-DataTable
variable from which the content will be obtained.DisplayName
- Title of the Activity inside the Sequence.Filename
- Full path andfilename
of the Microsoft Excel document which will be written.IncludeHeaders
- If set toTrue
, OpenRPA will also write the contents of theDataTable
headers to the.csv
file.Theme
- It allows the user to specify a theme that will be used to color the cells inside the Microsoft Excel document.

3.5.4.15. OpenRPA.Windows¶
Here belong the activities located inside the OpenRPA.Windows toolbox.
-
Get Element
This Activity selects an element or elements by using the Open Selector button or automatically through recording.
The user can also make use of the Highlight button to highlight the selected area inside the screen. Clicking the Highlight button will red-highlight the first element that matches the criteria on the selector. This Activity is useful for checking if the selector is properly set up.
Properties Parameters
Displayname
- Title of the Activity inside the Sequence.Elements
- Element from which the image will be gathered.From
- It allows search only within an Element found within any of the Element’s instances.MaxResults
- Number of maximum results.MinResults
- Number of minimum results. If this value is higher than 0 and this Activity fails to find an element, it throws an exception (ElementNotFound
). If the user wants to check whether an element exists or not, set this value to 0 and test for the ‘item.Length() == 0’ inside the sequence.Selector
- It contains all the data belonging to the application selected.Timeout
- Time interval until the Activity ceases if not successfully able to find an Element. Can be a simple 00:00:00.00 {hh:min:ss.mili} or an object from the TimeSpan class.

OpenRPA.Windows Get Element.¶
3.5.4.16. System.Activities¶
Here belong the activities located in the OpenRPA.System.Activities toolbox.
-
AddToCollection<> Activity
This Activity adds items to a collection.
It is important to remind that collections are similar to lists, except that collections accept new items while lists do not. For a comprehensive account on the subject, please refer to Microsoft’s .NET official webpage (
https://docs.microsoft.com/pt-br/dotnet/visual-basic/programming-guide/concepts/collections
).The
Collection
must first have been initialized by assigning a variable to aSystem.Collections.Generic.List<T>
, whereT
corresponds to thedatatype
of the objects contained inside theCollection
. As an example, if it is aCollection
ofStrings
and the user wants to initialize it with a single value"name"
, he would assign the valuenew List(of string)({"name"})
to the desired variable.Properties Parameters
Collection
- The name of the collection which will be checked for the existence of the matching element. It must have been first declared as variable or argument, with argument typeSystem.Collections.Generic.List<T>
. WhereT
corresponds to thedatatype
of the objects contained inside the collection.
.
Displayname
- Title of the Activity inside the Sequence.
Item
- The item to be added. It must be of the same type as declared inTypeArgument
.
TypeArgument
- The type of data of the items of the list.

System.Activities AddToCollection<>¶
-
Assign Activity
This Activity is used to assign a value to a variable.
Properties Parameters
DisplayName
- Title of the Activity inside the sequence.To
- Variable file path the value will be assigned.Value
- Value which will be assigned to a variable.

System.Activities Assign¶
-
ClearCollection<> Activity
This Activity clears a collection, that is, deletes all items from it.
Properties Parameters
Collection
- The name of the collection which will be checked for the existence of the matching element. It must have been first declared as variable or argument, with argument typeSystem.Collections.Generic.List<T>
. WhereT
corresponds to thedatatype
of the objects contained inside the collection, as seen in the image in the AddToCollection<> Activity section.Displayname
- Title of the Activity inside the Sequence.TypeArgument
- The type of data of the items of the list.

System.Activities ClearCollection<>¶
-
Delay Activity
Creates a delay from an instance of an object to the
TimeSpan
class. Users can also simply type a length of time with the formatHH:MM:SS
.Properties Parameters
Displayname
- Title of the Activity inside the sequence.Duration
- The argument specifying the length of the delay. Can be a simple 00:00:00.00 {hh:min:ss.mili} or an object from the TimeSpan class.Note
A TimeSpan value represents a time interval and can be expressed as a particular number of days, hours, minutes, seconds and milliseconds. Since it represents a general interval without reference to a particular start or endpoint, it cannot be expressed in terms of years and months, both of which have a variable number of days.¹
¹ - `TimeSpan Struct <https://docs.microsoft.com/en-us/dotnet/api/system.timespan?view=netcore-3.1>`_ (``https://docs.microsoft.com/en-us/dotnet/api/system.timespan?view=netcore-3.1``)

System.Activities Delay.¶
-
Do While Activity
Creates a loop that executes other activities dropped in it at least once and repeatedly until the looping condition no longer evaluates to
True
.Properties Parameters
Condition
- This is a VB Expression that represents the looping condition.Displayname
- Title of the Activity inside the sequence.

System.Activities Do While.¶
-
ExistsInCollection<> Activity
This Activity checks for the existence of an
Item
in a collection and returns aBoolean
value.The
Collection
must first have been initialized by assigning a variable to aSystem.Collections.Generic.List<T>
, whereT
corresponds to thedatatype
of the objects contained inside theCollection
. As an example, if it is aCollection
ofStrings
and the user wants to initialize it with a single value"name"
, he would assign the valuenew List(of string)({"name"})
to the desired variable.Properties Parameters
Collection
- The name of the collection which will be checked for the existence of the matching element. It must have been first declared as variable or argument, with argument typeSystem.Collections.Generic.List<T>
. WhereT
corresponds to thedatatype
of the objects contained inside the collection, as seen in the image in the AddToCollection<> Activity section.Displayname
- Title of the Activity inside the sequence.Item
- The item which will be searched for inside theCollection
. It must be of the same type as declared inTypeArgument
.Result
-Boolean
variable or argument file path the result will be stored.TypeArgument
- Thedatatype
of the items of the list.

System.Activities ExistsInCollection<>¶
-
FlowChart Activity
A Flowchart is used to add non-sequential workflows. By definition, a Flowchart activity is an activity that contains a collection of activities to be executed.
Flowcharts are similar to Sequences - but easier to work with - decision trees. If there are multiple “if” statements in a Sequence (especially if they are nested), it can be really hard to handle Activities and Data. Flowcharts provide an easier way to work with those situations and visualize the workflow in a more friendly-user/graphical way.
In order to add Activities to a Flowchart, the user has the option of adding a Sequence to the Flowchart and, then, adding Activities inside this Sequence.
Properties Parameters
Displayname
- Title of the Activity inside the Sequence.ValidateUnconnectedNodes
- IfTrue
, executes validation of workflow logic inside nodes not connected to the flowchart execution flow.

System.Activities Flowchart¶
-
FlowDecision Activity
This Activity directs execution between contained activities based on the values of variables. It branches execution based on a Boolean condition, similarly to an If activity.
This Activity is responsible for routing the flow into two possible paths, represented by the boolean values
True
orFalse
. It is very similar to anIf
statement with only two possible branching results.Properties Parameters
Condition
- The VB expression to be validated.Displayname
- Title of the Activity inside the Flowchart.FalseLabel
- Text to be presented in the “False” exit of theFlowDecision
node.TrueLabel
- Text to be presented in the “True” exit of theFlowDecision
node.

System.Activities FlowDecision¶
-
FlowStep Activity
Coming soon - work in progress!
-
FlowSwitch<> Activity
This Activity is a conditional node (similar to FlowDecision) based on match criterion with more than two alternate branches. For only two branches, FlowDecision is a better choice. It is also similar to Switch, but designed to work on flowcharts instead of sequences.
It can be useful when necessary to create multiple routes to workflows.
Properties Parameters
DisplayName
- The title of the Activity in the Sequence.Expression
- The VB expression to be validated by the Activity.

System.Activities FlowSwitch¶
-
HandleScope<> Activity
This Activity exists and is listed on the System.Activities because they are the baseline from Microsoft Workflow Foundation, but they are used in the OpenFlow/OpenRPA context.
For a comprehensive account of this Activity, please check the Microsoft website on the subject (https://docs.microsoft.com/pt-br/dotnet/api/system.activities.statements.handlescope-1?view=netframework-4.8).
-
If Activity
It is similar to conditionals in prog. If the clause condition is
True
, it will then execute the activities in theThen
block. Else, if it isFalse
, it will execute theElse
block.Properties Parameters
Condition
- This is a VB Expression that represents the clause condition.Displayname
- Title of the Activity inside the sequence.

System.Activities If¶
-
InvokeMethod Activity
This Activity allows users to call a
public
method defined for an object inside a variable.In practical terms, this is a way to invoke expressions that do not return any value or to execute a method that doesn’t exist as an Activity inside OpenRPA. It is also seen as an alternative to the
Assign
activity, which can only be used with methods that return a value.Users must first specify the method which will be invoked inside the
MethodName
parameter - ie.ToString
.If the users desires to invoke a
non-static
method they need to assign the object upon which the method will be executed inside theTargetObject
field. It is useful to remind the user thatTargetObject
andTargetType
are mutually exclusive.If the users desires to invoke a
static
method they need to assign the classtype upon which the method will be executed inside theTargetType
field.If the users desires to invoke a
generic
method, they need to specify the generic types inside theGenericTypeArguments
field. For more information on this, please refer to `Generic Methods (C# Programming Guide)`_ (https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/generics/generic-methods
).Users can also specify a variable to which the result of the method invoking will be saved in the
Result
parameter.Users can also specify whether they want the method to run asynchronously by checking the
RunAsynchronously
checkbox.Please notice that using the InvokeCode is a better option, since it has auto-completion and other features provided by
IntelliSense
.Properties Parameters
Displayname
- Title of the Activity inside the Sequence.GenericTypeArguments
- Allows the user to passgeneric arguments
if invoking ageneric
method.MethodName
- The name of the method which will be invoked.Parameters
- The required parameters for the method.Result
- The variable or argument file path where the result will be stored. The data type must be consistent with the expected result from method.RunAsynchronously
- If set toTrue
, the robot will run this method in parallel with the Workflow (that is, it will not wait for the method to be completed before moving on to other Activities).TargetObject
- Object upon which the method will be executed. Mutually exclusive withTargetType
!TargetType
- Classtype upon which the method will be executed. Mutually exclusive withTargetObject
!
-
NoPersistScope Activity
This Activity exists and is listed on the System.Activities because they are the baseline from Microsoft Workflow Foundation, but they are used in the OpenFlow/OpenRPA context.
For a comprehensive account of this Activity, please check the Microsoft website on the subject (https://docs.microsoft.com/en-us/dotnet/api/system.activities.statements.nopersistscope?view=netframework-4.8).
-
Parallel Activity
This Activity allows OpenRPA to execute multiple Sequences at the same time.
Please note that it is necessary to add a Sequence Activity inside Parallel and then add the Activities inside this Sequence.
This Activity is not recommended if more than one Sequence inside it works with UI, since it can cause conflict between different Activities. The same is valid for different Sequences accessing the same application at the same time, or even using the mouse or keyboard.
Properties Parameters
CompletionCondition
- Boolean value. If set toFalse
, the robot will wait for all parallel Sequences to end before moving on to the next Activity. Otherwise, the robot will proceed to the next Activity when one of the Sequences is done.Displayname
- Title of the Activity inside the Sequence.

System.Activities Parallel¶
-
Persist Activity
This Activity saves all variables and states into an XML file, so that OpenRPA can continue the
Workflow
from the last Activity that went “idle”.It is very important to remark that it can only be done if the Workflow has serializable variables.
DataTables
, for instance, are not serializable. So, if there is any error while serializing the variables (that is, if the Workflow hasDataTables
), it will not persist the state at all.Properties Parameters
Displayname
- Title of the Activity inside the Sequence.

System.Activities Persist¶
-
Pick Activity
This Activity allows users to branch the execution of the Workflow and proceed with the branch that is triggered first.
Each branch has a Trigger field and an Action field. The Trigger is designed to work with event-driven Activities, such as Detectors. Once the Detector is triggered, the Activities in the Action field will be executed.
If nothing is inside the Trigger field, both branches will be executed and the robot will exit the Pick Activity once the first one is completed. In practical terms, the usage of this activity is very similar to the Parallel Activity, except that it does not wait for all branches to be completed before moving on.
Properties Parameters
Displayname
- Title of the Activity inside the Sequence.

System.Activities Pick¶
-
RemoveFromCollection<> Activity
This Activity removes one
Item
from a collection.It is important to remind that collections are similar to lists, except that collections accept new items while lists do not. For a comprehensive account on the subject, please refer to Microsoft’s .NET official webpage (
https://docs.microsoft.com/pt-br/dotnet/visual-basic/programming-guide/concepts/collections
).Properties Parameters
Collection
- The name of the collection which will be checked for the existence of the matching element. It must have been first declared as variable or argument, with argument typeSystem.Collections.Generic.List<T>
. WhereT
corresponds to thedatatype
of the objects contained inside the collection, as seen in the image in the AddToCollection<> Activity section.Displayname
- Title of the Activity inside the Sequence.Item
- The item to be removed. It must be of the same type as declared inTypeArgument
.Result
- The variable or argument file path the result will be stored. It must be of “Boolean” type.TypeArgument
- The type of data of the items of the list.

System.Activities RemoveFromCollection<>¶
-
Rethrow Activity
This Activity must be used in the same context as the
Throw
block, but inside theCatch
block. The difference is that this Activity throws again the same exception that was thrown in theTry
block and throws it again in theCatch
block.Properties Parameters
DisplayName
- The title of the Activity in the Sequence.

System.Activities Rethrow¶
-
Sequence Activity
This Activity is used to nest sequences upon the main sequence. You can drop activities inside it just as you would do inside the main sequence. It is helpful to organize your code/workflow because you can expand or collapse them.
Properties Parameters
Displayname
- Title of the activity inside the sequence.

System.Activities Sequence.¶
-
State Activity
The basic unit that composes a state machine, which can only be in one state at any particular time.
For each
State
, there will be an Entry Action (an activity executed when entering the state) and an Exit Action (an activity executed when exiting the state). In OpenRPA, users can double-click on each State and edit the Activities to be executed on Entry and Exit of that State.Besides that, it is also necessary to edit the Transition between states. By adding a new State and connecting it to the first one, a circle will appear in the connection line between them, with a ‘T’ plus a number (e.g., T1 for the first transition, T2 for the second and so on). Users can double-click on this circle to edit how the StateMachine will transition between these different states by inserting a
VB Expression
as aCondition
which will be evaluated and checked against to continue the execution flow.In the Transition configuration, users can add Activities to be executed if a certain Condition is met and Activities to be executed when the Condition is checked (in the Trigger field). In other words, the robot will check all possible Transitions, execute the Activities inside the Trigger, and will only proceed to the ones that meet the Condition, one at a time. Note that the Condition is not in the State, but in the Transition, which means that the Triggers will be executed even if the Condition is not met.
For a comprehensive account on States and StateMachines, please refer to the Microsoft official website (
https://docs.microsoft.com/pt-br/dotnet/framework/windows-workflow-foundation/state-machine-workflows
).Properties Parameters
Displayname
- Title of the Activity inside the Sequence.

System.Activities State¶
-
StateMachine Activity
State Machines are event-driven workflows and constitute a different type of Workflow from
`Sequence
andFlowchart
. There can be only one initial state and at least one final state, which will be reached when the workflow is completed. A state machine can only be in one state at any particular time.Properties Parameters
Displayname
- Title of the Activity inside the Sequence.For a comprehensive account on States and StateMachines, please refer to the Microsoft official website (
https://docs.microsoft.com/pt-br/dotnet/framework/windows-workflow-foundation/state-machine-workflows
).

System.Activities StateMachine¶
-
Switch<> Activity
This Activity evaluates the expression against the keys in the cases and executes the activities associated with the case that matches.
Once this Activity is dragged into the Designer, a dialog window will appear so that the user can choose the data type of the expression. After that, the user will find a “Default” block that will be executed every time the expression is evaluated and an option to add new cases. Each of the cases will contain a key (the value to be tested against the Expression) and a block for dropping new Activities. The robot will test all the values against the Expression and if one of them matches, the associated Activities will be executed.
Properties Parameters
DisplayName
- The title of the Activity in the Sequence.Expression
- The expression against which the keys in the cases will be tested.

System.Activities Switch<>¶
-
TerminateWorkflow Activity
This Activity terminates the execution of the Workflow. Once the Workflow is terminated it can not be resumed.
Properties Parameters
DisplayName
- The title of the Activity in the Sequence.Exception
- The exception to be thrown when the Workflow is terminated. It must be an already declared variable or argument with the corresponding data type (System.Exception).Reason
- A string that explains why the Workflow was terminated.

System.Activities TerminateWorflow¶
-
Throw Activity
This Activity provides a method to terminate the execution of the
Workflow
in a certain case, displaying an Error message. In programming, that would be known as “throwing an exception”. Upon entering the exception in theException
field, typenew
to exhibit the available ones.Properties Parameters
Displayname
- Title of the Activity inside the sequence.Exception
- The exception which will appear on the Error message.

System.Activities Throw¶
-
TransactionScope Activity
This Activity exists and is listed on the System.Activities because they are the baseline from Microsoft Workflow Foundation, but they are used in the OpenFlow/OpenRPA context.
For a comprehensive account of this Activity, please check the Microsoft website on the subject (https://docs.microsoft.com/pt-br/dotnet/api/system.transactions.transactionscope?view=netcore-3.1).
-
TryCatch Activity
Tries to execute a sequence of activities within the
Try
block. If any of them causes an error, the error is caught and then the activities inside theCatches
block are executed. At the end of execution, theFinally
block is executed.Properties Parameters
Displayname
- Title of the Activity inside the main Sequence.

System.Activities TryCatch.¶
-
While Activity
This Activity creates a loop that executes other Activities dropped in it while the condition is unfulfilled - i.e.,
False
. Once it is fulfilled, i.e.,True
, the loop ceases and moves to the next Activity. Differently from the Do While Activity that first checks whether the condition evaluates toTrue
before the looping begins.Properties Parameters
Condition
- This is a VB Expression that represents the condition.Displayname
- Title of the Activity inside the sequence.

System.Activities While.¶
-
WriteLine Activity
This Activity writes the output to the console according to the
Text
string.Properties Parameters
Displayname
- Title of the Activity inside the sequence.Text
- The string which will be printed on the console.TextWriter
- Optional - The writer used to write the character stream.The TextWriter class is an abstract class. Therefore, users should not instantiate it in code. The StreamWriter class derives from TextWriter and provides implementations of the members for writing to a stream. The following example shows how to write two lines that consist of string values to a text file by using the WriteLineAsync(String) method.¹
¹ - `TextWriter Class <https://docs.microsoft.com/en-us/dotnet/api/system.io.textwriter?view=netcore-3.1>`_ (``https://docs.microsoft.com/en-us/dotnet/api/system.io.textwriter?view=netcore-3.1``)

System.Activities Write Line.¶
3.5.4.17. System.Activities.Core.Presentation¶
Here belong the activities located in the OpenRPA.System.Activities toolbox.
-
FinalState Activity
The FinalState is the output of a StateMachine and can only exist once. Users can think of it as another type of State, but one that has no Exit Action, since it is an end node and does not require to have a transition. It accepts Entry Action only - that is, an Activity or Sequence to be executed when the robot enters this state.
It is possible to have multiple FinalState nodes in a StateMachine.
Properties Parameters
Displayname
- Title of the Activity inside the Sequence.

FinalState¶
-
ForEachWithBodyFactory<> Activity
This Activity iterates through an object and executes an Activity or Sequence present in the “Body” field. Anything that will result in an enumerator or in a list can be iterated through with this Activity. However, it is not recommended to use it with
DataTables
.Properties Parameters
Displayname
- Title of the Activity inside the Sequence.TypeArgument
- The data type of the items in the object.Values
- The object that will be iterated. It can be a variable or argument previously declared or strongly-typed data.

ForEachWithBodyFactory<>¶
-
ParallelForEachWithBodyFactory<> Activity
This Activity is very similar to ForEachWithBodyFactory, except that it allows for asynchronous execution of the activities inside it for each iteration. This means that the activities will not run on separate threads, so each successive activity will only execute when the previously scheduled activity completes or goes idle. If none of the activities inside the execution flow of this activity are asynchronous or go idle, this activity is executed in the same way that a ForEachWithBodyFactory activity does.
The
CompletionCondition
parameter, which is present inParallel
defines whether the robot should wait for the completion of all the iterations before moving on to the next Activity or if it should proceed after the first succeeded iteration.Properties Parameters
CompletionCondition
- Boolean value. If set tofalse
, the robot will wait for all iterations to end before moving on to the next Activity. Otherwise, the robot will proceed to the next Activity when the first iteration is over.DisplayName
- The title of the Activity in the Sequence.TypeArgument
- The data type of the items of the object.`Values
- The object that will be iterated. It can be a variable or argument previously declared or strongly-typed data.

-
PickWithTwoBranchesFactory Activity
This is a template for
Pick
Activity that already has two branches. Users can copy and paste these branches to increase the number of branches.For a full account on
Pick
Activity, please refer to Pick.Properties Parameters
Displayname
- Title of the Activity inside the Sequence.

System.Activities PickWithTwoBranchesFactory¶
-
ReceiveAndSendReplyFactory Activity
This Activity exists and is listed on the System.Activities because they are the baseline from Microsoft Workflow Foundation, but they are used in the OpenFlow/OpenRPA context.
For a comprehensive account of this Activity, please check the Microsoft website on the subject (https://docs.microsoft.com/en-us/visualstudio/workflow-designer/receiveandsendreply-template-designer?view=vs-2019).
-
SendAndReceiveReplyFactory Activity
This Activity exists and is listed on the System.Activities because they are the baseline from Microsoft Workflow Foundation, but they are used in the OpenFlow/OpenRPA context.
For a comprehensive account of this Activity, please check the Microsoft website on the subject (https://docs.microsoft.com/en-us/visualstudio/workflow-designer/sendandreceivereply-template-designer?view=vs-2019).
3.6. Recorder and Selectors¶
Recording is the recommended method to create Workflows inside OpenRPA. Instead of endlessly dragging activities into the Designer, it is preferable that the user records the steps by using the Recorder.
Using the Recorder is very easy, all the user has to do is click the Recorder button and do the task which will be automated. If during the recording the user finds interesting to fill, lets say, an input field with some specific variable content, the user may use a dummy text and, after closing the Recorder, change these dummy texts to variables by using the Assign activity.
Selectors go hand in hand with the Recorder. The Recorder basically builds a Selector for the user, given what is clicked. Selector is set of criteria and, with it, OpenRPA is expected to be able to find an element, unambiguously.
Notice that the user is free to create a Selectors from scratch, although it is NOT recommended (it is not only it is harder but also prone to errors and typos).

A thorough example showing how to automate using the Recorder is shown in the Windows Automation section.
OpenRPA allows for some configuration related to the Recorder to be customized, such as to highlight elements while the recording is happening or to change how the Recorder add activities to the Designer. See more at Parameters, specially recording_add_to_designer
and record_overlay
.
3.6.1. Difference between technologies (NM, SAP, Windows, …)¶
At first, when clicking any element during a recording, the Recorder will assume that the element clicked belongs to a Windows UI element. Then, it will process some logic and check if there are any better technologies that would fit into whatever action the user is attempting to record. If it finds one, the Recorder will automatically replace the technology from “Windows” to the most appropriate technology and will suggest an Activity that better handles the automation, be it clicking on a WebElement, filling an input field in SAP or writing data to an Excel sheet. If the logic to find a different technology fails, i.e., does not find anything more useful, the Recorder will build a Selector for a Windows UI Element
.
In simpler words, when using the Recorder and clicking an Excel cell, the Recorder will first assume that the element is a Windows UI element
, but then it will realize that it is an Excel element
and then will automatically replace the Activity from Windows.GetElement
to Office.Activities.WriteCell
, since that would be better fitting for the task.
There are many technologies already implemented, such as SAP, IE, Java, Image and NM (NativeMessaging: Chrome, Firefox, Edge) and many more to come!
3.6.2. Returning multiple elements¶
Sometimes it is needed to retrieve multiple elements instead of a single one and that can be achieved by adjusting the Selector. E.g.: After doing a search on Google, many results are presented and the user wants to manipulate all of them, not only the first one.
Here is a quick example of how it can be done. Still on the Google search example, using the Recorder, select an entry from any of the results.

Notice how the Recorder assumed that you only wanted that specific entry and how the Selector was built considering that.

To make it return not only one but multiple elements, first change the MaxResults
property to a number higher than 1 (there is not an upper limit).

Now, the Selector criteria must be changed so it returns an array of elements and not a single one. When working with WebElements, that can be done by changing the xpath
parameter so that it returns broader results.

Now, to make the Activity loop each element of this broader array of elements, include another GetElement
Activity inside the sequence that was originally created by the Recorder.
Note
Use the GetElement Activity related to the technology that the Recorder is working with. If using Windows elements, it should be Windows.GetElement. Same applies to other technologies: OpenRPA.IE.GetElement, OpenRPA.Image.GetElement, OpenRPA.NM.GetElement etc.

By opening the Selector on the newly created GetElement
, on the left you will find an Element Tree
which allows you to further select what should be manipulated. Use the Highlight
button to debug and check if you are selecting the right element.

Now, if further automation is required for each specific entry, add those activities inside the inner GetElement
.
3.6.3. Manually Adjusting Selectors¶
There are many ways users can adjust a Selector
to fit their needs. In this section the user will learn how to pass variables to a Selector
, how to loop through elements by using Wildcards (https://ryanstutorials.net/linuxtutorial/wildcards.php
) and nest them within a Selector
and a few other tricks!
3.6.3.1. Passing Variables to a Selector
¶
Passing variables to a Selector
is rather easy! The users can make use of the Mustache (https://mustache.github.io/mustache.5.html) syntax to append a value to an existing parameter or simply use a custom parameter inside the Selector
.
In this example the users will make use of the Recorder to capture an element inside a Google Search page and pass a variable to append to an existing Selector
parameter and further on they will simply use the variable for whole parameter.
Users can enter any search input they would like to search for in Google (https://www.google.com/
) main page. In this case, the author has opted to choose rabbitmq
.

Now, users must open OpenRPA and create a new workflow. The author has chosen to name his as Manually Adjusting Selectors
.
Click inside the Sequence
and click the Recorder button inside OpenRPA’s ribbon. Now click inside the element in the page.

If users are using Internet Explorer
, a new OpenRPA.IE.GetElement Activity will appear. Else, if they are using Edge
, Chrome
or Firefox
, a new OpenRPA.NM.GetElement Activity will appear.

Now, users must click the Open Selector button and the Selector Designer
will appear.

Now users will only replace a part of the xpath
parameter. They shall strip - ie. remove - the div/span/span[2]
part of the xpath
parameter and add a Mustache expression
containing the name of the variable to which the value which was stripped will be assigned. The author has opted to name that variable as selectorValue
so the Mustache expression
would become {{selectorValue}}
.
After doing this users can click the Ok button to close the Selector Designer
.


Now users need to assign this variable to a value - the value is the value which was stripped from the xpath
parameter but it could be anything!
The possibilities are endless for manipulation. You can even use CSS Selectors
! Refer to the Using CSS Selectors for more information.
Drag an Assign Activity to the main sequence, just above the GetElement activity. Name it as selectorValue
and assign to it the value which was stripped before - ie. "div/span/span[2]"
. Press Ctrl+K
to create the variable.

Now, delete the Click Element activity from inside the Sequence
in the GetElement activity and drag an Assign activity inside it so we can test whether the value was really captured.
Name the variable selectorText
- it is a completely arbitrary value, users can actually name it anything they would want to.
Assign to this variable the value item.Text
.

Finally, drag a Show Notification activity to the main sequence and insert selectorText
in its Message
input field.

If you run the workflow now a notification
will show, containing the message which was acquired.

3.6.3.2. Using CSS Selectors¶
As well as using XPath Selectors (https://www.w3schools.com/xml/xpath_syntax.asp
), users can also make use of CSS Selectors (https://www.w3schools.com/cssref/css_selectors.asp
). In this section, users will learn how to use CSS Selectors
to select all of the items pertaining to the class of span
elements selected in the previous section by simply passing the CSS
Selector belonging to them inside the cssselector
parameter.
First, we need to locate the CSS class
belonging to the class of span
elements.
The users can do this by pressing either F12
or Ctrl+Shift+I
.
The Console
window will then appear. Click on the Elements
tab.
Now press Ctrl+Shift+C
and select the span
element.

Copy the name of the CSS class``for the first ``div
from which the element which was selected before inherits. In our case, this one is the .IsZvec
class. Save the name of this class somewhere, it will be needed further on.

Now, open OpenRPA and click on the Recorder button. Then, click on the element inside the page.

Remove the Click Element Activity from the Sequence
inside the new GetElement Activity.

Now, users must click the Open Selector button and the Selector Designer
will appear.
Remove the xpath
parameter and add a new cssselector
parameter with value ".IsZvec"
, as shown in the image below. Finally, click the Ok button to save changes.


Now users must change the MaxResults
parameter to a number they find fit. In our case, since Googles Search Engine only shows 10 results per page the author has opted to set MaxResults
as 10.
Users must change the MinResults
to 0
as well in case OpenRPA does not find any elements containing the cssselector
set previously.
Finally, it is recommended that users set the Timeout
parameter to 00:00:00
or TimeSpan.FromSeconds(0)
.

Now, for every Activity put in the Sequence
inside the NM/IE.GetElement Activity, it will be looped over for every element containing the .IsZvec
class.
The above can be tested by dragging a WriteLine Activity to the end of this Sequence
and assigning to its Text
input the item.Text
value.

When the Workflow is run now it will show the text for every element containing the class which was set up before.

That’s it! Users now know how to successfully set up a CSS Selector
inside OpenRPA.
3.6.3.3. Using Wildcards¶
In this section users will learn how to capture multiple elements inside a given HTML DOM Element Object (https://www.w3schools.com/jsref/dom_obj_all.asp
), in a similar way to how Using CSS Selectors works, but using XPath Selectors (https://www.w3schools.com/xml/xpath_syntax.asp
)
Open OpenRPA and click on the Recorder button. Then, click on the element inside the page.

Remove the Click Element Activity from the Sequence
inside the new GetElement Activity.

Now, users must click the Open Selector button and the Selector Designer
will appear.

Now users will only cut out a part of the xpath
parameter. They shall replace the div[3]/div/div[2]/div/span
substring from the xpath
parameter for div[*]/div/div[2]/div/span
. This allows OpenRPA to capture all the 10
search elements.
After doing this, users can click the Ok button to close the Selector Designer
.


Now users can test it worked by dragging a WriteLine Activity to the Sequence
inside the IE/NM.GetElement Activity generated by the Recorder and assigning to its Text
input field the item.Text
value.

After running the Workflow, users will notice that it has successfully captured the 10 span
elements found.

3.7. Detectors¶
Detector is the main Event Listener
inside OpenRPA - refer to Event listener (https://www.computerhope.com/jargon/e/event-listener.htm) if you don’t know what that means. Simply put, it is an activity that waits for something to happen either before the Workflow continues processing and executing its activities.
It is important to notice that whenever you change a Detector inside OpenRPA, its changes reflect in OpenFlow since, ultimately, the Detector is stored in OpenFlow. Yet, there is no need to reload OpenRPA to update these changes.
3.7.1. Configuring Detectors¶
To use a Detector, you must first define it inside the Detector’s settings. The steps below show how to configure the FileWatcher Detector
to check for new PDF
files.
The FileWatcher Detector
plugin is fired when any files are added inside a given Path
. It also allows for checking only for specific file extensions by using the File filter
parameter. As well as checking for specific files, it allows OpenRPA to check for file changes inside subdirectories by checking the Sub Directories
checkbox.
First, click on the Settings
tab inside the main ribbon.

Then, click on the Detectors
icon.

Now click on the Add FileWatcherDetectorPlugin
button inside the Designer. A new detector will appear named FileWatcher
.

Finally, the users must configure the Name
of the detector, as well as the Path
for which the Detector will listen to. The users must also set a File filter
, so the detector will only check for files with a given extension - example *.pdf
.

Proceed to the Using Detectors section to learn how to use Detectors.
3.7.2. Using Detectors¶
There are many different ways of using Detectors are provided by OpenRPA. The users can create a detector and consume it using Node-RED to trigger an execution flow. They can also set a workflow to wait with a Detector Activity inside a DoWhile Activity loop. And, finally, users can also make use of a StateMachine Activity to create different State Activity instances that transition when they are triggered by Detectors.
3.7.2.1. Using Detectors through Node-RED¶
In this section, the users will learn how to set up an rpa detector
node and see the message passed when it is fired by using a debug
node.
First, navigate to their Node-RED instance.
Note
Proceed to Accessing Node-RED for the first time for more information on how to set your own Node-RED
instance.
Using Detectors through Node-RED is rather easy. First, the user must have previously configured a Detector, as per the Configuring Detectors section.
Drag an rpa detector
node to the execution flow.

Now double-click the rpa detector
node to set the Detector which will be used to trigger the execution flow. In our case, it is the Documentation Detector
previously set in the Configuring Detectors section.

Drag a debug
node to the execution flow.

Wire the debug
node to the previously set rpa detector
by pressing the Ctrl
key and clicking the ports of both nodes.

Finally, click the Deploy
button to save changes. A status bar displaying Connected
should appear below the node.

To check whether the Detector is working, the users can insert a file inside the folder and click the Debug messages
button or simply press Ctrl-g-d
.


3.7.2.2. Using Detectors Through a Do-While Loop¶
In this section, the users will learn how to use a Detector
which will keep running indefinitely until OpenRPA closes.
Drag a Do While Activity to the main sequence inside OpenRPA. Set its Condition
parameter to True
.

Now users must drag a Sequence Activity inside the Do While activity.

Add a Detector Activity to the sequence and select the Detector
which will be fired. In our case, it is the Excel Detector
.

Now the user can add any Activities or Sequences he wish for OpenRPA to perform and they’ll execute upon the detector firing.
3.7.3. FileWatcher Detector¶
The FileWatcher
detector checks for new files inside a given folder.
Detector Parameters
Name
- Name of the detector inside OpenFlow.
Path
- Absolute path of the folder in which the files are located.
File filter
is set to filter any files with a specific given filename. ThisFile filter
allows for wildcards as well, so if the user wants to check only for files starting withinvoice
, he would useinvoice*.pdf
. Whereas, for checking for files ending withinvoice
, he would use*invoice.pdf
.
Sub Directories
- If checked, this Detector Plugin will also check recursively for any existing directories inside the root directory specified.
3.7.4. Keyboard Detector¶
The KeyboardSequence
detector listens for a specific - or sequence of - key strokes.
Detector Parameters
Name
- Name of the detector inside OpenFlow.
Process restriction
refers to the process upon which this won’t be listened to if their interface is the main screen.
Keys
are the keys which enable the Detector. To set them, use the buttonSet keys
.
3.7.5. JavaClick Detector¶
The JavaClick
detector listens for a click inside a JavaElement
.
Detector Parameters
Name
- Name of the detector inside OpenFlow.
Selector
- Allows user to specify a given element by using the Select button - similarly as what happens in the Recorder Plugin - or by opening aSelector Window
with the Open Selector button. Users can also check whether theJavaElement
was successfully specified by clicking the Highlight button.
3.7.6. MSSpeech Detector¶
Coming soon - work in progress!
3.7.7. WindowsClick Detector¶
The WindowsClick
detector listens for a click inside a WindowsElement
.
Detector Parameters
Name
- Name of the detector inside OpenFlow.
Selector
- Allows user to specify a given element by using the Select button - similarly as what happens in the Recorder Plugin - or by opening aSelector Window
with the Open Selector button. Users can also check whether theJavaElement
was successfully specified by clicking the Highlight button.
3.7.8. WindowsElement Detector¶
The WindowsElement
detector listens for the appearance of a WindowsElement
.
Detector Parameters
Name
- Name of the detector inside OpenFlow.
Selector
- Allows user to specify a given element by using the Select button - similarly as what happens in the Recorder Plugin - or by opening aSelector Window
with the Open Selector button. Users can also check whether theJavaElement
was successfully specified by clicking the Highlight button.
3.8. Running Workflows from Command Line¶
Running OpenRPA Workflows from the command line is very easy. In this section users will learn how to do it.
3.8.1. Capturing the Workflow ID¶
Each Workflow in OpenRPA has a workflow id
which is assigned upon its creation. To acquire the workflow id `` for a workflow simply open OpenRPA, click with the right mouse button on the Workflow title and then click ``Copy ID
.

3.8.2. Running Workflows Locally¶
In this section, users will learn how to run a Workflow locally by using PowerShell
.
First, open a PowerShell
prompt.

Run the command below. ${WORKFLOW_ID}
is the workflow id
of the OpenRPA Workflow you want to run. So, for example, if you want to run the Workflow with id
equal to 5f8dfaf243e8cf24d4c25dcd
, you would run the command according to the second code block below.
Start-Process -FilePath "C:\\Program Files\\OpenRPA\\OpenRPA.exe" -ArgumentList "-workflowid ${WORKFLOW_ID}"
Start-Process -FilePath "C:\\Program Files\\OpenRPA\\OpenRPA.exe" -ArgumentList "-workflowid 5f8dfaf243e8cf24d4c25dcd"

Here, the Start-Process (https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-7
) cmdlet´` is used. If you do not know what a ``cmdlet
is, please refer to the Cmdlet Overview (https://docs.microsoft.com/en-us/powershell/scripting/developer/cmdlet/cmdlet-overview?view=powershell-7
) page.
Then, OpenRPA will execute the Workflow as if it had been invoked on OpenFlow or run by simply clicking the Play button inside OpenRPA’s ribbon.
3.8.3. Scheduling Workflows to run Locally¶
In this section, users will learn how to schedule a Workflow which will constantly run in a specified period of time.
First, users must search for the Task Scheduler
inside Windows 10 search bar.

After opening the Task Scheduler
, click on Create Task...
.

Now, users must fill the Name
desired for the Task
and its Description
.

Then users must select the Action
which will be executed upon triggering the Task
. Click on the Actions
tab and then click on the New...
button.

Now, users must choose the Program
which will be executed - which is OpenRPA. To do that, click the Browse...
button, navigate to OpenRPA’s installation folder - default is at C:\Program Files\OpenRPA
- and select the OpenRPA.exe
executable.


Then, in the Add arguments (optional):
input field, users must insert /workflowid `` followed by the ``id
of the Workflow which they desire to run. In our case, this Workflow has id 5f9d10719fad3056ccd42714
so the author inserted /workflowid 5f9d10719fad3056ccd42714
inside this field - as can be seen in the image below.

Users must now set the Start in (optional):
parameter to OpenRPA’s installation folder - default is at C:\Program Files\OpenRPA
. After setting all three parameters, users can finally click the OK button to finish setting up the Action
which will be executed by the Task
.

Finally, the users will set up the Trigger
which will activate the execution of the Task
. Simply click the Triggers
tab and click on the New… button.

Users can now choose the Event
which will trigger the execution of the Task
. Here only the On a schedule
event,, which is set by default, will be covered.
First, select a checkbox to choose whether the Workflow will be run One time
, Daily
, Weekly
or Monthly
.
Now, fill the calendar selector to choose the Start
date and time on which the Workflow will start running.
Users can also select some Advanced settings
. Such as whether to Delay
, Repeat´`, ``Stop
or Expire
the Task
and also choose to Enable
or disable it temporarily. After finishing the Trigger
configuration, the user must click the Ok button to save changes and again to finish configuring the Task
.

Finally, the Task
is run and OpenRPA will show a notification warning that it has completed successfully - or failed.

3.9. Plugins¶
3.9.1. Chrome, Firefox¶
Chrome, Firefox and Edge plugins are necessary to record activities in those browsers. Without them, the Recorder
cannot recognize the Activities performed there.
Besides that, all functionalities of OpenRPA.NM toolbox depends on the installation of those plugins.
The installation is quite an intuitive process. On the upper ribbon of OpenRPA GUI, in the Settings
tab, the user will find the icons of each browser. After clicking on it, the corresponding app store will open.

If using Google Chrome, a new tab will open with the Chrome App Store page. The user will, then, click on “Use in Chrome”. A pop-up message will be shown so that the user may confirm the installation.
If using Firefox, a new tab will open with the Firefox Add-ons page. The user will, then, click on “Add to Firefox”. After this, a pop-up message will be shown so that the user may confirm the installation.
If using Edge, a new tab will open with the Chrome App Store. If the user has never installed any Chrome extensions on Edge, a pop-up will show asking whether the user wants to allow extension from other stores to be installed on Edge. The user shall click the Allow extensions from other stores button and then click the Add to Chrome button to install the OpenRPA plugin for Edge.
Please keep in mind that these plugins only exist so that OpenRPA may access information in those web browsers. They are not responsible for capturing the data themselves. Besides that, these plugins may be removed at any time without any loss to OpenRPA normal functioning.
Note
These plugins must be installed directly from their respective app store. Installation CAN NOT be done offline by transferring the files manually.
3.9.2. AVI Recorder¶
The AVI Recorder is used to record the execution of a workflow. This plugin is extremely useful when debugging a workflow that is occasionally failing and it is hard to closely watch the execution of what is happening.
In the Settings tab inside OpenRPA ribbon, click Run Plugins. Then select AviRecorder
, mark the Enabled
checkbox and set the desired Saved folder
path where the recordings will be saved.

OpenRPA AviRecorder.¶
By default, OpenRPA will only keep recordings of workflow executions that failed - either naturally because the process itself failed or forced by another Activity. If it is desired to record all executions instead - successful and failed ones -, mark the Keep successful
checkbox.
Additionally, the Codec
and Recording quality
can be adjusted to save harddrive space or to increase the recording quality.

OpenRPA AviRecorder with Keep successful set.¶
3.10. Workflow Examples¶
3.10.1. Web Automation¶
In this example, the RPA Input Forms Challenge (http://www.rpachallenge.com/
) will be solved.
As recommended, the Recorder will be used to facilitate the designing process.
The steps are listed below.
Download the
Excel file
.Read the
Excel file
.Map Start button.
Loop the DataSet rows.
Find the respective handle for each WebElement input field.
Fill all the required fields inside the webpage.
Map Submit button.
3.10.1.1. Download the Excel file¶
To download the Excel file
, use the DownloadFile activity, found inside the OpenRPA.Utilities
toolbox.
Drag the activity to the main sequence inside the Designer.
Click the ...
button to select the path of the file to which the archive will be saved or assign the LocalPath
parameter inside the Properties tab of the activity.
Paste the URL from the archive which you want to fetch. It is useful to remember that, since the URL will be acquired by OpenRPA as a string
, it must be contained within "
quotation marks. In this example, the following URL was used: “rpachallenge.com/assets/downloadFiles/challenge.xlsx”.

3.10.1.2. Read the Excel file¶
The ReadExcel activity will read from an Excel file
and save it into a variable.
All the steps here are visibly explained at the How to read from an ``Excel file``.
How to read from an Excel file
Drag the ReadExcel activity, found inside the OpenRPA.Utilities
toolbox, to the main sequence.
Select the Excel file
which will be read by clicking the ...
button and find the file path in explorer where the sheet you want to read is found.
Then, by clicking the ...
button, the user will be prompted by an explorer window and there select the Excel file
that should be used.
The ReadExcel activity will read this Excel file
and save it into a variable.
As this variable does not exist yet, it must first be created. Remember that variable must be obligatorily set with the type System.Data.DataSet. Simply click in the DataSet
input field inside the Properties tab, type the name of the variable you want to use and press Ctrl+K
.
Now the user may either create the variable inside the Variables, Arguments & Imports box or follow the note below.
Note
OpenRPA is able to automatically create a new variable with the correct type required for the Activity/property. To create a new variable in the Properties box, type the variable name and with the caret still inside the input field, press Ctrl+K
.
Note
A DataSet object
corresponds to the whole sheet. Each DataTable
(e.g. Sheet1
) corresponds to each sheet inside that Excel file
. The DataSet
class is the object temporarily in-memory cache - created to store all the data consumed from this Excel file
. For more on the DataSet
class, refer to the link to Microsoft’s Documentation on the DataSet Class (https://docs.microsoft.com/en-us/dotnet/api/system.data.dataset?view=netcore-3.1
).
Note
A DataTable object
corresponds to one table of in-memory data contained in a DataSet object
from the class equally named. When you read an Excel file
, it is automatically assigned to a DataSet
class and all the Sheets
are saved into DataTable
classes - numbered from 0 to the quantity of sheets inside the Excel file
. Here it is reminded that DataTable
objects are case sensitive.
3.10.1.3. Map the Start button¶
The challenge starts by clicking the Start button.
To map the process of starting the challenge, simply click the white triangle corresponding to the space below the Read Excel activity. Start the Recorder and click the Start button inside the browser, as shown in the steps below.
Note
In order to use the Recorder
, it is necessary to install the Chrome/Mozilla Firefox plug-in. Please refer to Chrome, Firefox section to further details.
In order to cease recording, simply press the ESC
button.
It is reminded here that ending the recording is obligatory, else it will record all activities you execute endlessly.


After successfully mapping the Start button, your workflow should look like the last image on the next page.

3.10.1.4. Loop the DataSet rows¶
Now it is time to populate the input forms inside the page with the data we’ve gathered from the Excel file
.
Drag the Foreach DataRow activity, found inside the OpenRPA
toolbox. Then inside the Foreach DataRow activity, drag a Sequence activity, from the System.Activites
toolbox.
As stated before, each sheet inside the DataSet
assigned from the Read Excel activity is saved in-memory as a collection inside the Tables
attributes.
Each sheet inside the Tables
attribute is acquired accordingly to the sheets inside the Excel file
, these sheets are numbered starting from 0. As an example, if you were to add a row to a DataTable
inside that Excel file
, you’d first assign it to a DataTable class
object and use the activity to add that row to the table.
You can acquire each row by assigning a single variable to the one you want to capture, with numbers starting from 0, or you can use the Foreach DataRow to automatically loop through each row accordingly. In our case the DataSet
is assigned to the ds
variable, that is the one which will be used to retrieve the Table
from. Since there is only one sheet, the ds.Tables(0)
is used to assign the Table
from where the Foreach DataRow will retrieve the values.
After assigning the DataTable
where the rows are going to be retrieved from, it is noted here that the columns are mapped to attributes inside the variable assigned to the left-hand side of the Foreach DataRow activity - in our case row
to return or set the value of a DataColumn
.
The Foreach DataRow loop basically iterates through every value in the row (First Name
, Last Name
, Company Name
, …) and assign it to the XPath
selector item inside the webpage where each field belongs. This causes the value inside the RPA Input Forms Challenge (http://www.rpachallenge.com/
) page to be populated.
Note
A DataRow object
refers to each row mapped from the DataTable
. By using the DataRow
object and its properties and methods the user is able to retrieve and evaluate; insert, delete and update the values inside the DataTable
. The DataRowCollection
also represents the actual DataRow
objects inside the DataTable
. Each column mapped from it can be retrieved by using its index as an attribute of the DataRow
class object, if you’d like to retrieve the 1st column inside the row, you’d use row(0)
. For more on the DataRow
class, refer to the link to Microsoft’s Documentation on the DataRow Class (https://docs.microsoft.com/en-us/dotnet/api/system.data.datarow?view=netcore-3.1
).
![]() |
![]() |
3.10.1.5. Find the respective handle for each WebElement input field¶
By using the Recorder and clicking on each input field found in the RPA Input Forms Challenge (http://www.rpachallenge.com/
) page, it is possible to easily find the best handles to each WebElement being clicked.
As this workflow deals with WebElements manipulation, usually the best handles are Element.ID, Element.Name, Element.ClassName and so on. In our case, the ng-reflect-name
attribute is used along with the XPath
selector to provide a means of capturing a given element.
Once you start recording, click a single input field inside the RPA Input Forms Challenge (http://www.rpachallenge.com/
) page. As usual, we recommend capturing the first field - that is - First Name
and then proceeding to the others.

After clicking an input field, a prompt window will appear with the title InsertText
, simply press Enter
.

In order to cease recording of the current input field, simply press the ESC
button.
It is reminded here that ending the recording is obligatory, or else it will record all activities you execute endlessly.
Then, a new OpenRPA.NM.GetElement
activity will appear inside the Foreach DataRow sequence.

It is desirable that the user change the name of each activity to the corresponding input field. As shown in the image below.

Note
To change the name, or DisplayName
- set inside the activity’s parameters, the user can either click twice in the name of the activity, type the desired name and press RETURN
or set the parameter DisplayName
inside the Properties box.
Note
When a WebElement is clicked using the Recorder and OpenRPA determines that the WebElement is capable of receiving input values. A prompt will appear automatically where the user can type string texts and the Recorder will generate the activities as if it were wanted to fill these WebElements with the respective string texts provided. For now, the user may ignore these and fill the prompt with any text, these assigned values will be replaced so they get their values from the DataTable ds
. The WebElements are automatically assigned to the item
variable.
![]() |
![]() |
![]() |
3.10.1.6. Fill all the required fields inside the webpage.¶
Now that the handles are mapped, assign the values of the rows and columns that were obtained in the Excel sheet.
The first input field is First Name
, and the assignment can be done by using the Assign activity found in the RPA.Utilies
toolbox.
In the left hand side, use the item.Value
to access the property of the WebElement
and in the right hand side use the desired input value - in the specific case of the First Name
column, row(0).ToString
.
FirstName
is located in the first column, hence index = 0
.
![]() |
![]() |
Note
The Assign activity is used to reference a value to a variable. To do that, enter in the left-hand side of the activity the name, or alias, of the variable which you want to map a value to. If desired, you can press Ctrl+K
to automatically create the variable or create it manually. Use the right-hand side to enter the value which will be assigned to the variable.
Note
The value of the respective column inside the row is a DataCell
object. An object temporarily in-memory cache is created to store the column value inside the respective row. Furthermore, as the Excel value may be an object of non-string type, it’s better to be safe and always cast it to a string. Since the need to cast - ie. change its type - to a String
before assigning it to the item.Value
, given that the DOM object returned by the Selector
is of type String
as well. This is done by using the ToString
method.
3.10.1.7. Map Submit button¶
Each entry - corresponding to each row - must be entered after being filled by clicking the Submit button.
To map the process of entering each input - ie. clicking the Submit button -, simply click the white triangle corresponding to the space below the last Assign activity, start the Recorder and click the Submit button inside the browser, as shown in the steps below.
In order to cease recording, simply press the ESC
button.
It is reminded here that ending the recording is obligatory, or else it will record all activities you execute endlessly.


After successfully mapping the Start button, your workflow should look like the image below.

3.10.1.8. Workflow Finished¶
The finished workflow should look like the sequence below.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Finished RPA Challenge workflow.
3.10.2. Windows Automation¶
In this example, Skype will be used to exemplify how easy it is to automate Windows applications.
Our goal is to ask the user for contact info and then the robot will proceed to Skype and send a .PDF file
to the specified recipient.
Hence, the OpenRPA major features being exposed here are: Detector, Form, Selector and the Recorder.
This example is divided into 3 steps:
The first step refers to Detector
, which will be used to check if a new file is created in a specific folder.
The second step refers to Form
, used to prompt the User about the recipient’s contact info (Email
, Name
and Username
)
The final step is Windows Automation (Skype app)/Using Selector
, where the user will record the procedure of sending a message and a file to their Skype contact.
If your main interest lies in Windows UI automation, you may skip directly to the Windows Automation step.
- Detector
Create Detector in OpenRPA
Configure Detector node in Node-RED
Message Manipulation in Node-RED
Passing a variable from Node-RED to OpenRPA
- Form.
OpenRPA Forms
- Windows Automation (Skype app)/Using Selector
Record task
Configure Selectors
3.10.2.1. Detector¶
Detectors are synonyms to event-listeners. Alas, they wait for some specific condition to happen and then fire a message to Node-RED
or even to OpenRPA
itself.
In this section, the user will learn how to create a FileWatcher Detector
, which will listen to file changes in a specific directory and will fire an event when a new file is created. For this example, the robot should be firing each time a new PDF/.pdf file
is created.
Create Detector in OpenRPA
First, it is needed to configure the FileWatcher Detector
.
To do that, the user must first click the Settings
bar inside OpenRPA’s ribbon.
Then, click the Detectors
button inside the ribbon.
After that, all the user needs is to click the desired detector inside the Detectors ribbon.
For this example, the Detector
which will be used is the FileWatcherDetectorPlugin
. Set the Detector’s Name
- in our case Windows Automation
as well as the Path
which it will listen to - C:\Users\viere\Documents\workflow_example_files\windows_automation\input_files
, no quotes.
Then set the File Filter
to *.pdf
- the *
is a wildcard for the filename, that is, any filename will do.
Note
If you can not find a Detector
, please make sure it has been installed. In case of doubts, simply run the installer .msi
again and make sure to include it during the installation.
Note
Wildcards (https://ryanstutorials.net/linuxtutorial/wildcards.php
) is a set of building blocks that allow you to create a pattern defining a set of files or directories. As you would remember, whenever we refer to a file or directory on the command line, we are actually referring to a string path. Whenever we refer to a path we may also use wildcards in that path to turn it into a set of files or directories..
Configure Detector node in Node-RED
Now the user will configure, in Node-RED, a Detector
node, which will be the starting point for NodeRED Messages
when the Detector
is triggered.
Create a new flow inside Node-RED. Our flow is being named Windows Automation - Workflow Example
.
Now drag a detector
node to the workspace.
Double-click the detector
node to set its properties. Select the Detector
in the dropdown field, which will appear - in our case, Windows Automation
. Additionally, you may also give a name to this node such as Filepath Detector
, we recommend doing so to keep flows organized.
Message Manipulation in Node-RED
When the FileWatcher Detector
fires, some information will be passed in the NodeRED Message
, such as the filepath
- that is, the name of the file that has been created.
It is desired to capture this data and then pass it back to the robot as arguments
for when workflows are invoked.
Remember that arguments
should be passed to the Robot through msg.payload
object.
As our OpenRPA Workflow does not require any other argument
, we can plug in the FileWatcher Detector
node directly to the robot
node.
Invoking OpenRPA Workflows
Here lies the logic behind passing the variables to and executing the OpenRPA workflow, which will be invoked upon the Detector
’s positive signaling.
Drag a robot
node to the workspace. This node enables us to invoke the Windows Automation
workflow.
Once again, it is recommended to properly name the nodes, Invoke Windows Automation Workflow
.
Double-click and assign the Robot (or agent)
who shall execute the workflow, and obviously, the name of the Workflow
that should be executed (this example, Windows Automation
). You may leave the field Local Queue
blank.
Now, the user must deploy the flow created by clicking the red Deploy button at the screen’s top-left side.
After that, the user should define a new argument inside the OpenRPA workflow by clicking Create Argument
.
As you may have seen in the debug
node, the parameter being passed is called filepath
and, therefore, the argument
should be the exact same. As the argument
is an input, set its Direction
to In
.
Note
If the user wants to avoid using Node-RED completely, an infinite While loop activity (condition: true=true) with a Try Block is suggested along with the Detector activity containing the detector defined previously. The user may also use the Assign activity to assign a fixed filepath
for the file which will be sent to the Skype contact. By using the loop, every time an iteration finishes, the robot is always back to the start waiting on the Detector
to fire once more and, in case anything extraordinary happens, the Try Block assures that the Workflow will keep running.
3.10.2.2. Form¶
In this section, the user will learn how to create a Form
to capture the Email
, Skype contact
and Contact name
which will be used to pass the attachment and template message using the Skype application.
OpenRPA Forms
Here the user creates a dynamic WPF Form to gather the values mentioned above from the client.
First, drag a Invoke Formula
snippet to the main sequence.
Now click Open designer
to open the Form Designer
.
Clear all example code and add the code snippet below to the designer code editor.
<form>
<title>Skype Automation Form</title>
<heading>Invoice Details</heading>
<input type='string' name='email'
label='Email'
tooltip='Enter the email address here.'
icon='pencil'>
<validate must='NotBeEmpty' message='Email is mandatory' />
</input>
<input type='string' name='usernameSkype'
label='Skype contact' icon='pencil'
tooltip='Enter the Skype contact to which the file will be sent here.'>
<validate must='NotBeEmpty' message='Skype contact is mandatory' />
</input>
<input type='string' name='name'
label='Contact name' icon='pencil'
tooltip='Enter the contact name to which the file will be sent here.'>
<validate must='NotBeEmpty' message='Contact name is mandatory' />
</input>
<action name='submit' content='START SKYPE AUTOMATION' icon='check' validates='true' ClosesDialog='true' />
</form>
If you’re used to HTML or any other markup language, you might understand what’s happening behind the scenes here. If you don’t, do not worry and refer to the OpenRPA Forms section.
By pressing the Build form button, the user can build and see a preview of the WPF form in the left‑side panel of the Form Designer
.
After that, the user can press the Create variables button so all variables defined inside the Form Designer
will be automatically created. Easy-peasy, isn’t it?
Note
If the user wants to avoid using OpenRPA Forms
, they can simply use the Assign activity to assign values to the variables email
, usernameSkype
and name
, which will be used further to send the attachment and template message to the desired client.
Note
The Form Designer
is the place where the user can create his desired WPF forms to gather input from the client. On the right-side of it, a preview of the input form is shown. On the left-side of it, the user enters the code used to design the input form. After adding code to the Form Designer
, always press the Build form button to save changes and visualize the preview.
3.10.2.3. Windows Automation (Skype app) / Using Selectors¶
Now comes the greatest part of our journey so far in this workflow example. The built-in Recorder will be used to record the task that an user would normally do to effectively achieve the task described in this section’s introduction effectively.
Record task
Here the user will record the task usually done, namely search for a contact inside the Skype application, select - or click - that contact and send a message containing the attachment.
The first step is to open the Skype application.
Now, with the Skype application open, the user will start the Recorder inside OpenRPA by clicking in the button inside OpenRPA’s ribbon and execute the task as if done manually.
Now, with the Recorder started, the user must click the Search
tab, containing the placeholder People, groups & messages
.

An input field will appear inside the Search
tab containing the placeholder Search Skype
. Click that input field, an InsertText
input field will appear. The user should enter an existing contact which will be used as a dummy to assign the proper Selector
further in this section. After waiting for Skype’s own autocomplete feature to find the user, the user shall click the desired contact.


After clicking the desired contact, the Messages
tab will open open for that specific contact.
The user must now click the Add File
button in the lower right section.

Now a file dialog appears, where the user can select the desired file, and an input dialog from OpenRPA titled InsertText
where you can again insert dummy text. The Selector
will act upon this dialog to choose the file which will be sent, as is seen in the next section. Then click the Open
button.

Now click the input field containing the Type a message
placeholder, another input dialog with the InsertText
title will appear. You can again enter any dummy text.

Then, the user shall click the blue Send button.

Finally, click the X button inside the Search
tab to close the search dialogue and exit the Recorder by pressing the ESC
button.

Configure Selectors
Now the Selector
for the many GetElement activities that appeared inside OpenRPA’s designer is configured.
First, configure the first Selector
for the first element to be clicked inside the Skype application pane. That is the one with the People, groups & messages
placeholder. In our case, we changed its DisplayName
from Search for people, groups & messages
to Search Contact GetElement
, to ease the viewing process by a 3rd-party which may be interested in the workflow.
Click the Open Selector button inside the GetElement activity that was generated for that specific field.

In this image, the user notices a Type Text activity, which corresponds to the dummy username that was typed. The user can remove that activity from the workspace, since it’ll be replaced with another activity in the following steps.
The user will notice that upon clicking the Highlight button inside the new window and with the Skype application window open, no elements inside the screen will be highlighted. Then, we must select the given element manually.
To do that, the user can first double-click the element Pane Skype
-> Document Skype XXXXXXXXXX
-> Button Search for people, groups & messages
and right-click this last element and click the Select Element button that appears. Below is a picture of this element highlighted.

Now, the user is going to change the filename
attribute in the first selector, where there may be "%ProgramFiles%\\WindowsApps\\Microsoft.SkypeApp_15.61.100.0_x86__XXXXX\\Skype\\Skype.exe"
, the user wants to crop the version of skype and the hash which follows it - specified here as {XXXXX}
. To do that, simply change it to ``”%ProgramFiles%\WindowsApps\Microsoft.SkypeApp_*”``¹.
Now the user must also deselect the fourth selector. All the changes made so far are shown in the image below.

After that, simply click the Ok button on the lower-left side of the screen. It is recommended that the user check once more whether the proper Selector
was configured by clicking the Highlight button inside the activity.
Now the user must do the same steps specified above inside the GetElement activity responsible for capturing the Search
tab input. Select the element inside Pane Skype
-> Document Skype XXXXXXXXX
-> Edit Search Skype
. It is important to remark that the Search
tab must be visible inside the Skype application before opening the selector so OpenRPA can recognize it as an element inside the window.

The user must also change the right-hand value of the Assign activity, inside the current GetElement activity, to the variable which is going to hold the username
of the desired contact. In our case, that variable is usernameSkype
, as previously defined in the Forms section.

Now the user will add a Delay activity to the workflow. Set the Delay’s Duration
property to 00:00:05
, which means this delay will last for 5 seconds. This is explicitly needed because of the autocomplete function built-in in the Skype application. It is a hard-coded constraint in which the robot must wait for the autocomplete function to complete before proceeding to the next steps.

Then, the user must repeat the steps specified above inside the GetElement activity responsible for capturing the Contact
button. Select the element inside Pane Skype
-> Document Skype XXXXXXXXX
-> Group PEOPLE
-> Button {Contact Name}, {Status}, {Chatted Last}, {Skype Name}
- namely, in our case, Paulo Veras
, Away
, Chatted 23 minutes ago
, Skype Name
. It is important to remark that the Contact
button must be visible inside the Skype application before opening the selector so OpenRPA can recognize it as an element inside the window. Below is the Selector
properly set up and an image of the button highlighted.


Now add a post wait by using the Post Wait
properties inside the Click Element activity which is contained inside the GetElement activity responsible for capturing the Contact
button. This value should be set to 00:00:02
. The post wait is used so, after clicking the desired contact button which appears in the left pane of the Skype window, the application itself will wait for the Messages
tab to load. Since we have added the post wait, the Delay activity is not needed.
The user must now repeat the steps specified for selecting the proper Selector
for the remaining activities and assure that the elements inside the screen are highlighted when properly configured. Remember, you may have to open a window in the Add file button to select the elements correctly.
Now set the proper value for the filepath
for the file which will be sent through the Skype app. Assign the appropriate value inside the respective Assign activity, which corresponds to the input field where the filepath
is going to be set. If you haven’t created the argument
yet, now is the time to do it - remember it must have its Direction
set as In
. Below it is shown how to set this argument properly.

Finally, check whether the configs are correct for the element inside the Selector
corresponding to Pane Skype
-> Document Skype XXXXXXXXX
-> Edit Type a message
and alter item.value to item.SendKeys inside the Assign activity included in the GetElement activity.
If the user refrains from doing so, OpenRPA will attempt to directly set the value of Skype’s edit field to the contents of the variable templateMessage. The problem is: Skype does not like that! The Skype app assumes that the user would type a letter at a time instead of changing the edit field value directly, otherwise the UI gets messed up with the placeholder “Type a message ” ending on top of the actual text message.
The correct way to mimic a user typing a letter at a time is to use item.SendKeys method.
If the Detector
is appropriately set, the user can now test the workflow example by inserting a .PDF
file inside the directory previously defined. Else, they can follow the note below.
Note
If the user hasn’t set the filepath
argument to be acquired from the FileWatcherDetectorPlugin
, as seen in the 1st step in this workflow example, they must set its value manually by using an Assign activity.
Note
To change the name, or DisplayName
- inside the activity’s parameters, the user can either click twice in the name of the activity, type the desired name and press RETURN
or set the parameter DisplayName
inside the Properties box.
Note
¹ - Wildcards (https://ryanstutorials.net/linuxtutorial/wildcards.php
) is a set of building blocks that allow you to create a pattern defining a set of files or directories. As you would remember, whenever we refer to a file or directory on the command line we are actually referring to a path. Whenever we refer to a path we may also use wildcards in that path to turn it into a set of files or directories..
3.10.2.4. Workflow Finished¶
Here lie the images showing the output of the workflow both in the Skype application and in Node-RED.


3.10.3. Image Search / OCR¶
In this example, the user can practice OCR on an image loaded from a file and then check the results against a validation standard.
To reduce the scope of the activity, this workflow example’s only purpose is to check whether the detected document is a driver’s license or not.
The validation procedure is as follows: if the text “DRIVER” is located within the image, OpenRPA will assume this document is indeed a driver’s license.
Note
As well known, OCR is not guaranteed to work 100% of the time, as text readability and image quality both play a crucial role in its success rate.
3.10.3.1. Load Image from File¶
Drag the Load From File activity to the main sequence.
Click the ...
button to select the image to be loaded.
Open the Properties tab and assign a variable to the Result
parameter, which will carry the ImageElement
created by the activity.
It is useful to remind the user that everything captured from an activity that returns any kind of Element
is automatically mapped to the item
Element.
Note
OpenRPA is able to automatically create a new variable with the correct type required for the Activity/property. While creating a new variable in the Properties box, after typing the variable name and with the caret still inside the input field, by pressing Ctrl+K
.

3.10.3.3. Evaluation¶
Drag an If activity to the sequence inside the Get Text activity. Here the user will implement the whole validation logic.
Inside the Condition
input field, insert item.Value.Contains("DRIVER")
. Here it is checked whether any of the text acquired using the Get Text activity - ie. inside item.Value
- contains the word DRIVER
.
Drag an Assign activity to the Then
sequence inside the If activity. Assign the variable containsDriverLicense
to True
. This means that if the workflow finds any instances of the values that contains DRIVER
it will automatically change the value of the variable containsDriverLicense
to True
. Else, it will keep executing, since there is nothing contained inside the Else
sequence.
Note
The Assign activity is used to reference a value to a variable. To do that, enter in the left-hand side of the activity the name, or alias, of the variable which you want to map a value to. If desired, you can press Ctrl+K
to automatically create the variable or create it manually. Use the right-hand side to enter the value which will be assigned to the variable.

3.10.3.4. Show Notification¶
Now drag a Show Notification activity to the end of the main sequence. This will be the way of showing to the user whether the validation has been successful or not.
Inside the Message
input field, in the activity´s dialogue or in the Properties box, insert the text "Is the document a Driver's License? " + containsDriverLicense.ToString
.
Here we cast the value of containsDriverLicense
, which is a bool
, to a string
so it can be printed in the Show Notification activity.

3.10.3.5. Workflow Finished¶
Here’s a preview of how the workflow will look like after running it - the Output window is obviously detached for exhibiting the data.
![]() |
![]() |
![]() |
![]() |
3.10.4. Excel Read¶
In this example, the user will read a couple of invoices contained in Excel files (.xlsx)
, capture the data inside them and generate a new Excel file
with the merged data.
The invoices which will be used to demonstrate this example can be found here Invoices (https://github.com/open-rpa/examples-files/raw/master/bpa-doc/read_excel/invoices/invoices.zip
).

Unpack the .rar
file at the desired directory and save the folder path somewhere, it shall be used later on.
The following steps are followed to accomplish this workflow example.
Create an Empty DataTable
- For each Invoice
Read Individual Cells
Read Table Cells (“items”)
Add this iteration’s invoice to DataTable
Write Excel from DataTable
3.10.4.1. Create an Empty DataTable¶
All the Excel data that will be read from the invoices will be saved into a DataTable
.
Drag the CreateDataTable activity to the end of the main sequence.
In the first input field, assign the DataTable
name as invoicesDataTable
.
Note
OpenRPA can automatically create a new variable with the correct type required for the Activity/property. While creating a new variable in the Properties box, after typing the variable name and with the caret still inside the input field, press Ctrl+K
.
In our case, the fields which are going to be assigned to the second input field are headers. Therefore our second input field should contain {"Invoice Number", "Company Name", "Shipping Address", "Shipping Tel. Number", "Due Date", "Qty. of Items", "Due Balance"}
as its content.
It is advisable to rename the DisplayName
for each activity to something meaningful, and that helps you keep track of what each part of the workflow does! Considering that, rename this activity to “Create Empty DataTable”.

Note
In OpenRPA, a DataTable
corresponds to a 2-dimensional non-serializable object used to hold values. Think of it as a matrix with i
rows and j
columns. The i
rows are accessible by using the .Rows(n)
attribute, where n
is the number of the row - starting from 0 - which you want to access. The j
columns are accessible by using the .Item(n)
attribute, where n
is the number of the column - starting from 0 - which you want to access. It is useful to remind here that the user must have accessed the Rows
attribute, therefore, if the user wanted to access the 2nd column on the 3rd row of the data table they would use .Rows(2).Item(1)
attribute.
Note
In the .NET API, a DataTable object
corresponds to one table of in-memory data contained in a DataSet object
from the class equally named. When you read an Excel file
, it is automatically assigned to a DataSet
class, and all the Sheets
are saved into DataTable
classes - numbered from 0 to the number of sheets inside the Excel file
. Here it is reminded that DataTable
objects are case sensitive.
3.10.4.2. For each Invoice¶
The first activity will loop a directory and will return all filenames contained in it.
First drag the Assign activity to assign the absolute path of the directory you want to loop through to a variable - ie. path
.

Drag the ForEachWithBodyFactory<> activity to the main sequence.
Set the proper TypeArgument
parameter inside the Properties box to String
. This is done because the directory which will be iterated through contain filepaths, which are returned as values of String
type.
In the right-hand side of the activity change the item
variable assigned to filePath
.
In the left-hand side of the activity, insert System.IO.Directory.GetFiles(path)
.
The variable filePath
now contains the String
to each respective invoice full filepath.

Read Individual Cells
Here the robot will read individual cells of fields that contain only a single value - these fields are static (the number of rows is fixed - one).
As these steps are quite repetitive, we will be reproducing only the steps of the invoiceNumber
variable. If you want to practice further, we strongly recommend doing the same to the other variables as well, namely companyName
, shippingAddress
, shippingTelephoneNumber
and dueDate
.
Use the Recorder to select the cell or drag the ReadCell activity, found inside the OpenRPA.Utilities
toolbox, to the sequence inside the ForEachWithBodyFactory<> activity.
If the Recorder wasn’t used, the user must follow a few more steps in order to use this activity. First, assign the Filename
parameter inside the Properties box to the filePath
variable to select the Excel file
which will be read. Enter the cell, which will be captured into the Cell
parameter. In our case, it is "H3"
, which corresponds to the invoice number.
The ReadCell activity will read from an Excel file
and save the cell into a String
variable by default. The user can change the type of the data captured by changing the ArgumentType
parameter inside the Properties tab.
Since this variable does not exist yet, we must first create it. A reminder that the variable must be obligatorily set with the type System.Data.String.
Simply click in the Result
input field inside the Properties tab and type the name of the variable you want to use. In this case, it is invoiceNumber
.
Now repeat the procedure above for the remaining variables.
Remember that it is needed to change the variables Scope
to the outermost sequence to be able to capture all the values gathered in here and save them into a DataTable
later on.
Note
While creating a new variable in the Properties box, after typing the variable name and with the caret still inside the input field, by pressing 'K
OpenRPA will automatically create this new variable with the correct type required for the activity.
Read Table Cells (“items”)
Here the robot will read a ‘table’ inside the invoice, and differently to reading individual cells, tables are usually dynamic (the number of rows may vary) or. This is done in a programmatic manner that allows the developer to read a specific range of cells, which would be simply too huge as to permit him to add the ReadCell activity for each variable manually.
This ‘table’ will be stored in a new DataTable
called ‘itemsDataTable’ and some logic will be applied as well, such as removing empty columns, summing and counting values.
Drag a Sequence activity and name it Items Processing Logic
.
Inside this sequence, drag a CreateDataTable activity and create a table named itemsDataTable
.
The headers for this DataTable
shall be {"itemName", "quantity", "rate", "subTotal"}
.

For the assignments, we will be using columns 0, 3, 5, 7, if you take a look at the invoice template, these are the indexes for the columns that contain data.
By using the Read Range
activity, we will get the table contents into a DataTable
.
First, enter the filepath of the file from which the activity will read from inside the Filename
input field.
Enter the cells you want to capture in the Cells
field inside the Properties box. In our case, those are "A14:H18"
.
The indexes 0
, 3
, 5
, and 7
refer to the indexed objects inside the current row
, ie. the columns.
Enter the name for the DataTable
you want to save it to inside the DataTable
field inside the Properties box. In our case, this DataTable
is items
.
In the Properties box, you may find the property IgnoreEmptyRows
, set this value to True
. Since our table does not contain a header, set the Use Header Row
property to False
- this will ensure the activity reads the first row of the data (row 14).

And by looping the DataTable
with a ForEach DataRow activity, the Add DataRow activity is used to loop through each item information to our ‘itemsDataTable’

Now comes the logic for calculating the subtotal value and adding this value to the total value which will be described in the final Excel sheet
.
Declare a new variable quantity
with type System.Decimal
. Using the Assign activity, assign its value to quantity + Convert.ToDecimal(row(3).ToString)
- this will cause the variable to increment its value for each item iteration.
Declare a new variable currentQuantity
with type System.Decimal
. Using the Assign activity, assign its value to Convert.ToDecimal(row(3).ToString)
Do the step above for the variable currentRate
as well, using row(5)
as its base-value.
Declare a new variable subTotal
with type System.Decimal
. Using the Assign activity, assign its value to currentQuantity*currentRate
.
Finally, declare a new variable dueBalance
with type System.Decimal
. Using the Assign activity, assign its value to dueBalance + currentQuantity*currentRate
.
It is useful to remark that the user must change the variables Scope
to the outermost sequence to be able to capture all the values gathered in here and save them into a DataTable
later on.
Note
In the Read Range activity, the :
colon symbol is used to delimit the area you want to capture, the cell to the left-hand side of it is the starting cell, and the cell to the right-hand side of it is the ending cell.
3.10.4.3. Add this iteration’s invoice to DataTable¶
Now that we’ve gathered all the important data from this iteration’s invoice, we want to add this info to the DataTable
we created on step 1.
Drag the AddDataRow activity to the end of the sequence inside the ForEachWithBodyFactory<> activity.
In the first input field, insert invoicesDataTable
.
In the second input field, insert {invoiceNumber, companyName, shippingAddress, shippingTelephoneNumber, dueDate, quantity, total}
.
3.10.4.4. Write Excel from DataTable¶
This is the last part of the workflow. Here the user will finally write the Excel file
containing all the data gathered.
Drag a WriteExcel activity into the end of the main sequence.
Click the ...
button to select the filename to which the Excel file
will be saved to. Enter the filename inside the File name
input field on the explorer window, which will appear. Then press Save
to finally assign it.
Assign the DataTable
from which the data gathered will be saved into the Excel file
by entering its name inside the DataTable
property inside the Properties box.
Enter the theme which will be used to stylize the Excel file
in the Theme
property inside the Properties box.
3.10.4.5. Workflow Finished¶
Here’s a preview of how the workflow will look like after completing it.


3.10.5. MongoDB Entities Manipulation¶
Coming soon - Work in progress
3.10.6. File Manipulation¶
In this example, users will find how to manipulate files in OpenRPA. All basic procedures will be covered, such as saving, moving and deleting files, as well as some basic directory manipulation.
Let’s assume there is a directory with files of different types. The first task is to separate these files according to their extension into different subdirectories. Files that are not .txt will be deleted.
After that, the robot will access the .txt files and search for a given keyword. The idea here is to simulate an automation of the product’s description classification. If the file does have the keyword, it will be moved to a specific subdirectory.
After each action, the robot will write a new line to a log Excel sheet, with information such as the name of the file, its creation date, besides the product’s information present in the files (type, price and discount).
The steps are the following:
Create new directories
Create a DataTable
Iterate over Files in Directory
Get File Name
Separate Files according to Extension
Read File
Get File Creation Date
Check File’s Content (Matches) and Extract Information
Move File
Rename File
Add Information to DataTable
Delete File
Save DataTable to Excel File
3.10.6.1. Creating new directories¶
The first step is indicating the directory the files are in (a.k.a. root directory). To do this, the user will start a new Sequence and drag an Assign
Activity into it. In the “To” field, the user will indicate an already existing argument. This arguments’ type must be “String”, since the path to the directory will be assigned to this argument as text (that is, it will be between quotation marks).
The next step is creating the subdirectories where the files will be moved to. Three directories will be created in this example: one for files that contain product information (“Product Info”), another one for files that do not have product information (“Other txt files”) and a third one for the log file (“Logs”). The procedure of creating will be the same for all, the only difference being the name of each.
To create a new directory, the user will drag an Assign
Activity into the Sequence. In the first field, the user will indicate another argument. The type of this argument will be found in the “Browse for Types…” option. The user may browse it or simply type “System.IO.DirectoryInfo”. It means that this argument will not store a string or integer; it will receive an expression that will create the new directory. Please note that the name of the argument will not be the name of the directory, it is only for use of the robot.

In the second field (i.e., “Enter a VB expression”), the user will type “System.IO.Directory.CreateDirectory(path of the new directory)”. Inside the parentheses, the user will type the path of the root directory plus the name of the new directory, as if it already existed. Again, the path must be between quotation marks. For example:
If the root directory is “C:example”, the user should type “C:examplesubdirectoryName” to create the subdirectory.
3.10.6.2. Creating DataTable¶
One more step is necessary before moving on to the files. Since a Log Excel file will be saved after the execution of the Workflow
, a Datatable must be created to store the data during the process. It will be created at the point of the Workflow
to store the values globally.
This topic is already covered in other examples of this documentation. Please follow Create an Empty DataTable and keep in mind that the names of the Variables will not be the same.
3.10.6.3. Iterating over Files in Directory¶
Since the task is classifying each file in the root directory, it is necessary to iterate over them.
The user will drag a ForEachWithBodyFactor<>
Activity into the main sequence, below the creation of the DataTable. In the first field, the user will find the word “item”, that represent each of the files in the directory. This name can be changed - any name will work.
The most important is the second field (“in”). Here the user will type the expression System.IO.Directory.GetFiles(path)
, where “path” is the Argument already set with the path of the root directory at the beginning of the main sequence (“path”). This expression will return a list of the full paths of the files in that directory. So the ForEach
Activity will iterate over this list.

The third field is the Body, where Activities will be done with each file of the list. The following Activities will be performed inside this Body.
3.10.6.4. Get File Name¶
The first Activity inside the Body will be getting the file’s name. Please note that the System.IO.Directory.GetFiles()
expression returns a list of full paths. To proceed with later Activities, the user must get the file name only.
The most simple way to achieve that is by using a VB expression. The user will drag a Assign
Activity into the Body. In this example, the name of the Variable will be “file_name”. The expression is System.IO.Path.GetFileName()
and the full path of the file must be inserted inside the parentheses, i.e., the Variable “item”.
Note
Here the user must use a Variable, not an Argument, since this value will change according to the file of the iteration. Please note that the scope of this Variable must be the Sequence inside the Body of the ForEachWithBodyFactor<>
(here named “Iterate over files”). The type of this Variable will be “string”.

3.10.6.5. Separate files according to Extension¶
After that, the user will drag an If
Activity, right after the last step. The idea here is to separate files according to their extension. In this example, only .txt files will be read, so any other extension will not be considered.
Inside the “Condition” field, the user will type System.IO.Path.GetExtension(file_name OR full path) = ".txt"
.
Note
This is not the only way to get the extension of a file. The user could also use the VB expression “file_name.EndsWith(“.txt”)”. Note that this expression looks for strings inside strings, so it must be between quotation marks.
That is, IF the extension of the file is “.txt”, THEN the robot will proceed to the “Then” field; otherwise, the robot will proceed to the “Else” field.
3.10.6.6. Read File¶
Here the Sequence is split in two. Let’s first consider what will happen to the text files.
The first Activity performed with the text file will be reading its content. Again, the user will drag an Assign
Activity into the “Then” field and use a Variable. In this example, the Variable’s name is “content” and its type is “string”.
The expression used to read the file is System.IO.File.ReadAllText(file_name)
. The content will be stored in the Variable assigned.

Note
The ones that are not .txt are to be deleted in this example. It will be explained further in this tutorial.
3.10.6.7. Get File Creation Date¶
The next step is getting the file’s creation date. The procedure is much like the previous one (Read File). That is, the user will use the Assign
Activity to store the content of the VB expression.
In this case, the expression will be System.IO.File.GetCreationTime(file_name).ToShortTimeString
.

Note
There are other possibilities here. The user may get the Hour, Day, Month or even other information about the creation of the file. To do this, the user must change the last part of the expression to the type of information required (e.g., System.IO.File.GetCreationTime(file_name).Month
).
3.10.6.8. Check File’s Content (Matches) and Extract Information¶
In this example, before moving the file, some actions were added to extract information from the text file to add to the log file. The Matches
Activity was employed and users must pay attention to three of its properties: “Input”, “Pattern” and “Results”.
The first one, “Input”, is the string or Variable storing a string where the “Pattern” will be searched. In this case, the value must be the “content” variable, which corresponds to the content of the files.
“Pattern” is the RegEx expression that will be searched for in the string inside the “Input” (please note that it must be between quotation marks).
Finally, “Results” is the Variable or Argument where the results are going to be stored (in this case, it must be a Variable).
Users must be aware that the type of this Variable must be System.Text.RegularExpressions.Match
. It will be a list of the results. In this example, there is going to be only one result per match. To get this result, users must use the following syntax: variablename.First.ToString, that is, the first item of the list will be converted to string.
3.10.6.9. Move files¶
Once those steps are completed, the robot will classify the files according to their content. In this example, the criterion is the presence of product information.
The user will drag another If
Activity into this Sequence (the Body of the previous If
statement). The Variable “content”, that stores the content of the file, will be used here. The method is .Contains("string")
and the syntax is the following: content.Contains("product")
.
Note
Note that the searched term must be between quotation marks, since it is a string.
If the file has such term, the robot will proceed to the “Then” field; otherwise, it will proceed to the “Else”. In other words, this Activity is separating the files into two categories. This is a simple example, but more complex terms may be searched.
Considering the first possibility (that the file has product information), the robot will move it to the “Product Info” directory. To do this, it is necessary to drag another Activity into the Sequence, a Invoke Code
. Moving files through Assign
is not possible, since this action does not generate any value to be stored in an Argument or Variable.

The user will, then, click on “Open editor” to edit the code to be invoked. The user is free to choose whatever programming language of their preference. In this example, VB is used. The syntax of the expression is the following: System.IO.File.Move (full path of origin, the full path of the destination)
. It is important to remark that the full path is required, i.e., including the name of the file.
The full path of the origin then is accessed through the Variable that stores the full path of the file (in this example, the “item” of the iteration). Another way to do that is by using the Argument that stores the path of the root directory (in this example, named “path”) and concatenates it with another string that contains the subdirectory plus the name of the file.
Note
The way to concatenate two or more strings is by using “&”.
3.10.6.10. Rename files¶
To rename the files when moving them, the only thing users have to do is assign a new name to the destination full path.
In this example, files were renamed by adding a new word to the beginning of their names, but any name could be set. When writing the expression to move the file, users must make sure the new name is written in the expression and concatenated to the path of the directory.
3.10.6.11. Add Information to DataTable¶
The next step is adding the information gathered about the file to the DataTable created at the beginning of the Workflow
. The user will drag a AddDataRow
to the end of each sub-workflow (i.e., to the text files that have product information, to the text files that do not have product information and also to the other files) to keep a record of each file processed.
The name of the DataTable must the one created previously to reference the new row to the correct DataTable. In the RowData, users will add the Variables’ name they want to add, following the syntax of a dictionary, that is, {variable, variable, variable}.
Further details can be found at Add this iteration’s invoice to DataTable. Please note that this is another example, so the names of the Variables must be changed according to this present example.
3.10.6.12. Delete files¶
Since only text files are being considered in this example, other files will be deleted. Here is not possible to use Variables nor Arguments, once this action does not generate any value to be stored in a Variable. So, users must use the Invoke Code
Activity once again.
In this example, only the files that are not .txt will be deleted. That is, this Activity will be dropped to the ELSE field of the file’s extension filter.
The shortest way to delete a file is by adding the following line of code to the editor: System.IO.File.Delete(file_name)
.

3.10.6.13. Save DataTable to Excel file¶
After all iterations run, the DataTable must be saved into an Excel file.
Please refer to Write Excel from DataTable.
3.10.7. SOAP Service¶
In this example, the user will create a Workflow that connects to a SOAP Service - `VIES VAT Validation <https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl)`_ (https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
) - using Windows Powershell
and gather data from it using WSDL
to capture the input data and exhibit the data gathered inside the Output bar.
Visualize how the SOAP Service is defined
Define Input and Output Variables
Connect to the SOAP Service and map the data inside Invoke Code
Exhibit the data gathered
Workflow Finished - Output
3.10.7.1. Visualize how the SOAP Service is defined¶
In this section, the user will access the WSDL
definition of the SOAP Service that will be connected to and define the input and output variables.
First, go to the VIES VAT Validation (https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
) webservice page so we can check which class is going to be used to gather data.
As can be seen per the schema defined in the .wsdl
file, the targetNamespace
defined is urn:ec.europa.eu:taxud:vies:services:checkVat:types
. That means the remaining elements which will be defined in the remaining of the template are types inherited from the checkVat
class. This is the class that will be used to gather data.
The main function inside the class is the checkVat
function as well, this function receives two input parameters - countryCode
and vatNumber
. After it is called, it returns the contents of the checkVatResponse
function - namely, countryCode
, vatNumber
, requestDate
, valid
, name
and address
. That is, it returns the input parameters of checkVat
(countryCode
, vatNumber
) and the output parameters of the call to the checkVat
function (requestDate
, valid
, name
and address
). The user is only going to use the valid
, name
and address
to exhibit the data returned.
3.10.7.2. Define Input and Output Variables¶
In this section, the user will define the input variables which will be passed to the SOAP Service and the output variables which will be used to store the contents of the call to the SOAP Service.
First, drag in an Assign activity to the main sequence. Enter the variable countryCode
inside the To
input field and "DK"
inside the Enter a VB expression
field.
Now, drag in an Assign activity to the main sequence. Enter the variable vatNumber
inside the To
input field and "40400230"
inside the Enter a VB expression
field.
Note
Press Ctrl+K
to automatically create the variable when entering it upon an input field or create it manually by clicking the Variables box under the bottom part of the screen. Use the right-hand side to enter the value which will be assigned to the variable.

Now, we must manually define the other output variables which will be returned - namely, valid
, name
and address
. name
and address
are String
variables, whereas valid
is a Boolean
variable. This is easily seen in the definition of the checkVatResponse
function inside the WSDL
file. For the definition of the valid
variable, the <xsd:element>
’s type
parameter is seen as xsd:boolean
and for the two other ones, their type is seen as xsd:string
.

All that is needed to do now is create these output variables inside the Variables, Imports & Arguments box, in the Variables section
.

3.10.7.3. Connect to the SOAP Service and map the data inside Invoke Code¶
In this section, the user will learn how to map data to the Invoke Code activity and how to execute a call to a SOAP Service by using the Powershell
language.
First, drag an Invoke Code activity into the main sequence. Open the editor by clicking the Open Editor button and set its language as PowerShell
.


Now, insert the following code into the editor:
$Client = New-WebServiceProxy -Uri "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl" -Class "checkVat"
$DateChecked = $Client.checkVat([ref]$countryCode, [ref]$vatNumber, [ref]$valid, [ref]$name, [ref]$address)
The $Client
line connects to the VIES VAT Validation webservice and defines the class
that will be used to gather data from: checkVat
.
The $DateChecked
line executes the checkVat
defined, as has been seen in the past section and maps the variables which will be returned - countryCode
, vatNumber
, valid
, name
, address
- by using Reference Variables (https://ss64.com/ps/syntax-ref.html
).
3.10.7.4. Exhibit the data gathered¶
In this section, the user will view the data gathered through the Output bar by using the Write Line activity.
First, drag in a WriteLine activity to the main sequence and type valid.ToString
inside the Text
input field.
Now, drag in a WriteLine activity to the main sequence and type name
into the Text
input field.
Finally, drag in a WriteLine activity to the main sequence and type address
into the Text
input field.

3.10.7.5. Workflow Finished - Output¶
Here’s a snippet of the contents of the output of this workflow example.

3.10.8. REST Service (integration with Node-RED)¶
In this example, the user will create a workflow that connects to the Chuck Norris Jokes API (https://api.chucknorris.io/
) and captures a joke.
The user will also create a dialog box using Forge.Forms dynamic WPF forms (https://github.com/WPF-Forge/Forge.Forms
) where a category for the joke can be selected.
A simple validation method is also used to check whether the message is a Chuck Norris joke or not.
The steps are listed below.
Configure Variable Passing To/From in Node-RED
Message Manipulation in Node‑RED
OpenRPA Forms
Invoke Workflow through openrpa
Create Joke Failed Workflow
Evaluate Chuck Norris Joke
Invoke Joke Failed Workflow
Setting Evaluation Failure case in Node-RED
Output logic
Workflow Finished
3.10.8.1. Configure Variable Passing To/From in Node-RED¶
Here lies the logic behind receiving data from the robot, querying the Chuck Norris API, and then returning the values back to the robot.
Workflow Logic
Drag a Workflow In
node to the workspace.
Set the Queue name
to define the queue that the OpenFlow workflow will assign to in Workflow In
’s properties. The queue name is completely arbitrary, the user can choose for any name they wish to. In our case, it is set as chuckapi
.
Note
To access any node’s properties inside the Node-RED workspace, simply double click the given node. The Properties box for the node, containing each input field required by itself, will then appear.
Check the RPA
checkbox to allow this flow’s workflow to be invoked from OpenRPA agents.
Set the name for the workflow in the Name
input field. In our case, it is set as ChuckAPI
.
Drag a HTTP Request
node to the workspace.
Connect the Workflow In
node to the HTTP Request
node.
Note
To easily connect a node, simply press the Ctrl
key while clicking in the grey rectangles - called ports - in each node’s the outer part. The user can also click and hold to connect the nodes, but the author finds it more feasible simply using the Ctrl
key.
Set the Method
for the request as GET
.
Set the desired URL
for the API, which the request will be sent to. In our case, https://api.chucknorris.io/jokes/random?category={{category}}
.
The variable inside the Mustache (https://mustache.github.io/mustache.5.html), ie. category
is arbitrarily named as well.
This variable will be used by OpenRPA to pass the value of choice captured from the user. The user may name it as per his own option.
Set the desired Return
type, which will be returned. In our case, it’s parsed JSON object
.
Drag a Workflow Out
node to the workspace.
Connect the HTTP Request
node to the Workflow Out
node.
Note
To easily connect a node simply press the Ctrl
key while clicking in the grey rectangles - called ports - in each node’s the outer part. The user can also click and hold to connect the nodes but the author finds it more feasible simply using the Ctrl
key.
Deploy your flow by clicking the red Deploy button at the top-left side of the screen.
3.10.8.2. Message Manipulation in Node-RED¶
Now we want to send a parameter from OpenRPA to Node-RED so that our workflow is not so static.
This parameter contains a category
to which the Chuck Norris API
’s joke will relate.
Changing parameters from a variable gathered through a workflow inside Node-RED is easily done through the Function
node and its properties.
Robots In/Out
arguments always are passed to the msg.payload
attribute (in Node-RED) and it is easy to manipulate these by using the Function
node.

Simply drag a Function
node to the workflow, between the ChuckAPI Workflow In
node and HTTP Request
node.
Note
To automatically add a node and bind it to the sequence, drag it while pressing the Shift
key. This way, the node is automatically entered in-between the sequence already established before it was dragged.
In our example, the parameters needed are msg.category
- which will be gathered as msg.payload.category
from the category
argument passed by the OpenRPA workflow.
In the Function
node’s properties, set msg.category = msg.payload.category
.
This is used so we can set the category
parameter to the HTTP Request
node, captured from the OpenRPA workflow, which the user will build next.
Note
In this example, the user could use the Change
node to set the msg.category
attribute to msg.payload.category
as well, or simply pass msg.payload.category
directly to the HTTP Request, which will be discussed further on.
3.10.8.3. OpenRPA Forms¶
Now the user creates a dynamic WPF form to gather the category
value from the client.
First, drag a Invoke Formula
snippet to the main sequence.
Now click Open designer
to open the Form Designer
.
Note
The Form Designer
is the place where the user can create his desired WPF forms to gather input from the client. On the right-side of it, a preview of the input form is shown. On the left-side of it, the user enters the code used to design the input form. After adding code to the Form Designer
, always press the Build form button to save changes and visualize the preview.
Clear all example code and add the code snippet below to the designer code editor. Then press the Build form button to update the form.
<form-designer>
<title>Choose Chuck Norris API Category</title>
<heading>
Please enter the desired category number inside the input field. The returned joke will be related to the selected category.
</heading>
<select name="category" label="Choose the desired category">
<option name="animal" />
<option name="career" />
<option name="celebrity" />
<option name="dev" />
<option name="explicit" />
<option name="fashion" />
<option name="food" />
<option name="history" />
<option name="money" />
<option name="movie" />
<option name="music" />
<option name="political" />
<option name="region" />
<option name="science" />
<option name="sport" />
<option name="travel" />
</select>
<action name="submit" content='SUBMIT' icon='check' validates='true' ClosesDialog='true' ></action>
</form-designer>
Note
After adding the code snippet, all the variables used in the WPF form can be automatically created by pressing the Create variables button.
In our case, the workflow is unable to use a Variable
. Since the value will be consumed by Node-RED, it must obligatorily be set as an Argument
with Direction set as In/Out
or Out
and type String
.
Now, to guarantee that the value gathered from the WPF form has the correct type, the user will cast it to a String
using the Assign activity.
3.10.8.4. Invoke Workflow through OpenRPA¶
Now its time to finally invoke the workflow through OpenRPA and devise the processing logic.
Since the flow is already deployed, it is needed that the user synchronizes the workflows with the OpenFlow repository.
To do the task as mentioned before, click the Reload button inside OpenRPA’s ribbon. This will refresh all workflows contained inside the OpenFlow repository to OpenRPA.
Drag an Invoke OpenFlow activity to the main sequence inside OpenRPA’s Designer.
Select the RPA Workflow, which you want to invoke. In our case ChuckAPI
.
Note
Note: When Node-RED finishes executing the flow, whatever is set in the msg.payload will return back to the robot. Variables are automatically mapped between the two applications: if msg.payload.person exists in NodeRED, whatever returns in there will automatically go in the variable named “person” inside OpenRPA.
3.10.8.5. Create Joke Failed Workflow¶
Now that the ChuckAPI process is set, the user can proceed to set a workflow which will be executed in case any failures occur upon execution of the usual process.
Create a new workflow; in our case the name REST Workflow Example - Joke Failed
is used to specify the workflow.
Drag a WriteLine activity to the main sequence.
Now it is needed to create the default variable - inside the Variables, Arguments & Imports box - from which the entry containing the Chuck Norris API
joke content is returned. This variable alias is value
, as shown in Chuck Norris API Random Joke (https://api.chucknorris.io/jokes/random
).
Set the output value, in the Text
input field or through the Properties box to a new variable of alias value
.
Note
Press Ctrl+K
to automatically create the variable when entering it upon an input field or create it manually by clicking the Variables box under the bottom part of the screen. Use the right-hand side to enter the value which will be assigned to the variable.
This workflow is merely used as an example of the almost endless possibilities within OpenRPA. The user could read the ChuckAPI
joke into a .csv
or .xslx
file, invoke one or many more workflows to deal with the data, pass it into MongoDB Entities
- as stated before, there are almost no limits to what the user can accomplish in terms of automation.
3.10.8.6. Evaluate Chuck Norris Joke¶
Here we set the evaluation process for check whether the joke captured from the Chuck Norris API
is a joke or not.
The validation standard used here is to check whether the content of the value
entry in the JSON Dictionary
returned contains the string “Chuck Norris” or not.
First, the user needs to create the default variable - inside the Variables, Arguments & Imports box - from which the entry containing the Chuck Norris API
joke content is returned. This variable alias is value
, as it can be seen in Chuck Norris API Random Joke (https://api.chucknorris.io/jokes/random
).
In REST Workflow Example
workflow, drag an If activity to the Designer.
Enter value.Contains("Chuck Norris")
inside the Condition
input field, shown in the activity itself or inside the Properties box.
3.10.8.7. Setting Evaluation Failed process in Node-RED¶
The user must now set the proper flow that will be further executed in case of failure of evaluation of the ChuckAPI
process.
Workflow Logic
Drag a Workflow In
node to the workspace.
Set the Queue name
to define the queue that the OpenFlow workflow will be assigned to in Workflow In
’s properties.
The queue name is completely arbitrary, the user can choose for any name they wish to. In our case, it is set as jokefailed
.
Note
To access any node’s properties inside the Node-RED workspace, simply double click the given node. The Properties box for the node, containing each input field required by itself, will then appear.
Check the RPA
checkbox to allow this flow’s workflow to be invoked from OpenRPA agents.
Set the name for the workflow in the Name
input field. Again, it is named arbitrarily. In our case, it is set as Joke Failed
.
Drag a RPA Workflow
or Robot
node to the workspace. This node enables us to invoke the REST Workflow - Joke Failed
workflow upon evaluation failure.
Set the Robot
which will invoke the workflow and the Workflow
which will be invoked, inside robot
node’s properties. As well as Local queue name
and Name
for the node.
Local queue name
is arbitrary, it is used to set the queue which will be used for queueing the robot instances.
Name
parameter is used only for displaying purposes inside Node-RED.
In our case, Local queue name
is set as jokefailed
and Name
is set as Invoke Joke Failed Workflow
.
Connect the Workflow In
node to the Robot
node.
Note
To easily connect a node, simply press the Ctrl
key while clicking in the grey rectangles - called ports - in each node’s the outer part. The user can also click and hold to connect the nodes, but the author finds it more feasible simply using the Ctrl
key.
Drag an Email Out
node - the one with the letter icon to the right-most side of the activity - to the workspace. This node will be responsible for sending the msg.payload
object JSON stringified to the selected email when an error occurs upon evaluation.
Connect the top-most port in the Invoke Joke Failed Workflow
node to the port outside the email
node.
Note
To easily connect a node simply press the Ctrl
key while clicking in the grey rectangles - called ports - in the outer part of each node. The user can also click and hold to connect the nodes but the author finds it more feasible simply using the Ctrl
key.
Set the properties for the email
node.
To
refers to the e-mail address from the receiver.
Userid
is the UserId from the account, which will send the e-mail. (ie. e-mail without a domain - if the e-mail is admin@openiap.io
, then your UserId is admin
)
Password
- the password for the email account from the sender.
In our case, a dummy e-mail is set - as admin@gmail.com
, which will be used to send and receive the message. It is noted here that the user must change the e-mail, or else the workflow obviously won’t work.
Note
If the user is using Gmail’s SMTP Server, it is needed that the settings for allowing Less secure app access are correct. Else, the user will receive an error message upon the execution of the workflow. To do that, refer to Less secure app access (https://myaccount.google.com/lesssecureapps
) and make sure that the Allow less secure apps
settings is set to ON
.
Drag a Workflow Out
node to the workspace.
Connect the Workflow Out
node to the email
- now admin@gmail.com
- node.
Note
To easily connect a node simply press the Ctrl
key while clicking in the grey rectangles - called ports - in each node’s the outer part. The user can also click and hold to connect the nodes, but the author finds it more feasible simply using the Ctrl
key.
Deploy your flow by clicking the red Deploy button at the top-left side of the screen.
Note
Upon any change inside a Node-RED flow, the user must deploy the given flow, so the changes are propagated throughout robots currently using that given flow.
3.10.8.8. Invoke Joke Failed Workflow¶
Now it is needed for the workflow to invoke the REST Workflow Example - Joke Failed
in case the ChuckAPI
process is not properly evaluated.
To do that, drag an Invoke OpenFlow
activity to the Else
sequence, inside the If activity.
Now select Joke Failed
as the workflow to be invoked.
This way, the REST Workflow Example - Joke Failed
activity will be automatically invoked upon any failure in the evaluation process.
3.10.8.9. Output logic¶
Drag a Show Balloon Tip activity to the Then
sequence, inside the If activity.
Insert the Title
for the Balloon Tip, which will appear.
Insert the Message
which will appear to the user. In our case, it is the variable value
.
Note
Press Ctrl+K
to automatically create the variable when entering it upon an input field or create it manually by clicking the Variables box under the bottom part of the screen. Use the right-hand side to enter the value which will be assigned to the variable.
3.10.8.10. Workflow Finished¶
A snippet is shown below containing both the output and the end of the workflow. As well as the whole workflow thereafter.

![]() |
![]() |
![]() |
3.10.9. Reading and Parsing PDF Files¶
In this example, the user will create a Workflow
that extracts data from a PDF file
, processes the data gathered using Regular Expressions (https://ryanstutorials.net/regular-expressions-tutorial/
) and saves the data into a CSV file
.
First, the user needs to download the invoice file, which will be used to extract the data. It is available on this link (https://github.com/open-rpa/examples-files/raw/master/bpa-doc/parse_pdf/Horkheimer%20Technologies%20LLC.pdf
).
The steps are listed below:
Extract text data from PDF.
Match Regular Expression groups.
Create
DataTable
to store results.Add row to
DataTable
.Save
DataTable
into CSV.
3.10.9.1. Extract data from PDF¶
In this section the user will learn how to extract text data from a PDF and save it into a variable.
First of all, the user should drag a ReadPDF activity into the main sequence.

Then, click the ...
button to select the file from which data will read. That is the invoice file just downloaded.
The user also needs to create a variable that will be used to hold the text generated by the extraction with the ReadPDF activity. In this case, the variable is result
. It must be set inside the AllText
parameter, available inside the Properties box.

Note
OpenRPA can automatically create a new variable with the correct type required for the Activity/property. While creating a new variable in the Properties box, after typing the variable name and with the caret still inside the input field, by pressing Ctrl+K
.
3.10.9.2. Match Regular Expression groups¶
Now the user will use the Matches Activity to extract groups of data from the string returned by ReadPDF.
First of all, the user should drag a Matches Activity into the main sequence.

In the first input box, containing the placeholder The input string to match against
, the user will insert the variable’s content, that is, the text captured in the previous section.
In the second input box, the user will insert the RegEx pattern used to divide data into groups. The one used here is (\b[a-zA-Z0-9$.\-() ]*)
. For a thorough explanation of Regular Expressions, please refer to RyansTutorials Regular Expressions (https://ryanstutorials.net/regular-expressions-tutorial/
). It is interesting to remind the user that, since the RegEx pattern is captured as a string, it must be enclosed in quotes. It is also recommended using the Regex101 (https://regex101.com/
) for matching the groups and testing the pattern if needed.
The user must also configure the variable to which the matches will be saved (in this example, invoiceResults
) inside the Results
parameter in the Properties box. It will be configured with type Match list, or simply Match[]
. As seen in the image below.

3.10.9.3. Create DataTable to store results¶
In this section, the user will create the DataTable
used to store the results and configure its header.
First, the user will drag a CreateDataTable activity to the sequence inside the Matches activity.

Now, the user must create the variable in which the DataTable
will be saved inside the New DataTable variable placeholder. In this example, the variable is named invoiceDataTable
.
Note
Press Ctrl+K
to automatically create the variable when entering it upon an input field. Otherwise, the user can create it manually by clicking the Variables box under the bottom part of the screen. Use the right-hand side to enter the value which will be assigned to the variable.
The user must also define its headers inside the Array of DataTable columns placeholder. Since, in this example only three fields from the invoice are captured, namely Company Name
, Invoice Number
and Total Balance
, the header will be defined as {"Company Name", "Invoice Number" and "Total Balance"}
.

Note
A DataTable object
corresponds to one table of in-memory data contained in a DataSet object
from the class equally named. When you read an Excel file
, it is automatically assigned to a DataSet
class, and all the Sheets
are saved into DataTable
classes - number of sheets inside the Excel file
. Here it is reminded that DataTable
objects are case sensitive.
3.10.9.4. Add row to DataTable¶
Here the user will add the data gathered from the PDF file
into the DataTable
defined in the previous section.
First, drag an AddDataRow activity into the sequence inserted inside the Matches activity.

Now, the user must insert the DataTable
to which the data will be inserted to inside the DataTable to insert to placeholder.
The user must also define the data that will be inserted.
The Company Name
is the Match object
of no. 1 inside the invoiceResults
list. It will be assigned as invoiceResults(0).ToString
.
The invoiceNumber
is the Match object
of no. 2 inside the invoiceResults
list. It will be assigned as invoiceResults(2).ToString
.
The invoiceTotalBalance
is the Match object
of no. 3 inside the invoiceResults
list. It will be assigned as invoiceResults(44).ToString
.
Therefore, the row which will be added inside the Array of DataTable columns placeholder is {invoiceResults(0).ToString, invoiceResults(2).ToString, invoiceResults(44).ToString}
. It is shown below.

3.10.9.5. Save DataTable into CSV¶
The user will now save the DataTable
created in a CSV file.
First, drag a WriteCSV file into the main sequence.

Now, click the ...
button to insert the filepath
of the CSV file, which the data will be saved to - in this example, invoice1.csv
.
Then, insert the DataTable
, which was captured into the DataTable
inside its Properties box. In this example, this variable is the DataTable
defined in the previous section - i.e., invoiceDataTable
.
Finally, change the Delimiter
parameter to ","
.
3.10.9.6. Workflow Finished¶
A CSV file
is generated, which can be opened on Excel application or Notepad.

3.10.10. OpenRPA.Database Activities, DataTable, DataView¶
In this example, the user will create a Workflow that reads a .csv
dataset from AirBnB data and inserts the data into a MySQL
database. We’ll also use a shortened version of the listings.csv
Amsterdam’s data set file, available at Inside AirBnB (http://insideairbnb.com/get-the-data.html
). Our version, containing only 169 entries, is available here (https://github.com/open-rpa/examples-files/raw/master/bpa-doc/parse_pdf/invoice1.csv
) and is the one which will be used in this Workflow example.
The authentication method with which MySQL was installed must also NOT BE encrypted, ie. it must be set as legacy mode
since the DataProvider MySql.Data.MySqlClient
is used for connecting to the database.
Attention: this is a very complex example and the user is expected to know about database Schemas
and have a proper MySQL server
running. But do not be afraid! You can still learn a lot by just looking at the example, even if you do not try to replicate all the steps by yourself.
Download CSV File
Review types from Dataset using Pandas
Read dataset from CSV into
DataTable
Create
Schema
andTable
which will hold the data insideMySQL
Create DataTable to store results
Add batch number column
Connect to Database
Fetch SQL Table to DataTable
Loop through Dataset
Incrementing Id and Batch No. variables
Adding DataRows and updating SQL Table
Executing Queries into the Data Inserted and visualizing Data
Using a DataView to filter through the Data
3.10.10.1. Download CSV File¶
In this section, the user will learn how to download a file from the internet and save it into a folder using a specific file path
.
First, drag a DownloadFile
activity and click the … button to type the file path
which will contain the dataset - in our case it is "C:\BPA\Workflow Examples\Using DataTables\airbnb_review_listings.csv"
- and click the Save button. We’ll also name the activity Download Dataset
. In our case, this file path
is "C:\BPA\Workflow Examples\Using DataTables\airbnb_review_listings.csv"
.
Also insert the URL
from which the dataset will be downloaded inside the Properties box - https://github.com/open-rpa/examples-files/raw/master/bpa-doc/parse_pdf/invoice1.csv
.
Set the Overwrite
parameter to True
as well, just in case you have already downloaded the file to the specified file path
.



Now click the Play button inside OpenRPA’s ribbon to download the file. It is also recommended that the user checks whether the file exists in the specified folder.
Note
To change the name, or DisplayName
- as set inside the activity’s parameters, the user can either click twice in the name of the activity, type the desired name and press RETURN
or set the parameter DisplayName
inside the Properties box.
3.10.10.2. Review types from Dataset using Pandas¶
First, let’s take a look at the types which the dataset contains by using the pandas
library - or Python Data Analysis Library.
Initialize a Python shell - here we assume you already have Python and the pandas
library installed. If you do not have it installed, you can use the Colab Platform (https://colab.research.google.com/) created by Google, yet you must upload the file to the Files
sidebar and use the relative path
- ie. ./airbnb_review_listings.csv
instead of the file path
set in the previous section, which in our case is "C:\BPA\Workflow Examples\Using DataTables\airbnb_review_listings.csv"
.
Remember to add the escape character - \
, since we’re using a shell! This leads the filepath
to point to "C:\\BPA\Workflow Examples\\Using DataTables\\airbnb_review_listings.csv"
.
Execute the following code:
>>> import pandas as pd
>>> df = pd.read_csv("C:\\BPA\Workflow Examples\\Using DataTables\\airbnb_review_listings.csv")
>>> len(df.dtypes)
>>> df.dtypes
This will show all the types contained inside the dataset. As seen in the code snippet below.
>>> len(df.dtypes)
16
>>> df.dtypes
id int64
name object
host_id int64
host_name object
neighbourhood_group float64
neighbourhood object
latitude float64
longitude float64
room_type object
price int64
minimum_nights int64
number_of_reviews int64
last_review object
reviews_per_month float64
calculated_host_listings_count int64
availability_365 int64
dtype: object
This means that the dataset contains 16 features
- or variables
with many different types. Some are of type int64
, some are of type float64
and some are of type object
- the latter ones will be treated as if they were String
objects. It also means that we must create our database with different datatypes and set variables inside OpenRPA with the correct given types.
If you do not know what types are, please refer to What is a type?.
3.10.10.3. Read dataset from CSV into DataTable
¶
In this section the user will learn how to read the .csv
file into a DataTable
Now the user must drag a ReadExcel activity into the Designer and select the file path
of the .csv
file with the ...
button or by directly pasting it into the Filename
parameter inside the Properties box.
Along with the previously set parameter, the user must also set the DataTable
to which the .csv
file will be read into - in our case it is amsterdamdt
. As well as the Delimiter
- which defines the delimiter for the .csv
file, in our case it is the ","
character.
Note
Press Ctrl+K
to automatically create the variable when entering it upon an input field. Otherwise, the user can create it manually by clicking the Variables box under the bottom part of the screen. Use the right-hand side to enter the value which will be assigned to the variable.


Note
In OpenRPA, a DataTable
corresponds to a 2-dimensional non-serializable object used to hold values. Think of it as a matrix with i
rows and j
columns. The i
rows are accessible by using the .Rows(n)
attribute, where n
is the number of the row - starting from 0 - which you want to access. The j
columns are accessible by using the .Item(n)
attribute, where n
is the number of the column - starting from 0 - which you want to access. It is useful to remind here that the user must have accessed the Rows
attribute, therefore, if the user wanted to access the 2nd column on the 3rd row of the data table they would use .Rows(2).Item(1)
attribute.
Note
In the .NET API, a DataTable object
corresponds to one table of in-memory data contained in a DataSet object
from the class equally named. When you read an Excel file
, it is automatically assigned to a DataSet
class and all the Sheets
are saved into DataTable
classes - numbered from 0 to the quantity of sheets inside the Excel file
. Here it is reminded that DataTable
objects are case sensitive.
3.10.10.4. Create Schema
and Table
which will hold the data inside MySQL
¶
In this section, the user creates the database
and table
which will hold the data by using MySQL Workbench.
Copy and paste the following code section into a new query inside MySQL Workbench.
CREATE DATABASE `using_datatables` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
CREATE TABLE using_datatables.`airbnbdata` (
`id` int NOT NULL AUTO_INCREMENT,
`datasetId` bigint DEFAULT NULL,
`placeName` varchar(255) NOT NULL,
`hostId` bigint DEFAULT NULL,
`hostName` varchar(255) DEFAULT NULL,
`neighbourhoodGroup` varchar(255) DEFAULT NULL,
`neighbourhood` varchar(255) DEFAULT NULL,
`latitude` double DEFAULT NULL,
`longitude` double DEFAULT NULL,
`room_type` varchar(255) DEFAULT NULL,
`price` bigint DEFAULT NULL,
`minimum_nights` bigint DEFAULT NULL,
`number_of_reviews` bigint DEFAULT NULL,
`last_review` varchar(255) DEFAULT NULL,
`reviews_per_month` double DEFAULT NULL,
`calculated_host_listings_count` bigint DEFAULT NULL,
`availability_365` bigint DEFAULT NULL,
PRIMARY KEY (`id`)
);
Note
Here you can notice that the features of type object
inside our dataset is going to be set as varchar(255)
- which is mapped from the type System.Data.String
inside OpenRPA. That also occurs with bigint
, which is mapped from the System.Data.Double
datatype.
Now click the Execute query
button inside the query panel.

If everything goes well, MySQL Workbench should show a message in the Action Output
section exactly as below.

That’s it! Now the user is ready to continue.
3.10.10.5. Create DataTable to store results¶
In this section, the user will create the DataTable
used to store the results and configure its header.
First, drag a CreateDataTable activity to the main sequence.

Now, create the variable in which the DataTable
will be saved inside the New DataTable variable placeholder. In this example, the variable is named sqldt
.
Note
Press Ctrl+K
to automatically create the variable when entering it upon an input field. Otherwise, the user can create it manually by clicking the Variables box under the bottom part of the screen. Use the right-hand side to enter the value which will be assigned to the variable.
The user must also define its headers inside the field containing the Array of DataTable columns placeholder. All of our datasets features
will be added to the DataTable
object, along with the default int
datatype, which is the Primary Key
and was defined by us in the previous section. Henceforth, our header must be set as {"id", "name", "host_id", "host_name", "neighbourhood_group", "neighbourhood", "latitude", "longitude", "room_type", "price", "minimum_nights", "number_of_reviews", "last_review", "reviews_per_month", "calculated_host_listings_count", "availability_365"}
.
The purpose of this DataTable
is to save all the data gathered from the .csv
file and then later use a DataView
to filter through and exhibit the data gathered from it.

3.10.10.6. Add Batch No. Column¶
In this section, the user will learn how to add a data column to a DataTable
containing the current index of the entry being processed by using the AddDataColumn activity and also how to alter a table using MySQL Workbench.
First, drag an AddDataColumn activity into the main sequence. This one will add the batch_no
which corresponds to the index of the entry currently being processed.
Insert sqldt
inside the DataTable
placeholder.
Insert batch_no
inside the New columns name
placeholder.
Select its datatype inside the dropdown as System.Data.Int64
by using the Browse for types...
option.

Now we must alter the SQL Table
so it will also contain the BIGINT
feature batch_no
.
Click with the right mouse button inside the airbnbdata SQL Table
within MySQL Workbench and then click the Alter Table...
button.

This will open a new tab, containing all settings about the airbnbdata SQL Table
which allows us to add a new column. First, we must scroll down until the end of the features inside the SQL Table
and click twice in the empty field.

Right below Column Name
and type batch_no
into it. Then double click the empty field right below Datatype
and type BIGINT
. Also click the NN
checkbox, which will make sure this field is never NULL
.

Now click the Apply
button. A page where you can review the changes - ie. the actual SQL query
done - appears. Then click Execute
.


That’s it! The user has now successfully added the batch_no
both to the DataTable
object which will initially hold the data and the SQL Table
.
3.10.10.7. Connect to Database¶
In this section, the user will learn how to set up a MySQL connection to the database which was created in previous sections.
First, drag a Sequence activity to the main sequence so we can modularize our workflow and change its name to Connect to Database
.

Note
To change the name, or DisplayName
- as set inside the activity’s parameters, the user can either click twice in the name of the activity, type the desired name and press RETURN
or set the parameter DisplayName
inside the Properties box.
Now drag a Database Scope activity to the Connect to Database
sequence. We must set its parameters manually since MySQL is used.
First, set ConnectionString
as "Server=localhost;Port=3306;Database=using_datatables;Uid=${USERNAME};Pwd='${PASSWORD}';"
. where ${USERNAME}
is the username set for the database - it must also have access to write to the given database - and ${PASSWORD}
is the password for the given username.
Then, set the DataProvider
, which in our case is “MySql.Data.MySqlClient”
Now finally set the DataSource
, which is "using_datatables"
. This is the database or schema
which we created in Create Schema and Table which will hold the data inside MySQL.
Now, the connection is successfully set up!

3.10.10.8. Fetch SQL Table to DataTable¶
In this section, the user will learn how to fetch an existing SQL Table
into a DataTable
.
First, drag an Execute Query Activity into the Start Database Connection
sequence.
Insert "select * from airbnbdata;"
into the edit field The query to execute
. This is the SQL Query
which will be executed to fetch all the data. Notice that the statement consists of a simple select
, but this query can get as complex as it is needed.
Insert sqlrawdt
into the edit the field The DataTable to save result into
. This is the DataTable
object where data will be saved.
The purpose of this DataTable
sqlrawdt
is to hold data that will be modified and then committed to the SQL Table
later on. When running the querying
Activities in OpenRPA, the resulting object is a DataView
, which is not connected to the SQL Table
at all - So by manipulating sqlrawdt
, with the results from many queries, at the later stages we can commit all the changes at once by using the Update from DataTable Activity.

3.10.10.9. Loop through Dataset¶
In this section, the user will learn how to loop through the dataset
gathered, parse the data into the proper data types and use the If Activity to assign a default value to abnormal entries contained inside the dataset. Finally, the user will add the rows both to sqldt
and sqlrawdt
. At the end of this section, a reference table is found for indexing the given dataset features
along with its data types
.
First, drag a Foreach DataRow activity into the sequence inside the Database Scope Activity. Inside the field containing the Enter a VB Expression
, insert amsterdamdt
.
Similarly to the way Read Excel Workflow example reads cells from the DataTable
returned by the Read Excel activity, every feature of our dataset
must be assigned to a variable.
Here 4 types of data are dealt with: Int64
, Double
, DateTime
and String
- which correspond respectively to bigint
, double
, date
and varchar(255)
inside the SQL Table
.
For the Int64
type, the user must parse the data using the Int64.Parse
method.
An example is shown where the user must set the id_dataset
variable’s value as Int64.Parse(row.Item(0).ToString)
and also set its type as System.Data.Int64
. Go ahead and set the remaining ones! These are``host_id``, price
, minimum_nights
, number_of_reviews
, calculated_host_listings_count
and availability_365
.

For the features of type Double
, for this specific InsideAirBnB dataset, they can be either a null value (ie. variable.ToString returns “”) or a numeric value that can be properly converted by using CDbl()
.
As can be seen, an If
Activity is used to distinguish between null and valid values.
To avoid writing row.item(xx)[...]
extensively many times, some temp variable <featureNameValue>
were used.
An example is shown below, with the temp variable
set as latitudeValue
and the actual value which will be inserted into the table as latitude
. Go ahead and set the remaining ones! These are longitude
and reviews_per_month
.

For the DateTime
type, the user must also use a temp variable
to check against abnormal entries. Here the If Activity is also used as was just shown above, the only difference is the default value is arbitrarily set as New System.DateTime(2011,10,12,0,0,0)
instead of 0
.

The last type is String
. All the user has to do is find the given i-th
entry in the row and match it to the given entry inside the dataset and cast it to String
using the .ToString
method. It is useful to remind the user that OpenRPA starts indexing at 0.

The table referencing each index follows below:
`` id_dataset - Int64 - 0 place_name - String - 1 host_id - Int64 - 2 host_name - String - 3 neighbourhood_group - String - 4 neighbourhood - String - 5 latitude - Double - 6 longitude - Double - 7 room_type - String - 8 price - Int64 - 9 minimum_nights - Int64 - 10 number_of_reviews - Int64 - 11 last_review - DateTime - 12 reviews_per_month - Double - 13 calculated_host_listings_count - Int64 - 14 availability_365 - Int64 - 15 ``
Note
In OpenRPA, a DataTable
corresponds to a 2-dimensional non-serializable object used to hold values. Think of it as a matrix with i
rows and j
columns. The i
rows are accessible by using the .Rows(n)
attribute, where n
is the number of the row - starting from 0 - which you want to access. The j
columns are accessible by using the .Item(n)
attribute, where n
is the number of the column - starting from 0 - which you want to access. It is useful to remind here that the user must have accessed the Rows
attribute, therefore, if the user wanted to access the 2nd column on the 3rd row of the data table they would use .Rows(2).Item(1)
attribute.
Note
In the .NET API, a DataTable object
corresponds to one table of in-memory data contained in a DataSet object
from the class equally named. When you read an Excel file
, it is automatically assigned to a DataSet
class and all the Sheets
are saved into DataTable
classes - numbered from 0 to the number of sheets inside the Excel file
. Here it is reminded that DataTable
objects are case sensitive.
3.10.10.10. Incrementing Id and Batch No. variables¶
In this section, the user will use the Assign Activity to increment the variables id
and batch_no
, as shown below.
First, drag an Assign Activity into the end of the Data Processing Logic
sequence.
Assign id
to id + 1
.
Drag another Assign Activity into the end of the Data Processing Logic
sequence.
Assign batch_no
to batch_no + 1
.

3.10.10.11. Adding DataRows and updating SQL Table¶
In this section, the user will insert the acquired values into the two DataTables
; sqldt
: used to filter through and exhibit the values - and sqlrawdt
: used to update the SQL Table
and commit the changes by using the Update from DataTable Activity.
First, drag an AddDataRow Activity into the end of the Data Processing Logic
sequence.
Insert sqldt
in the field containing the DataTable to insert into
.
Insert {id, id_dataset, place_name, host_id, host_name, neighbourhood_group, neighbourhood, latitude, longitude, room_type, price, minimum_nights, number_of_reviews, last_review, reviews_per_month, calculated_host_listings_count, availability_365, batch_no}
inside the field containing the Array of DataTable columns
.
Again, drag another AddDataRow Activity into the end of the Data Processing Logic
sequence.
Insert sqlrawdt
in the field containing the DataTable to insert into
.
Insert {id, id_dataset, place_name, host_id, host_name, neighbourhood_group, neighbourhood, latitude, longitude, room_type, price, minimum_nights, number_of_reviews, last_review, reviews_per_month, calculated_host_listings_count, availability_365, batch_no}
in the field containing the Array of DataTable columns
.

Drag an Update from DataTable Activity into the Database Scope
sequence.
Insert "airbnbdata"
inside the TableName
input field - ie. the one containing the Table to insert rows into
.
Insert sqlrawdt
inside the DataTable
input field - ie. the one containing the The DataTable to save result into
.

Drag a WriteLine into the end of the sequence and insert ""Successfully added data into MySQL DB. Number of rows added: " + result.ToString"
into the Text
field, ie. the one containing the VB Expression
.
3.10.10.12. Executing Queries into the Data Inserted and visualizing Data¶
In this section, the user will learn how to use the querying activities to work with data inserted into the SQL Table
.
First, drag an Execute Non Query activity into the Database Scope
sequence. This activity simply executes a SQL Query
and saves the number of rows affected into an Int32
variable.
Here the user will delete the row of an arbitrary entry - ie. 217
- and save the resulting value of the operation into the return217
variable.
Insert "DELETE from using_datatables.airbnbdata WHERE id = 217;"
inside the Query
field, ie. the one containing the Query to execute
. This will delete the entry containing id
no. 217. Save its result into a variable called return217
by entering its name inside the Result
property in the Activity’s Property Box and pressing Ctrl+K
. If it properly deletes the row, it should return an Int32
variable containing the value 1
.
Now, drag an Execute Query activity into the Database Scope
sequence.
Insert “SELECT * FROM using_datatables.airbnbdata;” inside the Query
field, ie. the one containing the Query to execute
and also insert resultsDT
into the DataTable
field, ie. the one containing the The DataTable to save result into
and press Ctrl+K
to create it. This will select all entries from the airbnbdata SQL Table
and save it to the resultsDT DataTable
.

Here the user will acquire the place_name
of an arbitrary entry - ie. 213
- and save it to a variable named place_name_value
.
Now, drag an Execute Scalar<> activity into the Database Scope
sequence. A window will open where the user can select the type which will be returned by the query
, in our case it is a String
. Also insert "SELECT place_name FROM using_datatables.airbnbdata WHERE id = 213;"
into the Query
field, ie. the one containing the Query to execute
, and also enter place_name_value
into the Result
field, ie. the one containing the The result of the query
. This query will select the place_name
value from the entry containing id
no. 213
and save it into the place_name_value
variable.


Now the user will visualize the data inserted.
Since the first value - return217
- is a number containing the number of rows affected and the query being run is expected to affect a single row, the user can check if its value is equal to 1
by using an If Activity and then write data to the output, depending on whether or not the goal was achieved.
Drag an If Activity into the Database Scope
sequence. Inside the Condition
input field, ie. the one containing the VB Expression
, insert return217 = 1
.
Drag a WriteLine Activity into the Then
sequence inside the If Activity and insert "Successfully deleted row no. 217"
into the Text
field, ie. the one containing the Enter a VB Expression
.
Now, drag a WriteLine Activity into the Else
sequence inside the If Activity and insert "Unable to delete row no. 217"
into the Text
field, ie. the one containing the Enter a VB Expression
placeholder. This will only happen if the Activity wasn’t able to delete the row containing the id
equal to 217
.
Drag a WriteLine Activity into the end of the Database Scope
sequence. Insert "place_name of row no. 178: " + resultsDT.Rows(178).Item(2).ToString
into the Text
field, ie. the one containing the Enter a VB Expression
placeholder. This will show the place_name
value of the 178-ith
row of the table gathered with the Execute Query Activity.
Finally, drag another WriteLine Activity into the end of the Database Scope
sequence. Insert "place_name of row no. 213" + place_name_value
. This will show the value gathered from the query executed with the Execute Scalar<> Activity.

3.10.10.13. Using a DataView to filter through the Data¶
Now the user will use a DataView
type to filter through the data.
First, drag an Assign Activity into the outermost sequence and assign sqldtview
to sqldt.DefaultView
. Also set its type as System.Data.DataView
, so OpenRPA will be able to filter through it.

Now, drag another Assign Activity into the outermost sequence and assign sqldtview.RowFilter
to "id > 162". This will filter the ``sqldt DataTable
to only acquire values upon which the id
is greater than 162.

Now, drag a Foreach DataRow Activity so we can filter through the data. Insert sqldtview
as DataView
in the Properties Box.

Finally, add a WriteLine Activity into the Then
sequence and insert "Place name of row " + row.Item(0).ToString + " is: " + row.Item(2).ToString
to exhibit the place_name
value of the given row.

3.11. OpenRPA - FAQ¶
3.11.1. Activities¶
Here pertain questions related to using Activities inside OpenRPA.
3.11.1.1. How to check that an Element
exists?¶
First, users need to change the MinResults
parameter of the GetElement
Activity to 0
.
Then, they must set the variable for the Elements
or Result
parameter - depending on the GetElement
Activity which is being used.
Then, they must add an If
Activity to the outermost - or main - Sequence. If the users have defined the variable for the Elements
or Result
parameter as item
, they would check against the item.Length = 0
- or item.Length <> 0
, provided they would want to check for the non-existence of an Element
3.11.1.2. How to return the content of the Execute Script
Activity¶
The users can define a Result
variable inside the parameter of same name so the last expression evaluated will be returned as a String
object. Please refer to the Execute Script Activity for more information.
3.11.1.3. How to change the email status and get the senders email address when using the Get Mails Activity?¶
Users can change the email status
by assining the item.UnRead
parameter to True
or False
.
They can also fetch the SenderEmailAddress
parameter by assigning it to a variable.
3.11.1.4. Is it possible to import custom NuGet packages?¶
Yes, from OpenRPA v1.1.1 (https://github.com/open-rpa/openrpa/releases/tag/1.1.1
) it is now possible to import custom NuGet packages into OpenRPA’s namespace.
3.11.1.5. How to consume the password which is stored as a SecureString (https://docs.microsoft.com/en-us/dotnet/api/system.security.securestring?view=netcore-3.1
) inside OpenFlow and convert it for use inside OpenRPA?¶
Users can assign the SecureString
captured with the GetCredentials
Activity to a System.Net.NetworkCredential(string.Empty, securePassword).Password
. Here, string.Empty
is the variable which has been captured as the Password
parameter inside the above-mentioned Activity.
Else, users acquire it by using Unsecure Password
parameter. Yet this is a rather insecure method.
3.11.1.6. How to map an argument
which was captured from another Workflow inside OpenRPA with the Invoke OpenRPA
Activity?¶
Users can use the Map Argument
button to map it to an argument which was previously created inside OpenRPA to store that avlue.
3.11.2. Variables & Arguments¶
Here pertain questions related on how to use Variables & Arguments inside OpenRPA.
3.11.2.1. How to return a variable or argument to Node-RED¶
Variables are enclosed to the local scope of the Workflow therefore they CAN NOT be passed into Node-RED.
Arguments, on the other hand, are passed as part of the msg
object. So, for example, if the users have defined a name
argument, they would assign msg.payload.name
to msg.name
by using a function
node.
Users will find a handful example in the REST Service (integration with Node-RED) section.
3.11.3. Selectors¶
Here pertain questions related to using Selectors inside OpenRPA.
3.11.3.1. How to use other types of selectors in NM?¶
Besides the usual XPath Selector
, users can define a CSS Selector
by using the cssselector
parameter inside a GetElement
Activity.
Please refer to Using CSS Selectors for more information.