studio
2023.10
false
- Release Notes
- Getting Started
- Setup and Configuration
- Automation Projects
- Dependencies
- Types of Workflows
- File Comparison
- Automation Best Practices
- Source Control Integration
- Debugging
- The Diagnostic Tool
- Workflow Analyzer
- About Workflow Analyzer
- ST-NMG-001 - Variables Naming Convention
- ST-NMG-002 - Arguments Naming Convention
- ST-NMG-004 - Display Name Duplication
- ST-NMG-005 - Variable Overrides Variable
- ST-NMG-006 - Variable Overrides Argument
- ST-NMG-008 - Variable Length Exceeded
- ST-NMG-009 - Prefix Datatable Variables
- ST-NMG-011 - Prefix Datatable Arguments
- ST-NMG-012 - Argument Default Values
- ST-NMG-016 - Argument Length Exceeded
- ST-DBP-002 - High Arguments Count
- ST-DBP-003 - Empty Catch Block
- ST-DBP-007 - Multiple Flowchart Layers
- ST-DBP-020 - Undefined Output Properties
- ST-DBP-021 - Hardcoded Timeout
- ST-DBP-023 - Empty Workflow
- ST-DBP-024 - Persistence Activity Check
- ST-DBP-025 - Variables Serialization Prerequisite
- ST-DBP-026 - Delay Activity Usage
- ST-DBP-027 - Persistence Best Practice
- ST-DBP-028 - Arguments Serialization Prerequisite
- ST-USG-005 - Hardcoded Activity Arguments
- ST-USG-009 - Unused Variables
- ST-USG-010 - Unused Dependencies
- ST-USG-014 - Package Restrictions
- ST-USG-020 - Minimum Log Messages
- ST-USG-024 - Unused Saved for Later
- ST-USG-025 - Saved Value Misuse
- ST-USG-026 - Activity Restrictions
- ST-USG-027 - Required Packages
- ST-USG-028 - Restrict Invoke File Templates
- ST-USG-032 - Required Tags
- ST-USG-034 - Automation Hub URL
- Variables
- Arguments
- Imported Namespaces
- Coded automations
- Trigger-based Attended Automation
- Recording
- UI Elements
- Control Flow
- Selectors
- Object Repository
- Data Scraping
- Image and Text Automation
- Citrix Technologies Automation
- RDP Automation
- Salesforce Automation
- SAP Automation
- VMware Horizon Automation
- Logging
- The ScreenScrapeJavaSupport Tool
- The WebDriver Protocol
- Studio testing
- Extensions
- About extensions
- SetupExtensions tool
- UiPathRemoteRuntime.exe is not running in the remote session
- UiPath Remote Runtime blocks Citrix session from being closed
- UiPath Remote Runtime causes memory leak
- UiPath.UIAutomation.Activities package and UiPath Remote Runtime versions mismatch
- The required UiPath extension is not installed on the remote machine
- Screen resolution settings
- Group Policies
- Cannot communicate with the browser
- Chrome extension is removed automatically
- The extension may have been corrupted
- Check if the extension for Chrome is installed and enabled
- Check if ChromeNativeMessaging.exe is running
- Check if ComSpec variable is defined correctly
- Enable access to file URLs and Incognito mode
- Multiple browser profiles
- Group Policy conflict
- Known issues specific to MV3 extensions
- List of extensions for Chrome
- Chrome Extension on Mac
- Group Policies
- Cannot communicate with the browser
- Edge extension is removed automatically
- The extension may have been corrupted
- Check if the Extension for Microsoft Edge is installed and enabled
- Check if ChromeNativeMessaging.exe is running
- Check if ComSpec variable is defined correctly
- Enable access to file URLs and InPrivate mode
- Multiple browser profiles
- Group Policy conflict
- Known issues specific to MV3 extensions
- List of extensions for Edge
- Extension for VMware Horizon
- SAP Solution Manager plugin
- Excel Add-in
- Troubleshooting

