# Build a workflow

> Create a workflow in the editor: add nodes, wire their ports, set each node, declare an Output, save, run it and read the Console.

Source: https://orbitalaip.com/docs/workflows/build-a-workflow

## Create the workflow

1. **Open Workflows**
   
   Click **Workflows** in the sidebar, then **Create workflow**.

2. **Choose Blank workflow**
   
   The editor opens with an **Untitled Workflow**.

3. **Name it**
   
   Click the name at the top left (**Rename this workflow**) and type a new one.

## Add nodes

The **Nodes** panel starts closed: click the shapes button at the top left of the canvas (**Toggle nodes panel**) to open it. Click a node to place it at the centre of the view with its settings open, or drag it where you want it; see [How the panel is organised](https://orbitalaip.com/docs/workflows/nodes#how-the-panel-is-organised).

## Connect ports

Drag from one node's output handle to another node's input handle. While you drag, a handle under the pointer shows a green ring if it accepts the wire and a red ring if it does not.

A wire must fit its ports, which a node's settings list under **Ports** with their types, such as `(json)` or `(array)`. Matching types fit, and so does a port typed any on either end. An array output fits any input, and json and array fit each other. The canvas refuses a wire that would form a loop, repeat an existing wire, or join a node to itself.

To move a wire, drag its end to another handle. To remove one, click it and press Backspace or Delete.

## Configure each node

Click a node to open its settings on the right; type in the first line to rename it.

A required field carries an asterisk and reads **Required** until it is filled. The editor still saves a half-set node, so fill every required field before you run. A JSON field reads **Invalid JSON — not saved** until its text parses.

Below the fields, **Output data** shows what the node produced in the run on the canvas. **Delete Node** removes the node and its wires.

## Set what a run works on

An **Input** node, under **Data Sources**, sets what a run works on; a blank workflow has none until you add one. A workflow started by a webhook or a signal can begin at **Trigger** instead. The Input node's **Source** is one of:

- **Asset — a single ticker**: a **Symbol** and its **Market** (**Equity (Stocks)**, **Crypto**, **Forex** or **Futures**).

- **Watchlist — a saved or inline list**: a **Saved watchlist**, or **Inline symbols (fallback)** typed as a comma-separated list.

- **Universe — a screener candidate pool**: a **Universe preset** such as **NASDAQ 100**, **Dow 30** or **Custom list (use field below)** with your own **Custom tickers (preset = "Custom")**. **Exclude tickers already on watchlist (optional)** drops tickers already on the watchlist you pick, so the run surfaces only new candidates.

- **Book — the account a deployed strategy decides from**: the root of an Agent strategy deployed to paper in Trade. A run you start with **Run** fails, because only the deployment supplies the book; see [Deploy a strategy](https://orbitalaip.com/docs/trade/deploy-a-strategy).

The output port follows the choice: **Asset** for one ticker, **Assets** for a list. With a list, a node after it that takes one symbol runs once per symbol, and a node that takes a list gets the whole list. See [Use watchlists in workflows and dashboards](https://orbitalaip.com/docs/watchlists/use-with-workflows-and-dashboards).

**Subject source** is **Configured source only** by default. **Run subject, else configured source (dual-mode)** lets a run started for one symbol, from a dashboard for example, analyse that symbol alone. Other runs fall back to the source above.

## Add an Output node

From **Core**, add **Output**, wire your last node into its **Data** input and name it in **Output Name**; columns and expectations are optional. See [Output](https://orbitalaip.com/docs/workflows/outputs-alerts-and-actions#output).

## Save

The editor saves about two seconds after your last edit. **Save** in the top bar saves at once and reads **Saved** once the server holds everything. For a numbered version of the graph, use **Save version…** in the bar below it; see [Versions](https://orbitalaip.com/docs/workflows/runs-and-versions#versions).

## Run and read the Console

1. **Click Run**
   
   Unsaved edits are saved first. A workflow that declares required run inputs opens a dialog titled **Run** and the workflow's name. A symbol field accepts only a result from its search. These inputs apply only to this run. The box below them reads **Historical median: ~N credits per run** once the workflow has run before, or **First run · cost unavailable**; see [credits](https://orbitalaip.com/docs/glossary#credits). Click **Run workflow**.

2. **Watch the canvas**
   
   The top bar shows the run's status, and **Run** becomes **Stop**. If you click **Stop**, it reads **Stopping…** until the run ends, and **Force cancel** appears after 30 seconds. Each node shows a pill: **Running…**, **Completed ·** and its duration, **Failed** or **Skipped**. Click **Output** under the pill to read the node's output.

3. **Read the Console**
   
   It opens at the bottom when the run completes or fails. A failed run shows **Error** and the message first; see [Troubleshooting](https://orbitalaip.com/docs/workflows/troubleshooting). Below, the **Console** shows what each **Output** node produced, one tab per node when there are several. An empty output reads **This output is empty.**, and a completed run without Output nodes reads **This run produced no outputs.**

If a run with the same inputs is already active, started elsewhere, **Run** answers **Run already in progress** and shows that run instead.

## Workflow settings

The gear at the far right of the top bar (**Settings**) opens **Workflow Settings**, with the timeouts, **On node failure** and, on a strategy workflow with Backtesting on, **Parameters**. See [Run and node timeouts](https://orbitalaip.com/docs/workflows/runs-and-versions#run-and-node-timeouts) and [Parameters a run can vary](https://orbitalaip.com/docs/backtesting/rule-card-strategies#parameters-a-run-can-vary).
