# Designing a Maestro Flow

> Design a Maestro Flow in Studio Web using the Flow canvas, including how to add and connect triggers and nodes, configure properties, manage variables, handle errors, and debug your process.

:::note
Maestro Flow is in Preview.
:::

The Maestro Flow canvas is a visual designer where you build automations by placing nodes and connecting them in sequence.

## The Maestro Flow canvas

The canvas shows your flow as a graph of nodes connected by edges. Execution starts at the trigger node and moves through each connected node in order.

To add a node, select the **+** handle on the outgoing edge of any existing node to open the **Add node** panel. To connect two nodes manually, drag from the output handle of one node to the input handle of another. You can rename any node by opening its label on the Maestro Flow canvas.

The top toolbar provides:

- **Debug on cloud** — runs the flow end-to-end in the cloud.
- **Debug step-by-step** — advances through the flow one node at a time.
- **Publish** — packages and publishes the flow to Orchestrator.

## Adding triggers

The flow starts with a default **Manual Trigger** node that starts the flow on demand. Select the trigger on the canvas to configure it in the **Properties** panel.

### Trigger properties

- **ID** — the trigger’s identifier, used to reference its outputs in expressions (for example, `$vars.manualTrigger1.output.userId`).
- **Label** — the display name of the trigger on the canvas.
- **Variables** — input variables owned by the trigger. When the trigger fires, its inputs are available downstream as `$vars.<triggerId>.output.<inputName>`.

## Adding nodes

To add a node, select the **+** handle on the outgoing edge of any node to open the **Add node** panel, then select a category and choose the node type. For the full list of available node types, see [About Maestro Flow](https://docs.uipath.com/studio-web/automation-cloud/latest/user-guide/about-maestro-flow).

### Node properties

Selecting a node opens its configuration in the **Properties** panel on the right, organized into sections:

- **General** — the node’s **ID** (used in `$vars` expressions), **Label** (display name on the canvas), **Description**, and **Icon color**.
- **Error handling** — toggle **Enable error handling** to add an error output handle to the node. When enabled and the node fails, execution routes to the error path instead of stopping the flow.
- **Update variable** — assign a value to a process variable when the node completes. Select **+ Add variable update**, choose the target variable, and enter the expression to assign.

The **Variables** tab (next to Properties) is where you define process-level variables. Each variable has a name, type (String, Number, Boolean, Object, or Array), and direction (input, output, or bidirectional).

Opening the context menu for a node on the canvas opens a context menu with: **Add breakpoint**, **Add probe**, **Copy**, **Cut**, **Paste**, and **Delete**.

## Variables and data flow

Nodes do not share data automatically. Downstream nodes access a node’s output through expressions using the `$vars` prefix.

Every node that produces data makes its output available as `$vars.<nodeId>.output`. The node ID is auto-assigned based on the node type — for example, the first API workflow node is `apiWorkflow1`. You can see and edit a node’s ID in the **General** section of the Properties panel.

```javascript
// Access the output of a node named apiWorkflow1
$vars.apiWorkflow1.output

// Access the response body of an HTTP request node
$vars.httpRequest1.output.body
```

Use the **Variables** tab to define variables that must be accessible across the entire process or that define the process inputs and outputs. Variables are referenced as `$vars.<variableName>`.

For the full expression grammar and scoping rules, refer to [Variables and data flow](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/variables-and-data-flow) in the Maestro documentation.

## Error handling

By default, a failed node stops the entire flow. To handle failures on a specific node, toggle **Enable error handling** in the node’s Properties panel. This adds an error output handle to the bottom-right of the node on the canvas. Connect the error handle to a downstream node to route failures to a separate path.

When a node fails and its error handle is connected, the error details are available as `$vars.<nodeId>.error` on the error path, with fields including `message`, `code`, `status`, and `detail`.

For patterns such as log-and-continue, retry, and alert-and-terminate, refer to [Error handling](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/flow-error-handling) in the Maestro documentation.

## Debugging a Maestro Flow

Select **Debug on cloud** in the top toolbar to run the flow end-to-end. When the run completes, select any node on the canvas to inspect its output. Nodes that succeeded show a green indicator; failed nodes show the error details when selected.

Select **Debug step-by-step** to advance through the flow one node at a time.

Open the context menu for any node and select **Add breakpoint** to pause execution at that node during a debug run. Select **Add probe** to capture the node’s output without pausing.

## Related links

- [Variables and data flow](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/variables-and-data-flow)
- [Error handling](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/flow-error-handling)
- [Subflows](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/subflows)
- [Control flow](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/control-flow)
- [Publishing and deploying a Flow](https://docs.uipath.com/studio-web/automation-cloud/latest/user-guide/publishing-and-deploying-a-maestro-flow)