Studio User Guide
Last updated Sep 3, 2025
Integrating OpenAI with Coded Workflows
linkThis tutorial guides you through the process of automating the retrieval of the description of UiPath's Wikipedia article
and then sending it to OpenAI’s Chat GPT to make it longer.
Prerequisites
- UiPath Chrome Extension
- UiAutomation.Activities 23.10
- Lofcz.Forks.OpenAI 1.8.3
- Create a Coded workflow by selecting New, and then Coded Workflow from the File group.
- Create an API key for your OpenAI and save it. Add the API key as a system environment variable. Restart your machine to ensure that the changes are saved.
- In Studio, before the Execute method, create a private static readonly string to retrieve the OpenAI API key from your system environment variables using the following code:
private static readonly string OpenAiApiKey = Environment.GetEnvironmentVariable("OPEN_AI_API_KEY");
private static readonly string OpenAiApiKey = Environment.GetEnvironmentVariable("OPEN_AI_API_KEY");Note: Make sure that the name of the variable from the OpenAiApiKey method is the same as the one you added to your system environment. - Retrieve the UI elements that you need to automate from Wikipedia. Go to the Object Repository tab and create an application named Wikipedia.
- Create two screens for the Wikipedia application:
- WikiMainScreen – the landing page where you perform the search. For this screen create two elements:
- SearchBar
- SearchButton
- UiPathWikiPage – the resulting Wikipedia article about UiPath. For this screen, create the UiPathDescription element, which indicates the first paragraph in the article.
- WikiMainScreen – the landing page where you perform the search. For this screen create two elements:
-
Use the UiAutomation service, along with the Open coded automation API, to open the Wikipedia landing page using
the following code:
var wikiScreen= uiAutomation.Open(ObjectRepository.Descriptors.WikiMainScreen);
var wikiScreen= uiAutomation.Open(ObjectRepository.Descriptors.WikiMainScreen); -
Search for UiPath in the Wikipedia search, using the Type Into coded automation API.
wikiScreen.TypeInto(ObjectRepository.Descriptors.WikiMainScreen.SearchBar, "UiPath");
wikiScreen.TypeInto(ObjectRepository.Descriptors.WikiMainScreen.SearchBar, "UiPath"); -
Click the search button to perform the search, using the Click coded automation API.
wikiScreen.Click(ObjectRepository.Descriptors.WikiMainScreen.SearchButton);
wikiScreen.Click(ObjectRepository.Descriptors.WikiMainScreen.SearchButton); -
Get the description about UiPath from the Wikipedia article, using the Attach and
Get Text coded automation APIs. The Attach coded automation API behaves
similarly to the Use Application/Browser activity, allowing you to focus on an already
open Application/Browser and automate it. Use the following code:
var uipathWikiPage = uiAutomation.Attach(ObjectRepository.Descriptors.UiPathWikiPage); var uipathWikiDescription = uipathWikiPage.GetText(ObjectRepository.Descriptors.UiPathWikiPage.UiPathDescription); Log("This is the UiPath's wikipedia description: " + uipathWikiDescription);
var uipathWikiPage = uiAutomation.Attach(ObjectRepository.Descriptors.UiPathWikiPage); var uipathWikiDescription = uipathWikiPage.GetText(ObjectRepository.Descriptors.UiPathWikiPage.UiPathDescription); Log("This is the UiPath's wikipedia description: " + uipathWikiDescription); - Send the description to ChatGPT using your OpenAI account
- Create a variable named api to initialize your OpenAI account that you can access using the provided API key. Use the following variable:
var api = new OpenAIAPI(OpenAiApiKey);
var api = new OpenAIAPI(OpenAiApiKey); - Create a variable named chatResult, where you initialize the new chat and sent a prompt to ChatGPT. Use the following code:
var chatResult = api.Chat.CreateChatCompletionAsync("Please rewrite the following description about UiPath: '" + uipathWikiDescription + "', and make it longer").Result;
var chatResult = api.Chat.CreateChatCompletionAsync("Please rewrite the following description about UiPath: '" + uipathWikiDescription + "', and make it longer").Result;
- Create a variable named api to initialize your OpenAI account that you can access using the provided API key. Use the following variable:
- Display Chat GPT’s response inside a message box, using the following expression:
MessageBox.Show(chatResult.Choices[0].Message.Content);
MessageBox.Show(chatResult.Choices[0].Message.Content);
Sample project
linkTo follow the steps and try out the tutorial yourself, download the following sample project: Integrating OpenAI with coded workflows.