> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflow Builder

A visual, no-code canvas for designing AI-powered workflows by placing and connecting nodes, then testing and deploying them as API endpoints.

***

To open Workflow Builder:

1. On the **Workflows** page, select the workflow you want to build or edit.
2. Select **Go to Flow**. The flow canvas opens.

***

## Canvas overview

The Workflow Builder canvas is divided into the following areas:

| Area                    | Description                                                                            |
| :---------------------- | :------------------------------------------------------------------------------------- |
| **Canvas**              | The main workspace where you place and connect nodes.                                  |
| **Assets panel (left)** | Contains all available node types. Drag a node from here onto the canvas to add it.    |
| **Configuration panel** | Opens when you click a node. Use it to configure node settings and manage connections. |
| **Toolbar (top right)** | Provides access to flow versions, run controls, and canvas layout options.             |

Every new workflow starts with a **Start node** placed on the canvas automatically. The Start node is the required entry point — all other nodes must connect to it, directly or indirectly.

***

## Manage input and output

Workflows use input and output variables to pass data into and out of the flow. Both are accessible as context objects throughout execution.

* **Input variables**: Provide initial data to the workflow. Available immediately after the Start node.
* **Output variables**: Store the values returned by the workflow. Define these to capture the results you want to expose.

### Use variables in the flow

Access variables using context object syntax:

