> For the complete documentation index, see [llms.txt](https://luw-ai.gitbook.io/luw.ai-app-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://luw-ai.gitbook.io/luw.ai-app-docs/workflows/workflow-editor.md).

# The workflow editor

Build a workflow on the canvas — add input and tool nodes, connect them, run one step or the whole chain, and see the results.

This page walks you through the workflow editor: adding nodes, connecting them, running them and saving your workflow.

The editor opens when you create a workflow with **+ New Workflow**, open one from **Your Workflows**, or copy one from **Explore Workflows** (see [Workflows](/luw.ai-app-docs/workflows/workflows.md)). On the left is the **NODES** palette, in the middle the canvas, and along the top the controls.

<figure><img src="https://1930792265-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4yESzclcaZeSiIDZ8eIa%2Fuploads%2Fgit-blob-18dc1ed71614abb07b7180af70ebb3a487a2e58c%2Fworkflow-editor.webp?alt=media" alt="Workflow editor with the NODES palette on the left, and on the canvas a Text Input node wired into an Interior AI node, which is wired into a Photo Enhancer node; the top bar shows Save, From step, To step, Run range, Run All, Results and API"><figcaption><p>A three-step workflow: a text prompt goes into Interior AI, and its room goes on to Photo Enhancer</p></figcaption></figure>

## The top bar

| Control                                     | What it does                                                                                                    |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| Back arrow                                  | Returns to Luw Workflows.                                                                                       |
| Panel button                                | Shows or hides the **NODES** palette.                                                                           |
| Name                                        | Click and type to name the workflow. Until you do, it shows "Untitled Workflow".                                |
| Undo / Redo                                 | Steps back or forward through your changes.                                                                     |
| Settings (gear)                             | Opens **Workflow Settings**. A small globe or lock on the gear shows whether the workflow is public or private. |
| **Save**                                    | Saves the workflow.                                                                                             |
| **From step** / **To step** / **Run range** | Runs part of the workflow. Shown on wide screens.                                                               |
| **Run All**                                 | Runs the whole workflow. It turns into **Stop** while the workflow runs.                                        |
| **Results**                                 | Opens the panel with everything this workflow has made.                                                         |
| **API**                                     | Shows how to run the workflow from your own code.                                                               |

## Add nodes

The **NODES** palette has two groups:

* **Inputs**: **Text**, **Image**, **Video**, **Audio**, **Merge Text** and **If**.
* **Apps**: the AI tools, in the same order as in the app: Magic Prompt AI, Interior AI, Exterior AI, Magic Wand AI, Render AI, Sketch AI, 3DGen AI, Remove Furniture, ArchiGPT, Video AI, Fluw, Mood Board AI and more. Each shows a one-line description.

Click an item to add it to the canvas, or drag it to the exact spot you want.

On a phone the palette is tucked away: tap the **Nodes** button at the bottom right of the canvas to open it. It closes again after you add a node.

To move around the canvas, drag an empty part of it. The buttons at the bottom left zoom in (+), zoom out (−) and fit the whole workflow on screen. On larger screens a minimap at the bottom right shows where you are.

## Input nodes

Input nodes hold what you feed into the workflow.

* **Text** adds a **Text Input** node. Type in its box ("Type a value...").
* **Image** adds an **Image Input** node. Click **Upload** to pick a picture, or paste a link into "...or paste a URL".
* **Video** and **Audio** work the same way, for video and audio files.

You can rename an input node by typing in its title. If you upload a file into a workflow that has never been saved, the editor saves it first.

### VARIABLE and BATCH

Every input node has two checkboxes along its bottom edge.

**VARIABLE** (on by default) decides whether the input is offered when the workflow runs through the API. In the app's words: "On: exposed as an API input. Off: hidden from the API — runs use the value saved on the canvas." It makes no difference when you run the workflow in the editor.

**BATCH** lets you give one input several values: "On: provide multiple values — the workflow runs once per value."

* On a Text Input, each value gets its own box; click **Add value** for another.
* On an Image, Video or Audio input, click **Add files** to pick several files, or paste links one at a time.
* A badge such as ×3 on the node shows how many values it holds.

When you click **Run All**, the workflow runs once for each value. If you use **BATCH** on more than one input, they all need the same number of values: the first values run together, then the second, and so on. Every value must be filled in before you run.

### Merge Text

**Merge Text** joins several texts into one. Connect any number of **Text Input** nodes to it; it only accepts Text inputs.

Its box takes a template: write `{1}`, `{2}` and so on where each connected text should go, numbered in the order you connected them. Leave the box empty to put each text on its own line. A preview of the merged text shows on the node.

### If

**If** lets one part of the workflow run only when a condition is met.

1. Connect a text to the If node's **VALUE** input. It can come from a Text Input, a Merge Text or a tool that writes text, such as ArchiGPT. The If node only accepts text.
2. Choose a condition: **Contains**, **Equals**, **Starts with**, **Ends with** or **Is empty**.
3. Type the value to compare with (not needed for **Is empty**). Tick **Ignore case** or **Trim** if you want to ignore capitals or extra spaces.
4. Connect the **TRUE** or **FALSE** output to the steps that should depend on it.

As soon as the canvas has an If node, every app node gets an extra **▶ IF** row at the top of its inputs. That's where you connect **TRUE** or **FALSE**. When the workflow runs, the step only runs if its branch is the one taken; otherwise it's marked as skipped.

## App nodes

An app node is one tool. Its title shows the tool's name, and its inputs are listed down its left side.

Click an app node to open its settings in a panel on the right (at the bottom on smaller screens). Depending on the tool, you'll find:

* **Model**, when the tool offers a choice;
* **Prompt** ("Describe what this step should do..."), the instructions for this step;
* the tool's own settings. A setting that takes an image can use the image from another node, which you pick from its list, or a link you paste ("None / URL below").

Each app node also has a run button (▷) and a bin to delete it.

## Connect nodes

Each node has an output dot on its right edge and input dots on its left edge. Drag from an output dot to an input dot to connect them. The wire carries the result of one node into the next.

Inputs are labelled by what they take:

| Label                          | Takes                  |
| ------------------------------ | ---------------------- |
| IMG                            | An image               |
| TXT or PROMPT                  | Text, such as a prompt |
| IMG+ (or another label with +) | Several items at once  |

Some tools have other inputs, such as VID for a video. The type each node produces is shown at its bottom right (for example IMAGE or TEXT).

A few rules keep the workflow sound:

* The types must match. If they don't, you'll see "Output type does not match this input".
* Loops aren't allowed: "That connection would create a loop".
* An input that takes one item keeps one wire. Connecting another replaces the first.

To remove a wire, double-click it, or drag its end onto an empty part of the canvas. Dragging the end onto another dot moves the wire there. To delete a node, click its bin, or select it and press Delete or Backspace.

## Run the workflow

You can run one step, a range of steps, or everything.

### Run one step

Click ▷ ("Run this step") on an app node to run just that step. It uses the current inputs and whatever the earlier steps produced last time. If an earlier step it needs hasn't run yet, you'll see "Earlier steps have no outputs yet — run them first".

Running one step by hand ignores any If condition on it, and uses only the first value of a **BATCH** input.

### Run a range of steps

1. In **From step**, choose the first step. Steps are numbered in the order they run.
2. In **To step**, choose the last step.
3. Click **Run range**.

The same rule applies: steps before the range need results from an earlier run if the range uses them. These controls appear on wide screens.

### Run everything

Click **Run All**. The editor saves the workflow, then runs every step in order. If a connected input node is empty, you'll see "Fill the connected input nodes first".

While it runs, **Run All** turns into **Stop**.

### Follow the progress

Each app node shows how it's doing: a spinner while it works, a green tick when it's done, a red mark with the error if it failed, and a grey mark if an If condition skipped it. Wires turn green as the steps before them finish.

When a step finishes, a preview of its result appears on the node. Click it to open it in the result viewer. Text results, such as an ArchiGPT answer, show as text.

## See the results

Click **Results** to open the results panel. It lists what this workflow has made; click a result to open it in the result viewer, where you can download it, save it to a project and so on. Before the first run it says "No results yet — run the workflow to see them here."

After a batch run, the top of the panel shows **Batch run** with a progress bar and a "done / failed / total" count, and one row per value with its status. A failed row shows what went wrong and a **Retry** button. If the failure was on Luw\.ai's side, the row adds "credits refunded".

## Save and change the settings

Click **Save** to save the workflow. **Run All** and **Run range** save it for you before they start. Save before you leave the editor so you don't lose changes.

The gear opens **Workflow Settings**:

* **Name** and **Description** ("What does this workflow do?").
* **Thumbnail**: **Upload a cover image**. It's "Shown on your workflow card and in Explore. Without one, the node graph is shown."
* **Visibility**: **Private** ("Only you can run it") or **Public** ("Anyone can run it").
* **Share link** and **Analytics**, for public workflows that have been saved.

Click **Save** in the window to apply your changes. Sharing is explained in [Share your workflow](/luw.ai-app-docs/workflows/workflows.md#share-your-workflow).

## Use the workflow as an API

Click **API** to open **Use as API**. If the workflow hasn't been saved yet, it's saved first.

The window shows ready-made requests for running this workflow from your own code: "1. Start the workflow", "2. Poll for results", sample responses, the **Parameters**, and how to start **Batch runs** by sending a list of values for an input. You need an API key ("You need an API token to authenticate these requests."); **Get your token here** opens the API & MCP page.

Only inputs with **VARIABLE** ticked appear as API inputs. The others always use the value saved on the canvas. For keys and the full reference, see [API and MCP](/luw.ai-app-docs/connect/api-and-mcp.md) and the [Luw.ai API docs](https://luw-ai.gitbook.io/api).

## Credits

Each app node uses credits when it runs, so a full run costs the total of its steps, and a batch run costs that once for every value. Steps skipped by an If don't run. **Retry** on a failed batch item is charged like a normal run. See [Credits and engines](/luw.ai-app-docs/getting-started/credits-and-engines.md).

## Keyboard shortcuts

| Keys                                        | Action                           |
| ------------------------------------------- | -------------------------------- |
| Ctrl+Z (Cmd+Z on Mac)                       | Undo                             |
| Ctrl+Y or Ctrl+Shift+Z (Cmd+Shift+Z on Mac) | Redo                             |
| Ctrl+C, then Ctrl+V (Cmd on Mac)            | Duplicate the selected node      |
| Delete or Backspace                         | Delete the selected node or wire |

## Tips

* Build and test step by step: add one tool, run it with ▷, and only then add the next.
* Use **BATCH** on a Text Input to try several prompts in one run, then compare them in **Results**.
* Give input nodes clear names, so you can tell them apart in a bigger workflow.

## Related

* [Workflows](/luw.ai-app-docs/workflows/workflows.md)
* [The result viewer](/luw.ai-app-docs/results/result-viewer.md)
* [Credits and engines](/luw.ai-app-docs/getting-started/credits-and-engines.md)
* [API and MCP](/luw.ai-app-docs/connect/api-and-mcp.md)
