⚡ JavaScript Functions are now in Public Preview

If you work with TypeScript, this one is for you.

You can now write a function in your own editor, use your preferred libraries and Git workflow, and publish it to UiPath through the CLI. Once deployed, it runs as a governed building block on the platform, with execution, identity, credentials, and auditing handled for you.

We released Python Functions in June, and JavaScript was the ecosystem most frequently requested next. JavaScript Functions also bring something new: a Function can define an HTTP method and path, allowing you to use it as the backend of a Coded App.

:puzzle_piece: What can you build?

A Function can be reused across a solution and called from:

  • A Coded App, as its backend

  • Maestro, as a service task

  • An RPA or API workflow

  • An Agent, as a tool

The Coded Apps scenario is particularly useful. The App provides the user interface, while the Function handles data access and business logic.

For example, you could build an approvals app in which a manager sees only requests submitted by their team. The Function uses the signed-in user’s identity to retrieve the right data and writes approved requests back to the ERP. Credentials stay on the backend and are never exposed in the browser.

Other use cases include:

  • Adding a custom step when no existing activity fits

  • Sharing business logic between several automations

  • Connecting to a system that does not yet have a connector

  • Using packages from the npm ecosystem

  • Handling payload transformations and webhooks

  • Generating PDFs or parsing XLSX files

  • Signing requests to third-party APIs without exposing credentials

:clapper_board: See it in action

The example below uses three JavaScript Functions as the backend of a Coded App. The Functions expose endpoints for listing invoices, reading an invoice, and retrieving an individual invoice line.

The first request starts the serverless runtime and takes around six seconds in this recording. Once the runtime is warm, the following requests complete in under a second, so moving between invoices and line items feels immediate.

Each invocation is also visible in Orchestrator, where you can inspect the Function, source, status, runtime type, and duration.

The first invocation includes the serverless cold start. Subsequent invocations reuse the warm runtime and complete in under a second.

:eyes: A Function from start to finish

Here is a small HTTP Function that could be called by an App:

import { defineFunction, defineSchema } from "@uipath/coded-functions-js-sdk";

interface GetOrderInput {
  id: string;
}

interface GetOrderOutput {
  id: string;
  status: string;
  total: number;
}

export default defineFunction({
  name: "get-order",
  method: "GET",
  path: "/orders/:id",
  input: defineSchema<GetOrderInput>(),
  output: defineSchema<GetOrderOutput>(),
  handler: async (input, ctx) => {
    // ctx.user  — the signed-in caller
    // ctx.robot — the function's service-account token for Orchestrator
    return await fetchOrder(input.id);
  },
});

The TypeScript interfaces define the Function’s contract. defineSchema() turns them into JSON Schema, which the platform uses to validate inputs and outputs at runtime. The same fields become typed bindings wherever the Function is invoked, so you do not need to maintain the contract separately.

Identity is available through ctx:

  • ctx.user represents the signed-in caller

  • ctx.robot gives the Function its own access to Orchestrator

This means credentials do not need to be included in the source code or sent to the browser.

If you remove method and path, the same Function can run as a job instead of exposing an HTTP endpoint.

:rocket: Run your first Function

You need Node.js 20 or later and an Automation Cloud tenant.

Install the UiPath CLI and the Functions tool:

npm install -g @uipath/cli
uip tools install --package-name @uipath/functions-tool

Create a TypeScript Function and run it locally:

uip functions new --name my-fn --language ts
cd my-fn

uip functions serve
uip functions run hello --input '{"x":1}'

serve starts a local development server with hot reload on port 7070. run lets you invoke the Function locally with a test input.

When it is ready, package and publish it:

uip functions pack
uip functions publish

You can then add it to a solution and deploy it:

uip solution project import "./my-fn"
uip solution resources refresh
uip solution pack
uip solution deploy run --folder-name Finance

A Function joins a solution in the same way as an RPA or API project. You continue working in your own IDE and repository, using your normal branches and pull requests, with UiPath commands handling packaging and deployment.

If you use a coding agent, UiPath Skills can also teach tools such as Claude Code and Cursor how to work with these commands.

:cloud: Where does it run?

During Public Preview, JavaScript Functions run on UiPath serverless. UiPath manages the infrastructure and scales it as needed.

Running JavaScript Functions on your own robot is coming soon. This will let you reuse robot capacity you already license and keep execution and data inside your environment.

:money_bag: Pricing during Public Preview

JavaScript Functions are free during Public Preview, within a fair-usage limit.

At GA, Functions used as the backend of a Coded App will be included for licensed Apps users within a fair-usage limit. Other serverless executions will follow the Platform Units consumption model.

When running JavaScript Functions on your own robot you can chose to use the unattended license or pay as you go with Platform Units consumption model.

This model reflects the feedback we received after the Python Functions announcement, especially around paying again for execution on existing robot capacity. We will publish the full pricing details and fair-usage limits before GA.

:motorway: What is coming next?

Already in progress:

  • JS Functions on local robots

  • Python and JS Functions using unattended licenses on local robot

  • Creating, editing, and debugging Functions in Studio Web

  • Functions support in the UiPath VS Code extension

:books: Samples and documentation

The Coded App and JavaScript Functions samples shown above will be available in the UiPath TypeScript SDK repository:

The repository contains the TypeScript SDK, documentation, and sample applications for building against UiPath Platform services.

:speaking_head: Tell us where it hurts

A preview is useful only if you try it on real problems and tell us what does not work.

Reply in this thread or tag @Alexandru Bizon directly. He will be following the feedback closely.

Two things I look forward to:

  • Being able to run functions on unattended licenses
  • C# functions so we can build automation pieces in Visual Studio or VS Code