UiPath And ChatGPT Integration Method | Use Case

Here we are going to check how you can use ChatGPT with UiPath Studio. Here we are using the HTTP method to integrate both ChatGPT and UiPath Studio. At end of this, we will also provide some use cases that will help you easily understand the powerful combination. You can also refer to our previous integration with UiPath and Power Automate.

With the help of an Apis (Application Programming Interface) offered by OpenAI, ChatGPT may be implemented into UiPath Studio. The GPT-3 model may be used in various applications, including chatbots, thanks to its API.

What is UiPath?

UiPath is one of the most popular RPA(Robotic Process Automation) Tools that is used to automate tedious and repetitive tasks. It is very user-friendly and it provides a drag-and-drop method, so you can easily use those without much higher knowledge. UiPath can be used on a large range of applications such as web scraping, data entry, excel automation, and much more. To know more information you can check UiPath Studio and its installation.

What is ChatGPT

OpenAI’s ChatGPT is a strong AI language that can create human-like writing in response to a request. It has several uses, such as chatbots, automated writing, and content generation. ChatGPT’s performance may be improved by fine-tuning it to particular activities such as answering customer inquiries or creating marketing material.

Here we use this ChatGPT to integrate with our UiPath Studio. So that we can directly use it in the studio with the help of ChatGPT we will try some use cases with can automate some uipath processes. Some application of Chat GPT includes:

  • Creating human-like prose, such as essays, tales, and articles, among other things.
  • Answering inquiries, explaining things, and summarising data.
  • Text translation from one to another language.
  • Text generation in response to the user input, like a virtual assistant app or a chatbot.
  • Creating fresh material in response to a request or subject.
  • And a variety of additional activities involving the comprehension and generation of natural language text.

How to integrate UiPath and ChatGPT

Now let’s find out UiPath and ChatGPT Integration with API Keys. To integrate this, here we are using HTTP (Hypertext Transfer Protocol) method. HTTP is a technique for gaining access to information available on the WWW (World Wide Web). This protocol will be used to send data in different formats including audio, video, plain text, hypertext, etc.

1. Generate API Keys

In UiPath and ChatGPT Integration, you need to follow these steps. we will explain each step in detail so that maximum problems and errors while integrating these can be solved. In UiPath and ChatGPT Integration, you should have the following requirements:

If you have these then you can easily use UiPath and ChatGPT Integrations. Before integrating you should need an API Key. Just follow the below steps to generate API Keys:

  1. To generate the API key, Go to OpenAi API. Login or Create an account in it.
  2. Now on the right side, you can see your profile icon, Click on it and a drop-down will open. Click on “View API Keys
UiPath ChatGPT API Key Generating RPA Tutorials
Chat GPT API Key Generation
  1. Click on “Create new Secret Key” to generate a new API Key. Then copy the key.

2. Integrating API Key to UiPath Studio

Now we have to add the generated API Key to UiPath Studio. To do it just follow these steps:

  1. Open your UiPath Studio application on your system. Create a new Process or you can use your existing process.
  2. Drag and Drop a “sequence Activity“. Search for the “Assign Activity” and drag and drop his activity also.
UiPath Activities Overview - RPA Tutorials
UiPath Studio Overview
  1. Create two variables “strAPIKey ” and “strQuestion” to store our key and our question in the variables section
  1. Paste the API Key that you copied earlier, Make sure that the API Key should be in double inverted commas (” “). Store the Value in “strAPIKey 
Assign API Key in UiPath Studio RPA Tutorials
Assign API Key
  1. Now drag and drop “Input Dialog Activity“. Give Dialog Title, Input Label. and set value entered as a “strQuestion” variable which we created earlier.
Input Dialog Activity UiPath ChatGPT Integration RPA Tutorials
Dialog Box to Ask Questions
  1. You must add another “Assign Activity” to store the JSON code. Set “Str_Json_Input” as its variable name. After creating this activity add the below code in it. If you have any difficulties in this step refer below image.
@"{
" + "\n" +
      @"""model"": """",
