- Introduction and getting started
- Maestro landing page
- Process modeling
- Process implementation
- Process operations
- Process monitoring
- Process optimization
- Licensing
- Reference information

Maestro user guide
The Script Task in Maestro allows you to execute inline JavaScript to manipulate data, enrich payloads, apply conditional logic, or transform input before passing it to the next component in the process. This is particularly useful when you want to prepare data for Schema Queues, API calls, agents, or storage systems. |
Implementation > Type: Run inline script.
Use a Script task when:
- You need to transform or restructure incoming data.
- You want to validate fields or reject invalid input.
- You need to combine multiple inputs into a single object.
- You want to filter, clean, or reformat data before forwarding.
- Drag in a Script task node from the process toolbar.
- Add input arguments under the Inputs section in the right-hand
panel.
The input arguments can be literal values, context variables, or previous node outputs (e.g.,
vars.inArg
). - Write your script in the editor:
- Click the input box under Script, then expand into the full editor view.
- JavaScript expressions must
return
an object or value, as in this example:return { param1: inputString, param2: "staticValue" };
return { param1: inputString, param2: "staticValue" };
- Map outputs from the return object into Maestro variables using the Outputs section.
fx
icon to open the
JS Function Expression editor The editor includes:
-
A test input panel where you can paste sample inputs.
-
A real-time Expression output panel to preview what your return object will look like.
JSON.parse
failures) will be shown to help you
debug.
The Action dropdown in a Script task allows you to define the type of external execution the process should call. Each option maps to a specific UiPath capability or integration method. Below is a brief overview of each option:
- None
No implementation is configured for the Script task.
- Create action app task
Creates a task in an Action App for user interaction, without waiting for task completion.
- Start and wait for RPA workflow
Starts a deployed RPA workflow (e.g., UiPath Studio project) and waits for it to complete before continuing.
- Start and wait for agent
Starts a UiPath agent (a reusable logic block) and waits for it to finish execution.
- Start and wait for external agent
Triggers an agent hosted outside UiPath, such as CrewAI, Salesforce, or ServiceNow, and waits for the result.
- Start and wait for API workflow [Preview]
Executes an API-based workflow (in preview) and waits for a response.
- Start agentic process
Starts a process based on agentic design (modular logic), without waiting for it to finish.
- Start and wait for agentic process
Starts an agentic process and pauses until it completes execution.
- Execute business rule [Preview]
Evaluates a business rule and uses the outcome in the process (currently in preview).
- Create queue item
Adds a new item to a UiPath Queue for asynchronous processing, without waiting for result.
- Create and wait for queue item
Adds an item to a Queue and waits until it is processed before moving forward.
- Execute connector activity
Runs a preconfigured Integration Service connector activity (e.g., Salesforce or Slack).
- Wait for connector event
Pauses the process until a specific event is received from a connector (e.g., form submission or external trigger).
- Execute script
Runs a short script (JavaScript or similar) during the process for lightweight logic or transformation.
To add an additional output, select Add new to introduce a new variable directly within the Script task. The newly introduced output will be available in subsequent steps.
For more information about tasks. visit Tasks in BPMN modeling.