UiPath StudioX

The UiPath StudioX Guide

Automation Basics

About Activities

Activities are the basic building blocks of an automation project, each representing one or more manual tasks that StudioX can automate. A sequence of related, interconnected activities makes up an automation project. When you consider automating a repetitive process, you must first break down that process into each of the individual manual steps you take, and then identify the activities in StudioX that automate each of those steps.

For example, let’s say that you want to automate the following workflow:

  1. Open a spreadsheet.
  2. Open a business application
  3. Copy the data from a cell in the spreadsheet.
  4. Paste the copied data into a field in a business application.
  5. Click a button in the application to submit the data.

When you create a project in StudioX to automate that process, you use the following activities:

  1. Use Excel File to tell StudioX which spreadsheet you want to use.
  2. Use Application/Browser to tell StudioX which application you want to use.
  3. Type Into to select the input field in the business application where to copy the data as well as the cell from which you want to copy the data.
  4. Click to tell StudioX which button to click to submit the data in the business application.

There isn’t always a one-to-one relationship between a manual step and a StudioX activity. As you can see in the above example, the Type Into activity covers two manual steps because you use it to indicate both the source and the destination of the copied text.

Container Activities

Container activities define a scope or the conditions to be met for the execution of the activities added inside them. The following activities act as containers for other activities:

  • Resource activities - Add an application resource to the automation and make that resource available to the activities added inside them.
  • For Each activities - Define a collection of items and repeat the activities added inside them once for each of those items.
  • Repeat number of times - Similar to a For Each, but it repeats the activities added inside it for a specified number of times.
  • If, Switch, and Check App State - Evaluate a condition and determine the flow of the automation by executing specific activities added inside them based on the result of the evaluation.
  • Download File - Detects a file download initiated by the activities added inside it and makes the file available in the automation.

Application Resources

Activities are grouped into categories based on the application they apply to. Before you can automate tasks you perform in an application, you must first add the required application resource to the automation. The following activities add resources to your automations:

  • Use Excel File - Use a specified Excel file. The data in the Excel file is available to all the activities added inside this activity. When you configure child activities, you can select individual cells, ranges, or sheets in the file directly from StudioX.
  • Use Outlook Account - Use a specified Outlook account. The emails in the Outlook account are available to all the activities added inside this activity. When you configure child activities, you can select individual folders, messages, or message fields directly from StudioX.
  • Use Word File - Use a specified Word document. Add the activities to perform on the file inside this activity.
  • Use Application/Browser - Use a specified desktop application or web browser page. Add the activities to perform in the application or web browser inside this activity.

You can add as many resources as your automation requires. For activities that use more than one application, add the resources one inside the other. For example:

  • To add activities that use both data from an Excel file and emails from an Outlook account, add a Use Excel File activity inside a Use Outlook Account activity, and then add the common activities inside Use Excel File.
  • To add activities that use both data from a web page and a Word document, add a Use Application/Browser activity inside a Use Word File activity, and then add the common activities inside Use Application/Browser.

Iterating through Items

Iterating refers to repeating one or more activities in your automation project for each individual item in a collection of items. To iterate through items, add one of the available For Each activities in which you define the collection, and then add the activities to repeat inside the For Each. When you configure the activities to repeat, indicate that an activity should use data from each item in the iteration by selecting the current item option from the Plus plus buttonplus button menu.
StudioX comes with the following For Each activities:

  • Excel For Each Row - Repeat one or more activities for each row in an Excel table, range, or sheet.
    The current item option is CurrentRow. For some activities, you must also select which column to use from the current row.
  • For Each Email - Repeat one or more activities for each message in an Outlook folder or in a selection of messages.
    The current item option is CurrentMail. For some activities, you must also select which field to use from the current mail: Subject, Body, Bcc, Cc, To, From, or Priority.
  • For Each File In Folder - Repeat one or more activities for each file in a folder on your computer.
    The current item option is CurrentFile. You must also select which file property to use from the current file: Size, Name, Full Path, Folder, Last modified date, Last accessed date, Created date, IsReadOnly, or Size in KB.

To make it easier to identify when configuring activities added inside a For Each, you can rename the current item option using a name that describes the items you are iterating through.

Configuring the Data Used by Activities

Activities can receive data as input and, upon execution, they can generate output data. You configure the data for each activity using the Plus plus buttonplus button menu available on the right side of data fields.

Depending on its purpose, an activity can have no data fields, one, or multiple data fields. The following information describes the options you can find in the Plus plus buttonplus button menu. Because the menu displays options that are relevant in the context of each field, activity, and parent activity, only a subset of the options is available for each field.

Options for Input Fields

