Functions
Experimental
Warning
Preview: This service is experimental and may change or be removed in future releases.
Service for invoking UiPath Coded Functions.
Coded functions are lightweight units of TypeScript/JavaScript or Python code deployed to UiPath and executed on demand. Each function is packaged as a process, exposed through an HTTP endpoint, and uniquely named within its folder. This service lets you discover deployed functions and invoke them with typed input and output — without dealing with the underlying process and trigger plumbing.
Usage¶
Prerequisites: Initialize the SDK first - see Getting Started
import { Functions } from '@uipath/uipath-typescript/functions';
const functions = new Functions(sdk);
const result = await functions.invoke({ name: 'my-function' }, { amount: 42 }, { folderId: <folderId> });
Methods¶
getAll()¶
getAll<
T>(options?:T):Promise<TextendsHasPaginationOptions<T> ?PaginatedResponse<FunctionGetResponse> :NonPaginatedResponse<FunctionGetResponse>>
Experimental
Gets all functions in a folder with optional filtering and pagination.
Warning
Preview: This method is experimental and may change or be removed in future releases.
Returns each function's identity (name, slug, HTTP method), state, and
packaging details, with an invoke method
bound to each item. Folder context is required — pass one of folderId,
folderKey, or folderPath in the options, or initialize the SDK with a
folder context.
One package can expose several functions, so filter on processName,
processSlug, or processKey to narrow the result to a single package.
Type Parameters¶
| Type Parameter | Default type |
|---|---|
T extends FunctionGetAllOptions |
FunctionGetAllOptions |
Parameters¶
| Parameter | Type | Description |
|---|---|---|
options? |
T |
Query options including folder scoping (folderId / folderKey / folderPath), filtering, and pagination options |
Returns¶
Promise<T extends HasPaginationOptions<T> ? PaginatedResponse<FunctionGetResponse> : NonPaginatedResponse<FunctionGetResponse>>
Promise resolving to either an array of functions NonPaginatedResponse<FunctionGetResponse> or a PaginatedResponse<FunctionGetResponse> when pagination options are used.
Example¶
// Get all functions in a folder
const deployed = await functions.getAll({ folderId: <folderId> });
// By folder path
const shared = await functions.getAll({ folderPath: 'Shared/Finance' });
// With filtering
const enabled = await functions.getAll({
folderId: <folderId>,
filter: 'enabled eq true',
orderby: 'name asc',
});
// Only the functions deployed from one package
const fromPackage = await functions.getAll({
folderId: <folderId>,
filter: "processName eq 'my-functions'",
});
// First page with pagination
const page1 = await functions.getAll({ folderId: <folderId>, pageSize: 10 });
// Navigate using cursor
if (page1.hasNextPage) {
const page2 = await functions.getAll({ folderId: <folderId>, cursor: page1.nextCursor });
}
invoke()¶
invoke<
TInput,TOutput>(func:FunctionRef,input?:TInput,options?:FunctionInvokeOptions):Promise<TOutput>
Experimental
Invokes a function and returns its output.
Warning
Preview: This method is experimental and may change or be removed in future releases.
The call is synchronous — it resolves with the function's output.
Type the input and output by supplying the generics — they should match the
input/output schema the function declares. Folder context is required — pass
one of folderId, folderKey, or folderPath in the options, or initialize
the SDK with a folder context.
Type Parameters¶
| Type Parameter | Default type |
|---|---|
TInput extends object |
Record<string, unknown> |
TOutput |
unknown |
Parameters¶
| Parameter | Type | Description |
|---|---|---|
func |
FunctionRef |
Function to invoke. Currently identified by name (unique within a folder); additional identifiers may be added in future releases. |
input? |
TInput |
Input for the function, sent as the request body (or as query parameters for functions declared with the Get method). Defaults to an empty object. |
options? |
FunctionInvokeOptions |
Folder scoping (folderId / folderKey / folderPath) and parent job attribution (jobKey) |
Returns¶
Promise<TOutput>
Promise resolving to the function's output
Examples¶
// Invoke a function
const result = await functions.invoke({ name: 'hello' }, { name: 'Alice' }, { folderId: <folderId> });
// Typed input and output, attributed to a parent job's licensing transaction
interface SyncInput { since: string }
interface SyncOutput { processed: number }
const result = await functions.invoke<SyncInput, SyncOutput>(
{ name: 'sync-invoices' },
{ since: '2026-01-01' },
{ folderPath: 'Shared/Finance', jobKey: '<parentJobKey>' }
);
console.log(result.processed);