# Introduction

> Build a workflow to fetch a live currency exchange rate and send an alert if it is below a certain threshold.

## Overview

In this tutorial, you will build **Price Watch**: a Maestro Flow that fetches a live currency exchange rate from an external API, compares it against a threshold you set, and returns either an alert or a no-action result based on the threshold. The flow is six nodes long, so the focus stays on how Flow wires data between nodes rather than on the domain logic.

![The Price Watch Maestro Flow, with all 6 nodes added and connected.](https://dev-assets.cms.uipath.com/assets/images/getting-started/maestro-flow-price-watch-full-flow-06f36d32.png)

[**Maestro**](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/overview) is a cloud-native orchestration platform that unifies automation, AI agents, and human interactions into streamlined, end-to-end business processes. It is one engine with three modeling surfaces:

- **[Maestro Flow](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/flow-getting-started)** (`.flow`) for developer-authored orchestration.
- **[Maestro BPMN](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/understanding-process-modeling)** (`.bpmn`) for Business Process Model and Notation diagrams that business stakeholders review.
- **[Maestro Case Management](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/introduction-to-maestro-case)** (`caseplan.json`) for exception-heavy human work.

Flow is a different modeler built on the same runtime as Maestro BPMN, designed for developers who prefer a visual, node-based experience over BPMN notation. If you have built [Robotic Process Automation (RPA)](https://docs.uipath.com/robot/standalone/latest/admin-guide/introduction) workflows or read a BPMN diagram before, the concepts transfer directly; what changes is the ergonomics. For guidance on picking a surface, see [Choosing a Maestro modeler](https://docs.uipath.com/maestro/automation-cloud/latest/user-guide/choosing-a-maestro-modeler).

## What you are building

We are going to build the rest of the Price Watch Flow, which takes three inputs on its manual trigger and returns one object. Every node in the Flow has a single job, and the Flow connects them to create the full workflow.

Below is a text diagram of the different nodes, how they are connected, and shows details about each one's purpose:

```text
     start              fetchRate1           reshapeRate1        belowThreshold1
┌──────────────┐      ┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│ Manual       │─────▶│ HTTP Request │────▶│ Script       │────▶│ Decision     │
│ trigger      │      │              │     │              │     │              │
└──────────────┘      └──────────────┘     └──────────────┘     └──────┬───────┘
 baseCurrency          GET /v2/rates        reads .body          rate below
 quoteCurrency         ?base&quotes         returns pair,        threshold?
 alertThreshold                             rate, asOf,                │
                                            belowThreshold             │
                                                                ┌──────┴──────┐
                                                           true │             │ false
                                                                ▼             ▼
                                                           endAlert1     endNoAction1
                                                          ┌──────────┐  ┌──────────┐
                                                          │ End      │  │ End      │
                                                          └──────────┘  └──────────┘
                                                           "alert"       "no action"
```

The node IDs in that diagram are the ones we will build, and every expression in this tutorial uses their IDs as shown. Keep them as they are, or update every expression that references them.

The following is the list of all the components that will make up the Flow:

| Component | Details |
| --- | --- |
| **Input:** `baseCurrency` | `string`, default `USD`; the currency to price from |
| **Input:** `quoteCurrency` | `string`, default `EUR`; the currency to price into |
| **Input:** `alertThreshold` | `number`, default `0.9`; alert when the rate falls below this value |
| **Output:** `watchResult` | `object` with `pair`, `rate`, `asOf`, and `belowThreshold` |
| **Node (Manual trigger):** `start` | Starts the run on demand and carries the three inputs into the flow |
| **Node (HTTP Request):** `fetchRate1` | Sends a `GET` request to the Frankfurter exchange-rate API |
| **Node (Script):** `reshapeRate1` | Reads the response body and returns `pair`, `rate`, `asOf`, and `belowThreshold` |
| **Node (Decision):** `belowThreshold1` | Evaluates `belowThreshold` and takes either the true or the false path |
| **Node (End):** `endAlert1` | Returns `watchResult` as an object with the values `pair`, `rate`, `asOf` and `belowThreshold` from the `reshapeRate1` node |
| **Node (End):** `endNoAction1` | Returns `watchResult` as an object with the values `pair`, `rate`, `asOf` and `belowThreshold` from the `reshapeRate1` node |

### The API you will call

We will use [Frankfurter](https://frankfurter.dev/), a free, open-source currency data API that tracks daily exchange rates from institutional sources. It needs no API key, no account, and no authentication header, which is why it suits a first tutorial.

A [live response](https://api.frankfurter.dev/v2/rates?base=USD&quotes=EUR) for the USD to EUR rate is a JSON **array** with one entry per quoted currency:

```json
[
  {
    "date": "2026-09-01",
    "base": "USD",
    "quote": "EUR",
    "rate": 0.86111
  }
]
```

That array shape matters for the Script node you build later: the rate is not at a fixed path, so the script looks up the entry whose `quote` matches your `quoteCurrency` input rather than reading a known key.

## Prerequisites

- **Node.js and npm on your `PATH`** - the UiPath command-line interface (CLI) (`uip`) installs with npm. Check with `node --version` and `npm --version`, and install from [nodejs.org](https://nodejs.org/) if either is missing.
- **A UiPath account** - sign up or log in to [UiPath Automation Cloud](https://cloud.uipath.com/portal_/register?subscriptionPlan=community-trial) before starting.
- **A tenant with Maestro Flow enabled** - debug runs and deployment both route through your selected tenant.
- **Network access to your UiPath environment** - CLI sign-in uses an OAuth browser flow with a callback on `localhost` port `8104`.
- **VS Code 1.110.0 or higher with the UiPath Maestro extension** - required to build on the canvas, and useful on either path for watching the flow take shape. Check your version in **Code** > **About Visual Studio Code**, or run `code --version`.

No prior UiPath experience is required, and you do not need Studio Web open at any point in this tutorial.

:::tip
**Working in a remote workspace?** In Windows Subsystem for Linux (WSL), Secure Shell (SSH), Codespaces, and dev container workspaces, the extension runs on the remote host, so the UiPath CLI must be installed there rather than on your local machine.
:::

If you have not installed the prerequisites before, follow the steps to [set up your environment for UiPath tutorials](environment-setup.md). Use `uip --version` and `uip login status` to verify that the CLI is installed, and you have authenticated it.

## Step 1 - Scaffold the Price Watch flow

Scaffold the solution and the flow project. A Flow project always lives inside a solution, which is the deployable unit the platform packages and publishes, so the solution comes first. Both build paths start here.

1. Create the solution - it creates a directory with the name you specify via `uip solution init <solution name>`.

   ```bash
   # Create the solution
   uip solution init tutorial-maestro-flow-price-watch
   ```

2. Change into the newly created solution directory.

   ```bash
   cd tutorial-maestro-flow-price-watch
   ```

3. Create the Flow project inside the solution.

   ```bash
   uip maestro flow init PriceWatch
   ```

   The `flow init` command creates the `PriceWatch/` directory containing `PriceWatch.flow` (the only file you edit), `project.uiproj`, and `operate.json`. When `flow init` is run from inside a solution directory, it also registers the project with the parent solution and reports `"Status": "Registered"`. It also writes a `resources/` tree at the solution root, which is generated state that packaging regenerates; leave it alone.

4. Confirm that the Flow was scaffolded with a single trigger node:

   ```bash
   uip maestro flow node list PriceWatch/PriceWatch.flow --output table
   ```

5. Open `PriceWatch/PriceWatch.flow` in VS Code.

   With the [UiPath Maestro extension](https://marketplace.visualstudio.com/items?itemName=uipath.uipath-maestro) installed, the file opens on the visual canvas instead of as raw text, so you watch nodes and edges appear as they are written.

   ![New Maestro Flow canvas showing a single "Manual trigger" node](https://dev-assets.cms.uipath.com/assets/images/getting-started/maestro-flow-price-watch-new-flow-480fbb5d.png)

**Estimated time:** 30 minutes.

---

We are now ready to [build our Flow](maestro-flow-price-watch-build.md).