* Input variable: `context.steps.Start.<variableName>`
* Output variable (to reference an AI node's result in the End node): `{{context.steps.<NodeName>.output}}`

### Add input variables

1. Select **Manage I/O** at the top of the canvas, or select the **Start** node. The **Manage Input & Output** dialog opens.

2. On the **Input** tab, select **+ Add input variable**.

3. Enter a **Name (key)** for the variable.

4. Select a **Type** and configure the type-specific options:

   | Type                              | Additional options                                                                                                                                                                                    |
   | :-------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | **Text**, **Number**, **Boolean** | Optional **Default value** field.                                                                                                                                                                     |
   | **Remote file**                   | **File URL timeout** field. Set a duration between 5 minutes and 7 days (10,080 minutes). Default is 5 minutes.                                                                                       |
   | **List of values (Enum)**         | Select **Add Values +** to define allowed values. Enable **Default value** to select from a dropdown. The system validates input against the defined enum values.                                     |
   | **JSON**                          | A JSON editor appears. Define the schema for the input parameter. See [JSON schema format](#json-schema-format). Set a default value that matches the schema — invalid JSON causes execution to fail. |

5. Select **Save**.

### Add output variables

1. Select **Manage I/O** at the top of the canvas. The **Manage Input & Output** dialog opens.
2. On the **Output** tab, select **+ Add output variable**.
3. Enter a **Name (key)** for the variable.
4. Select a **Type**: **String**, **Number**, **JSON**, or **Boolean**.
5. Select **Save**.

You can also add an output variable directly in the End node using the **Add a Key** option.

<Note>
  If a type mismatch occurs between the defined output variable type and the actual value, the endpoint still succeeds but includes a warning in the response with the key name and the nature of the mismatch.
</Note>

### JSON schema format

Use the following format when defining a JSON input variable schema:

```json theme={null}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "<property_name_1>": {
      "type": "<data_type>",
      "description": "<description_of_the_property>"
    },
    "<property_name_2>": {
      "type": "<data_type>",
      "format": "<optional_format>",
      "enum": ["<value1>", "<value2>", "<value3>"],
      "description": "<description_of_the_property>"
    }
  },
  "required": ["<required_property_1>", "<required_property_2>"]
}
```

Schema definition guidelines:

* Set `type: "object"` at the root and add a `properties` object to define all fields.
* For each property, set `type` and `description`. Supported types: `string`, `number`, `boolean`, `array`, `object`. For arrays, use `items` to define the element type.
* Add a `required` array at each level to list all mandatory fields.
* Use `enum` to restrict a property to a fixed set of values.

***

## Add nodes

You can add nodes to the canvas in three ways:

1. **Drag from the Assets panel**: Scroll the left panel, find the node type, and drag it onto the canvas.
2. **Use the blue plus (+) icon on a node**: Hover over any node to reveal the blue + icon. Select it to add a new node directly connected to the current one, or pick an existing node from the canvas.
3. **Use the bottom panel**: Browse node types in the panel at the bottom of the canvas and drag them onto the canvas.

***

## Connect nodes

Connections between nodes define execution order. Workflow Builder supports two execution patterns:

| Pattern        | When to use                                         | How it behaves                                                                                |
| :------------- | :-------------------------------------------------- | :-------------------------------------------------------------------------------------------- |
| **Sequential** | Tasks depend on the output of the previous step.    | Nodes run one after another. Each node waits for the prior node to finish before it starts.   |
| **Parallel**   | Tasks are independent and can run at the same time. | Multiple branches from a single node run simultaneously. Up to 10 outgoing branches per node. |

### Create a sequential connection

**Option 1 — Drag to connect**

1. Hover over the blue `+` icon or grey connector dot on the source node.
2. Drag a line to the destination node.

<img src="https://mintcdn.com/koreai/2cp-xSq4uFN_J0-8/ai-for-process/workflows/images/connect-nodes-new.gif?s=12f0ab9d5b1133be355d07ebca6bdc70" alt="Sequential connection using drag" width="853" height="338" data-path="ai-for-process/workflows/images/connect-nodes-new.gif" />

**Option 2 — Use the Connections panel**

1. Select a node to open the Configuration panel.
2. Go to the **Connections** tab.
3. Under **On Success** or **On Failure**, select a node from the dropdown. The connection is created and reflected on the canvas.

<img src="https://mintcdn.com/koreai/SI3fhJbLrkAy7jPS/ai-for-process/workflows/images/sequential_connection.png?fit=max&auto=format&n=SI3fhJbLrkAy7jPS&q=85&s=64407f516307f7dd1d6589f2fb55742c" alt="Connections panel — sequential" width="1912" height="757" data-path="ai-for-process/workflows/images/sequential_connection.png" />

<Note>
  In a sequential flow, only one connection is allowed per outcome (On Success or On Failure). A second connection from the same outcome creates a parallel branch.
</Note>

### Create a parallel connection

**Option 1 — Use the blue + icon**

1. Hover over a node and click the blue + icon.
2. Select **Add new** or **Add existing** to add multiple nodes as parallel branches. Each added node is connected automatically.

<img src="https://mintcdn.com/koreai/2cp-xSq4uFN_J0-8/ai-for-process/workflows/images/blue_icon_parallel.png?fit=max&auto=format&n=2cp-xSq4uFN_J0-8&q=85&s=c2bec80aec6620b35adbad2b9ef2e3f7" alt="Parallel connection using blue icon" width="1087" height="527" data-path="ai-for-process/workflows/images/blue_icon_parallel.png" />

**Option 2 — Drag to connect**

1. Hover over the blue + icon or grey dot on the source node.
2. Drag a line to an additional node on the canvas.
3. Repeat to create more parallel branches from the same source.

**Option 3 — Use the Connections panel**

1. Select the node to open the Configuration panel.
2. Go to the **Connections** tab.
3. Select nodes under **On Success** or **On Failure**. Select **+ Parallel Node** to add more branches.

<img src="https://mintcdn.com/koreai/Ztjy6q4a0BmDTTzt/ai-for-process/workflows/images/parallel_connections_panel.png?fit=max&auto=format&n=Ztjy6q4a0BmDTTzt&q=85&s=fc80b276bc4ef34bb6b66718b36585d8" alt="Connections panel — parallel" width="1090" height="543" data-path="ai-for-process/workflows/images/parallel_connections_panel.png" />

### Parallel design patterns

Workflow Builder supports three patterns for parallel execution:

| Pattern                    | Description                                                                 | Use when                                                         |
| :------------------------- | :-------------------------------------------------------------------------- | :--------------------------------------------------------------- |
| **Simple parallel**        | One node branches into multiple independent child nodes.                    | Tasks run simultaneously with no dependencies.                   |
| **Nested parallel**        | A parallel branch contains its own parallel sub-branches.                   | Multi-level logic where each level performs independent work.    |
| **Conditional + parallel** | Condition nodes trigger different parallel branches based on if/else logic. | Different groups of parallel tasks run depending on a condition. |

**Connection limits and restrictions**

* A single node supports up to 10 outgoing connections.
* You cannot connect the same node twice from the same parent.
* Backward connections (looping to a previous node) are not supported.

***

## Rename, rearrange, and delete nodes

### Rename a node

1. Right-click the node on the canvas.
2. Select **Rename** from the context menu.
3. In the **Node Name** field of the Configuration panel, enter the new name.

Use descriptive names to make the flow easier to understand. For example, rename a Function node to `Validate Email Input` instead of leaving it as the default.

### Rearrange nodes

Click and drag a node to any position on the canvas. Connected lines adjust automatically to maintain the connections. Other nodes remain fixed.

For automatic layout, right-click anywhere on the canvas and select **Auto arrange**.

You can also toggle canvas display options from the right-click menu: **Show/Hide UI** or **Show/Hide Grid**.

### Delete a node

Right-click the node on the canvas and select **Delete**. Deleting a node also removes all its connections. Reconnect any dependent paths to keep the flow valid.

***

## Manage connections

### Delete a connection

1. Click the arrow or line between two nodes.
2. Select the **Delete** icon. The nodes remain on the canvas but are no longer linked.

You can also delete a connection from the **Connections** tab in the Configuration panel:

1. Select the node to open the Configuration panel.
2. In the **Connections** tab, select the **Delete** icon next to the connection.

<img src="https://mintcdn.com/koreai/2cp-xSq4uFN_J0-8/ai-for-process/workflows/images/delete_icon.png?fit=max&auto=format&n=2cp-xSq4uFN_J0-8&q=85&s=6a559703fb6ce2f71e00a4a628c1ae85" alt="Delete connection from panel" width="1099" height="557" data-path="ai-for-process/workflows/images/delete_icon.png" />

***

## Test a workflow

Use the run feature to test a workflow from the canvas during development.

1. Select the **Run flow** icon in the top-right corner of the canvas.

   The Run dialog opens, showing the **Input**, **Flow log**, and **Output** sections.

2. Select the **Debug** icon at the top of the Run dialog to open the debug log.

   The debug log shows execution progress as the flow runs.

3. Review the result:

   * **Successful flow**: Execution time and output appear. Select the **Copy** icon to copy the output.
   * **Failed flow**: An error message appears and the output key is empty.

<Note>You can stop the flow at any point and restart it by selecting **Run flow** again.</Note>

### Debug log

The debug log provides execution-level detail for each node:

| Detail                | Description                                                                                                 |
| :-------------------- | :---------------------------------------------------------------------------------------------------------- |
| **Flow input values** | The input variable values provided at the start of the run.                                                 |
| **Node status**       | Success or failure for each node, with links to details.                                                    |
| **Node metrics**      | Initiated On, Executed On, Total Time Taken, and Tokens (AI nodes only).                                    |
| **Tool call logs**    | Inputs, outputs, and errors for any AI node tool calls, with step-by-step execution traces (AI nodes only). |

Expand the debug panel to full screen for a cleaner layout. In full-screen mode, clicking any node shows its input, output, and metrics side by side.

#### Time metrics for API and AI nodes

| Node type       | Metric               | Description                                                    |
| :-------------- | :------------------- | :------------------------------------------------------------- |
| **API — sync**  | Node processing time | Time taken by the node to complete execution.                  |
|                 | API response time    | Time waiting for the external API to respond.                  |
| **API — async** | Node paused at       | Timestamp when the node paused waiting for the async response. |
|                 | Node resumed at      | Timestamp when the node resumed after receiving the response.  |
|                 | Total wait time      | Duration between pause and resume.                             |
|                 | Node processing time | Time to process the node after it resumes.                     |
| **AI nodes**    | Node processing time | Time taken by the node to complete execution.                  |
|                 | LLM response time    | Time for the AI model to return a response.                    |

#### Logs for parallel execution

When a flow includes parallel branches, the debug log groups execution by branch:

* Each parallel execution is shown as an indented block under the parent node.
* Branches are labeled (A, B, C) for separate paths.
* Expand or collapse each branch to show or hide its details.
* The workflow waits for all parallel branches to complete before moving to the next step.

<img src="https://mintcdn.com/koreai/2cp-xSq4uFN_J0-8/ai-for-process/workflows/images/debug_log_new.png?fit=max&auto=format&n=2cp-xSq4uFN_J0-8&q=85&s=0e25c3014626562ebd65e5ede3da2fc7" alt="Debug log — parallel execution" width="1077" height="585" data-path="ai-for-process/workflows/images/debug_log_new.png" />

***

## Structured response parsing

When an AI node returns a structured JSON response, the platform automatically parses it and stores each key in the node's context object. Subsequent nodes can reference individual keys directly — no manual parsing or custom code needed.

### How it works

1. Attach a **response JSON schema** to the AI node to define the expected output structure.
2. When the model responds, the platform parses the JSON and stores each key in the node's context object automatically.
3. Access the full output: `{{context.steps.<NodeName>.output}}`
4. Access a specific key: `{{context.steps.<NodeName>.output.<keyName>}}`

### Example

**Step 1 — Define the response schema**

In the AI node, attach a response JSON schema. For example, to retrieve the scientific classification of a flower, define keys: `scientificname`, `year`, `scientist`.

<img src="https://mintcdn.com/koreai/2cp-xSq4uFN_J0-8/ai-for-process/workflows/images/define_response_schema.png?fit=max&auto=format&n=2cp-xSq4uFN_J0-8&q=85&s=28e6f8ed24a2280cfc4f9a40ee15003f" alt="Define response schema" width="679" height="444" data-path="ai-for-process/workflows/images/define_response_schema.png" />

**Step 2 — View parsed output**

When the flow runs, the debug log shows:

* **Input**: The prompt sent to the AI node.
* **Response**: The structured JSON returned by the model.
* **Output**: The response split into individual keys based on the defined schema.

Each key is stored separately in the context, making it easy to trace, validate, and reuse.

<img src="https://mintcdn.com/koreai/SI3fhJbLrkAy7jPS/ai-for-process/workflows/images/view_structured_output.png?fit=max&auto=format&n=SI3fhJbLrkAy7jPS&q=85&s=368934ca55179d600ec0dc375a076c0d" alt="View structured output" width="682" height="453" data-path="ai-for-process/workflows/images/view_structured_output.png" />

**Step 3 — Reuse keys in later nodes**

Reference stored keys in any subsequent node. For example: `{{context.steps.AI0001.output.scientificname}}`.

<img src="https://mintcdn.com/koreai/Ztjy6q4a0BmDTTzt/ai-for-process/workflows/images/reuse_keys.png?fit=max&auto=format&n=Ztjy6q4a0BmDTTzt&q=85&s=797d6e07e2b71d2ddd9a8a7f770a7263" alt="Reuse keys in later nodes" width="954" height="525" data-path="ai-for-process/workflows/images/reuse_keys.png" />

***

## Manage flow versions

You can save named versions of a flow, restore earlier versions, and delete versions you no longer need.

### Save a version

1. Select the **down arrow** on the canvas header. The **Flow versions** dialog opens.
2. Select the **+** icon.
3. Enter a **Version name** and **Description**, then select **Save**.

The saved version becomes the current version. Changes you make in the flow are auto-saved to the current version.

### Restore or delete a version

In the **Flow versions** dialog, select the three-dots icon next to any version name to restore or delete it.

* **Restore**: The selected version becomes the current version and moves to the top of the list. The previous current version moves to the bottom. If you edit a restored version, a new current version is created automatically.
* **Delete**: Permanently removes the version. Deployed versions can be restored but cannot be deleted.

***

## Common issues

| Issue                                    | Cause                                    | Resolution                                   |
| :--------------------------------------- | :--------------------------------------- | :------------------------------------------- |
| Can't add a new connection               | Node already has 10 outgoing connections | Delete an existing connection to add more.   |
| "No available nodes" in the dropdown     | All valid nodes are already connected    | Create a new node or unlink an existing one. |
| Flow doesn't execute                     | Broken or incomplete connections         | Check for stray nodes or missing End nodes.  |
| Error when connecting to a previous node | Backward loops are not supported         | Connect the node to a valid forward step.    |

***

## Design tips

* Use **parallel** branches to run independent tasks faster.
* Use **sequential** paths when each step depends on the previous step's output.
* Combine both patterns for advanced hybrid flows.
* Use **Auto arrange** regularly to keep the canvas clean.
* Ensure every logical branch ends at an **End node**.
* Use the debug log to trace execution and spot bottlenecks.