Input fields define the data received by an activity using the following options:

  • Data from resources added to the project:
    • Excel - Data from the Project Notebook or from an Excel file defined for a parent Use Excel File activity. Select named cells, named ranges, tables, or sheets directly from the Plus plus buttonplus button menu, or select Indicate in Excel to open the workbook in Excel and indicate in it. Selecting Custom Input lets you manually enter sheet names, table names, cell addresses, or range addresses. If the activity is inside an Excel For Each Row activity, you can select the current row in the iteration.
    • Outlook - Data from an Outlook account defined for a parent Use Outlook Account activity. You can use the message selected in Outlook when the project is executed or, if the activity is inside a For Each Email activity, the current email in the iteration.
    • File - If the activity is inside a For Each File in Folder activity, you can use properties of the current file in the iteration.
  • Text - Enter text using the built-in text builder. You can click Plus plus buttonplus button inside the Text Builder to add Excel data, Outlook data, or values you saved for later use to the text.
  • Number - Enter numeric values.
  • Condition Builder - Add conditional statements that are used to determine what activities to execute based on whether or not the conditions are met. For example, the If activity contains a condition field, and it executes a series of activities if the condition is met and, optionally, another set of activities if the condition is not met.
    You create a conditional statement by selecting two values and comparing them using one of the available operators: greater than, greater than or equal, less than, less than or equal, equal to, not equal to, is empty, is not empty, is true, is false, starts with, ends with, contains, is numeric, is not numeric.
    You can add multiple statements and select if all of the statements or any of the statements must be true for the condition to be met.
  • Use Saved Value - Use the output of another activity that you saved for later use in the project as input for the current field.
  • Choose Date/Time - Select a date from the calendar or a time (hour, minute). This option is available for date and time fields.
  • Choose Duration - Select a duration (hours, minutes, and seconds). This option is available for duration fields.
  • Ask when run - Prompt for a value during project execution, This option is available for fields that accept text, numeric, date/time, or Boolean (True/False) values.
  • Open in Advanced Editor - Enter VB expressions.
  • Clear Value - Clear the current selection in the field.

Options for Output Fields

Output fields define what to do with the data generated by an activity using the following options:

  • Excel - Save output to the Project Notebook or an Excel file defined for a parent Use Excel File activity. Select named cells, named ranges, tables, or sheets directly from the Plus plus buttonplus button menu, or select Indicate in Excel to open the workbook in Excel and indicate in it. Selecting Custom Input lets you manually enter sheet names, table names, cell addresses, or range addresses. If the activity is inside an Excel For Each Row activity, you can select the current row in the iteration.
  • Save for Later Use - Save the output for later use in your automation and enter a name by which to refer to it in the project. The saved value can then be selected as input in another activity.
  • Rename Saved Value - Rename a value you saved for later use.
  • Open in Advanced Editor - Enter VB expressions.
  • Clear Value - Clear the current selection in the field.

Using the Output of an Activity as Input for Another Activity

Passing data from one activity to another can be very useful, even essential when trying to achieve certain workflows. StudioX enables you to save the output generated by an activity, and then use it as input in other activities later in the project:

  1. To save data for use in other activities, select the Save for Later Use option in the Plus plus buttonplus button menu of a field that configures the output data of an activity, and enter a name for the saved value. You will use this name later to identify and select the value as input in another activity, so make sure to use a unique name that describes the saved value.
  2. To use the saved data as input for another activity later in the project, select the value from the Use Saved Value option in the Plus plus buttonplus button menu of a field that configures the input data of an activity.

There are various scenarios in which this feature can be useful. Here are a couple of examples:

  • A Read Text File activity reads and outputs the contents of a text file which can then be used as the input for an Append Text activity to add the text to a Word file.
  • A File Exists activity checks whether a file exists and outputs the result (True or False) which can then be used in the condition of an If activity to determine specific actions to perform when the file already exists.

Running Your Automations

We recommend running your automations frequently during the design stage. This enables you to verify that the project works as expected and lets you identify potential errors early.

To run an automation, click Run in the StudioX ribbon or press F5 on your keyboard.

You can stop project execution by clicking Stop in the ribbon or pressing F5 on your keyboard. After the project is executed, a message displayed at the top of the Designer panel informs you if the run was successful or not.

To run only parts of your project, right-click any activity and select:

  • Run to this Activity to execute all the activities in the project before the activity.
  • Run from this Activity to execute all the activities in the project starting with the activity.

Running in Picture-in-Picture (Experimental)

If you want to use your computer during project execution without interference from the Robot, you can run your automation in picture-in-picture mode. This executes the project in another session opened in a separate window, leaving you in full control of the keyboard, mouse, and screen. The first time you select to run an automation in picture-in-picture, you are prompted to activate this feature.

To run an automation in picture-in-picture, click the arrow next to Run in the StudioX ribbon, and then select Run in PiP (Experimental). Alternatively, you can press F6 on your keyboard. The Robot starts executing the activities in the project in a new window.

Updated 2 months ago


Automation Basics


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.