" + "\n" +
      @"""prompt"": ""Q: "  + strQuestion + @"?\nA:"",
" + "\n" +
      @"""temperature"": 0,
" + "\n" +
      @"""max_tokens"": 1000,
" + "\n" +
      @"""top_p"": 1,
" + "\n" +
      @"""frequency_penalty"": 0.0,
" + "\n" +
      @"""presence_penalty"": 0.0,
" + "\n" +
      @"""stop"" :""\n""
" + "\n" +
      @"}"
UiPath Assign Activity -RPA Tutorials
Assign Code to Str_Json_Input
  1. Before adding the “HTTP Request” activity you have to install the appropriate activity associated with “WebAPI“. To do it click on “Manage project” and in “Project Dependencies” search for “webapi” and install it if you have not installed it.
Install WebAPI Package RPA Tutorials
UiPath and ChatGPT Integration:Installing WebAPI Package
  1. Now after installing “UiPath WebAPI Activities”, Search for “HTTP Request activity” and drag and drop it.
HTTP Request UiPath ChatGPT Integration RPA Tutorials
HTTP Request Activity
  1. Now the “HTTP Request Header” will be popped on.
  1. Add appropriate values to HTTP Request Header.
    • End Point: https://api.openai.com/v1/engines/davinci/completions
    • Preview URL: https://api.openai.com/v1/engines/davinci/completions
    • Timeout: 240000
    • Request Method: POST
    • Accept response as JSON
    • Parameters:
      • Authorization: 1.51: CSharpValue
      • Content type: “application/json”
UiPath HTTP Request Wizard -RPA Tutorials
HTTP Request Wizard
  1. To convert Str_Output(string) to Object we use “Deserialize JSON Activity“. Drag and drop this activity and set “Str_Response_Content” as input in this activity and set Output as “Str_Json_Output
Deserialize JSON - RPA Tutorials
Deserialize JSON
  1. Now Drag and Drop a new “Assign Activity” set the variable “Str_Output” and add the below code in that assign activity in UiPath Studio.
Str_Json_Output.SelectToken("$.choices.[0].text").ToString()
UiPath Assign output in UiPath and Chat GPT Integration - RPA Tutorials
Assign Str_Output
  1. Drag and Drop a “Message Box” Activity and add these values in it.
"Question: " + strQuestion.Replace("?","") + "?" +  "\n\n" + "Answer: " +   Str_Output
UiPath Message Box UiPath and ChatGPT Integration - RPA Tutorials
Message box to display answer

These are the variables used in UiPath and ChatGPT integration.

  1. We have completed all the procedures and successfully completed UiPath and ChatGPT Integration. To run this you can click on debug to check it’s working. If you have upcoming any problems please recheck the procedure mentioned here once more.

3. The output of UiPath and ChatGPT Integration

After debugging the process, a dialogue box will appear, prompting you to type your question into the text box provided. In this text field, fill out the question you want to ask. After you’ve typed your question, click the “OK” button to continue. This will route your query to the relevant API Request.

UiPath and ChatGPT Integration Question Box
Question Box

When an user makes a request to the ChatGPT API, the API receives and processes, and responds by sending a message back to the user. The user’s device or application may show this message in a “message box.” 

UiPath and ChatGPT Integration Answer
Answer Box

Here we have just provided a sample example of UiPath and ChatGPT Integration. There is multiple use case that can be done using this integration. We will check each of them below.

UiPath and Chat GPT Integration Workflow Overview- RPA Tutorials
Final Overview of Workflow of UiPath and Chat GPT Integrations

Potential Use Cases of UiPath and ChatGPT Integration

The following are some of the possible use cases for UiPath and ChatGPT Integration with the RPA technology UiPath:

  • Customer support conversations may be automated using a chatbot powered by UiPath and ChatGPT Integration. Companies may construct a chatbot that understands and responds to client inquiries in natural language by integrating ChatGPT into UiPath. Customer experience can be improved by using this.
  • Enhancing data input and extraction operations using ChatGPT’s natural language processing capabilities: UiPath and ChatGPT Integration can automate data input and extraction processes with higher accuracy and efficiency by leveraging ChatGPT to analyze unstructured data. The accuracy of data-driven business choices can be improved by implementing this method.
  • Developing intelligent virtual assistants for HR, finance, and other company functions: By combining ChatGPT with UiPath, businesses can develop virtual assistants that comprehend and reply to employee inquiries in natural language. HR, finance, and other company operations can be effectively improved.
  • Using ChatGPT with UiPath to automate repeated operations like email categorization, tagging, and response creation: ChatGPT may be used in conjunction with UiPath to automate repetitive processes like email classification, tagging, and responsible production. This may lessen the strain on human personnel while also increasing the speed and precision of these processes..
  • Utilizing ChatGPT with UiPath to produce reports and insights from huge volumes of unstructured data: By using ChatGPT to handle unstructured data, UiPath can automatically provide reports and insights that may assist guide business decisions. This may speed up and increase the accuracy of data-driven business choices.
  • Creating a virtual agent for appointment booking and rescheduling: By using UiPath and ChatGPT Integration, businesses may develop a virtual agent that understands and responds to consumer inquiries in natural language. This may assist with appointment scheduling and rescheduling efficiency.
  • Creating an e-commerce chatbot for customer service and order tracking: ChatGPT can be linked with UiPath to develop an e-commerce chatbot for customer service and order tracking.
  • Using ChatGPT and UiPath to automate knowledge management and FAQs: Companies may automate the administration and answers of commonly requested questions by connecting ChatGPT with UiPath.
  • Adding natural language processing skills to virtual meeting and collaboration tools: By integrating ChatGPT with UiPath, businesses may add natural language processing capabilities to their virtual meeting and collaboration solutions.
  • Creating a virtual agent for IT service-based companies: By using UiPath and ChatGPT Integration, businesses may develop a virtual agent that can comprehend and reply to IT-related inquiries in natural language.
  • Enhancing client feedback and sentiment analysis using ChatGPT and UiPath: UiPath can assess client comments and sentiment automatically by utilizing ChatGPT to handle unstructured data. This may assist guide corporate choices and enhance the client experience.
  • Creating a virtual HR assistant for employee onboarding, benefits, and PTO tracking: By combining ChatGPT with UiPath, businesses can develop a virtual HR assistant that can comprehend and reply to employee inquiries in natural language.
  • Supply chain management and logistics may be automated using ChatGPT and UiPath. This may assist increase the efficiency and accuracy of these procedures.
  • Building a chatbot for job search and career guidance: By Using UiPath and ChatGPT integration, businesses can build a chatbot that can comprehend and reply to job search and career advice inquiries in natural language.

Conclusion

UiPath and ChatGPT Integration is a potent tool for companies wishing to streamline operations and automate procedures. It enables the automation of activities requiring natural language processing, both organized and unstructured data, and both.

Businesses may develop sophisticated chatbots and automate customer care using UiPath and ChatGPT, among other things. UiPath and ChatGPT Integration are certain to gain popularity as automation gains importance in today’s corporate environment.

If you have any doubts while using this integration, you can refer to the Workflow image for guidance.

Faq on UiPath and Chat GPT Integration

How do I obtain an API key for both ChatGPT and UiPath?

In order to receive an API key for ChatGPT, you must first sign up for an OpenAI API key. This is accomplished by registering for an account on the OpenAI website and subscribing to the ChatGPT API. To get an API key for UiPath, contact the company’s sales or support staff.

How do I create a new process in UiPath and add an HTTP Request activity to my workflow?

You must open the UiPath Studio and choose the “New” option in order to create a new process in UiPath. The HTTP Request activity may then be added to your workflow in the new process by dragging and dropping it from the “Activities” pane onto the designer surface.

How do I configure the HTTP Request activity to send a request to the ChatGPT API endpoint?

You must include the endpoint URL in the activity’s “URL” field in order to set up the HTTP Request activity to submit a request to the ChatGPT API endpoint.

Leave a Reply

Your email address will not be published. Required fields are marked *