UiPathRobot.js Now in Public Preview! (Get the SDK & Sample App now!)

We’re excited to announce our Robot JavaScript SDK (:robot: UiPathRobot.js) is now available for preview!

Now you can trigger your local robot directly from existing applications (including browsers), allowing users to start processes from the context that they’re already working in, with all of the necessary contextual information to complete an automated task. And bonus! You can also pass input arguments to your processes.

With the JavaScript SDK you can build anything from a simple RPA calculator, to an Outlook Add-in that processes email attachments when triggered from a button from within Outlook :astonished:

Get started at https://robotjs.uipath.com/

  • This site contains our complete guide, sample app, and full installation instructions

:bulb: Please tell us what you think below! Your feedback will be critical as we drive toward GA release later this year.

See how it works!

Sample Code

For more details, see the Developer Guide.

UiPathRobot.js uses Promises, but I suggest you use Async-Await because of its clear superiority :upside_down_face:

In this code snippet we get the list of available processes, find a specific process by its name, and then start that process with a single input. As the process runs we log its status to the console, and once it’s finished we log it’s outputs.

(async () => {
    try{
        // Get the list of processes
        const processes = await UiPathRobot.getProcesses()
        // Find a specific process by name
        const sample = processes.find(p => p.name.includes("SampleProcessName"))
        // Start the process with an input argument (creates a job)
        const job = sample.start({ NumberToAdd: 1 })
        // When the job status changes, log it to the console
        job.onStatus(status => {console.log(`Status: ${status}`)})
        // Get the results of the job
        const results = await job
        // Log the process outputs to the console
        console.log(results)
    } catch(e) { 
        // Handle any errors
        console.error(e) 
    }
})()
27 Likes

Really Amazing…

3 Likes

Wow Great

2 Likes

Great new feature!
I just got a problem when trying the sample.
It seems that there is a problem with finding Robot service (this is obvious because when I install UiPath Studio Community Edition robot is installed in User Mode, not in SCM mode).
The problem is that UiPathService.exe should be launched with Agent Desktop (like in previous versions), but in version 2020.2.0 it is not launched at all.
Did anyone from the community sucessfully tested the sample?

Edit: more info:

Annotation 2020-02-18 094902

EDIT2 : Problem solved, had to open port 2323 (created inbound and outbound rules in firewall).
I’ll leave this here if some one else has some problems.

9 Likes

It is an interesting feature and I think an Academy tutorial will be very helpful.

Well done guys !!!

4 Likes

Hi @srdjan.suc - Can you please tell us which firewall software is installed on your machine? We have never experienced issues with firewall on local port, we want to test it and document it.

4 Likes

This is so cool :wink: !

2 Likes

Normal windows firewall, but I am having some issues with Kaspersky antivirus, so maybe that was the problem.

2 Likes

This is interesting :slight_smile:

3 Likes

This so cool

4 Likes

Facing the same issue, am using McAffee firewall\Antivirus

2 Likes

@Hafeez_Niyaz are you using Community 20.2 or the Enterprise installer?

2 Likes

enterprise 2019.10

@Hafeez_Niyaz Can you try adding these two applications to the MaCafee white list?

Within your "C:\Program Files (x86)\UiPath Web\Robot Web Access\lib\" directory

  1. UiPath.BrowserInvocation.PortDiscoveryService.exe
  2. UiPath.BrowserInvocation.RobotAPI.Listener.exe

I’m hoping this will solve your problem.

I´m having the same error when i try to list processes

1 Like

@Ricardo_Franco this looks like an issue with the latest version(s) of Firefox. We’re looking into this now. In the meantime you should be able to use Chrome or Edge, can you give either of those a try?

1 Like

Hi Evan
Thank you for the detailed post.
Just thinking of Robot.js with web application. Will it be able to invoke processes from a remote machine?
I do not see any parameters like orchestrator url/ robot name being passed in the initialization of robot object in JavaScript.

HOW I SOLVE IT …CAN ANY ONE GIVE ME STEP BY STEP PROCEDURE