---
title: "Workflows"
description: "Visual graphs of blocks with schemas, channels, and human-in-the-loop steps."
canonical_url: "https://docs.vettero.com/build/workflows"
---
# Workflows

> Visual graphs of blocks with schemas, channels, and human-in-the-loop steps.

**Workflows** are visual graphs of **blocks** and **links**. Each run starts at the **main** (start) block, follows connections, and optionally returns structured data. They are distinct from [agents](https://docs.vettero.com/build/agents) (LLM-driven assistants). Use a workflow when the path is explicit; use an agent when the model should choose tools.

Open **Build → Workflows** for workspace-wide (root) graphs. Open an [agent](https://docs.vettero.com/build/agents) builder and use the **Workflows** panel for graphs nested under that agent.

## When to use

- Automate a fixed sequence (conditions, loops, table I/O, notifications)
- Expose a typed tool that [agents](https://docs.vettero.com/build/agents), [functions](https://docs.vettero.com/build/functions), [widgets](https://docs.vettero.com/build/widgets), and [event handlers](https://docs.vettero.com/build/event-handlers) can call
- Drive conversational UI on the **chat** channel (prompts, messages, human-in-the-loop waits)

## Create a workflow

Open **Build → Workflows** (or the agent **Workflows** panel) and click **Create**. You can also **Build with AI** via [Studio](https://docs.vettero.com/build/studio).

1. Enter a **Name** (required) and optional **Description**.
2. Pick a **Channel** (locked after create).
3. Create — Vettero opens the detail page with an empty graph (start block only).

<table>
<thead>
  <tr>
    <th>
      Channel
    </th>
    
    <th>
      Role
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        General
      </strong>
    </td>
    
    <td>
      Backend automation and tool calls. Bindable from agents, functions, widgets, and event handlers.
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Chat
      </strong>
    </td>
    
    <td>
      Conversational UI blocks and human-in-the-loop waits that need a user session.
    </td>
  </tr>
</tbody>
</table>

Root workflows open the full builder from **Open builder**. Nested (agent-scoped) workflows edit inline in the panel.

## Configure the workflow

On the detail page:

<table>
<thead>
  <tr>
    <th>
      Section
    </th>
    
    <th>
      What you configure
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Name
      </strong>
      
       / <strong>
        Description
      </strong>
    </td>
    
    <td>
      Identity (<strong>
        Edit info
      </strong>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Arguments
      </strong>
    </td>
    
    <td>
      Input schema on the <a href="https://docs.vettero.com/build/workflows/blocks/module/start">
        Start
      </a>
      
       block (<code>
        args.*
      </code>
      
       in the graph)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Return
      </strong>
    </td>
    
    <td>
      Output schema; a <a href="https://docs.vettero.com/build/workflows/blocks/module/return">
        Return
      </a>
      
       block must actually send values
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Canvas
      </strong>
    </td>
    
    <td>
      Read-only preview of the graph
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Components & resources
      </strong>
    </td>
    
    <td>
      Nested resources owned by this workflow
    </td>
  </tr>
</tbody>
</table>

**Delete** moves the workflow to [Trash](https://docs.vettero.com/activity/trash). System-managed [event handler](https://docs.vettero.com/build/event-handlers) flows cannot be deleted here — disable or delete the handler instead.

## Open the builder

**Open builder** (or **Edit** on a nested workflow) loads the canvas: a **block palette** on the side and the graph in the center. Drag blocks onto the canvas and connect **handles**. Use **Save** when the graph is valid.

The [Start](https://docs.vettero.com/build/workflows/blocks/module/start) block is always present. You cannot delete it. Its config holds name, description, **input schema**, and **output schema**.

## Work with blocks

See **Blocks** for type pages, grouped like the builder palette. Shared rules below apply to all of them.

The palette groups blocks by folder (Basic — Output, Input, Context, Condition, Loops, Module, Data Operations, Utility — plus Table, Chat, File, Knowledge, System, Tools, User, and [connected services](https://docs.vettero.com/integrations/third-party-services)). Search the palette instead of memorizing types.

**System** palette folders include [Send Notification](https://docs.vettero.com/build/workflows/blocks/notification/send) (in-app [bell inbox](https://docs.vettero.com/concepts/notifications); does not pause the run), [Form Link](https://docs.vettero.com/build/workflows/blocks/form-links) (private [form](https://docs.vettero.com/data/forms) URLs), and [Share Agent](https://docs.vettero.com/build/workflows/blocks/share-agent) (hosted [Web chat](https://docs.vettero.com/integrations/chat-integrations) URLs).

### Anatomy

<table>
<thead>
  <tr>
    <th>
      Part
    </th>
    
    <th>
      What it is
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Type
      </strong>
    </td>
    
    <td>
      What the block does (condition, loop, send email, table op, and so on)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Config
      </strong>
    </td>
    
    <td>
      Fields in the inspector — literals, variable bindings, or nested mappings
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Handles
      </strong>
    </td>
    
    <td>
      Connection points. Default: <strong>
        target
      </strong>
      
       in, <strong>
        source
      </strong>
      
       out. Most blocks also have an optional <strong>
        Error
      </strong>
      
       outlet (bottom). Some types add extra outlets (false branch, loop body, async tasks, Try Do / On error / Always).
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Service
      </strong>
    </td>
    
    <td>
      Required on integration blocks — pick a <a href="https://docs.vettero.com/integrations/third-party-services">
        connected service
      </a>
      
       with the matching capability enabled
    </td>
  </tr>
</tbody>
</table>

Connect **source** of one block to **target** of the next unless the inspector or handle label says otherwise (for example a condition’s false outlet, a loop’s callback body, or an **Error** outlet into [Branch errors](https://docs.vettero.com/build/workflows/blocks/error/branch)).

Catchable block failures continue on **Error** when that outlet is connected. If it is not, the error bubbles to [Try](https://docs.vettero.com/build/workflows/blocks/error/try) **On error**, or the run fails. Unexpected thrown `Error` values and platform limits are fatal: they skip Error / On error, still run Try **Always** when possible, then abort. See [Error](https://docs.vettero.com/build/workflows/blocks/error).

### Variables and the data pipe

Config fields can be a **fixed value** or a **variable** path. Paths resolve against the run context at that block.

<table>
<thead>
  <tr>
    <th>
      Path
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        args.*
      </code>
    </td>
    
    <td>
      Workflow <strong>
        Arguments
      </strong>
      
       (input schema)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        env.*
      </code>
    </td>
    
    <td>
      Workspace environment variables
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pipe.value
      </code>
      
       / <code>
        pipe.*
      </code>
    </td>
    
    <td>
      Output of the <strong>
        upstream
      </strong>
      
       block on the data pipe
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        pipe.error
      </code>
      
       / <code>
        error.*
      </code>
    </td>
    
    <td>
      Catchable failure on a block <strong>
        Error
      </strong>
      
       outlet or Try <strong>
        On error
      </strong>
      
       (not <code>
        pipe.value
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      Named keys
    </td>
    
    <td>
      Variables set by Set / Update / Bind Pipe, or on Start / Lambda
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        session.*
      </code>
    </td>
    
    <td>
      Chat session fields on <strong>
        chat
      </strong>
      
       workflows
    </td>
  </tr>
  
  <tr>
    <td>
      Loop / task context
    </td>
    
    <td>
      Extra fields inside a nested body (item, index, task args) — shown in that block’s context
    </td>
  </tr>
</tbody>
</table>

How a block treats the pipe:

<table>
<thead>
  <tr>
    <th>
      Mode
    </th>
    
    <th>
      Behavior
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Value
      </strong>
      
       (typical)
    </td>
    
    <td>
      This block’s output becomes <code>
        pipe
      </code>
      
       for the next block
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Input
      </strong>
    </td>
    
    <td>
      Forwards the incoming pipe unchanged (Note and Bind Pipe)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Unset
      </strong>
    </td>
    
    <td>
      Does not pass a value on the pipe
    </td>
  </tr>
</tbody>
</table>

Bind only paths that exist in that block’s context. Missing paths resolve as empty.

### Scope, loops, and nested bodies

Most blocks run on the **main** path after start. Loops, async, and similar types expose a **Callback** outlet. That outlet is a **new callback scope**, not a continuation of the main path.

Connect **Callback** to a [Lambda](https://docs.vettero.com/build/workflows/blocks/module/lambda) block (`lambda.start`). Blocks after Lambda run **inside** the nested body. Named variables from outside still work. **args.*** become that handle’s callback values. Lambda puts the same object on **pipe.value**.

- Nested bodies cannot jump back onto the main path except through the parent block’s normal outlets.
- A [Return](https://docs.vettero.com/build/workflows/blocks/module/return) inside a nested body returns from that body (matching the handle’s return shape), not from the whole workflow.
- The main path’s **Return** block is what callers receive, and it must match the workflow **Return** schema.

Some blocks are valid only on the main path, only inside a callback, or in both. **Lambda** is callback-scope only. The builder rejects invalid placement.

### Channel and human-in-the-loop

Each block type lists which workflow **channels** it supports. Chat-only blocks (prompts, carousels, many inputs) cannot sit on a **general** graph — switch the workflow to **chat**, or pick a general-capable block.

**Human-in-the-loop** blocks pause the run until a person answers (chat input, upload, rating). Use them on **chat** workflows with a live session. A **general** run (agent tool, widget, mapped event) has no user to wait on; those waits fail for callers such as `vt.runWorkflow`.

### Structured input and output

Set **Arguments** when callers pass parameters. Downstream blocks read `args.<property>`. [Start](https://docs.vettero.com/build/workflows/blocks/module/start) also puts the input object on the pipe for the first step.

Set **Return** when callers need a result. Defining the schema is not enough: every completing path on the main graph must reach a [Return](https://docs.vettero.com/build/workflows/blocks/module/return) block whose mapped fields match that schema (exact property names). Branching paths each need a Return (or merge into one).

Omit both schemas for side-effect or UI-only chat flows that do not return data to a caller.

## Run and attach

<table>
<thead>
  <tr>
    <th>
      Caller
    </th>
    
    <th>
      How
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        <a href="https://docs.vettero.com/integrations/chat-integrations">
          Chat integrations
        </a>
      </strong>
      
       / <strong>
        <a href="https://docs.vettero.com/build/channels/in-app">
          In App channels
        </a>
      </strong>
    </td>
    
    <td>
      Web widget or sidebar assistant for a <strong>
        chat
      </strong>
      
       (or voice/UI) workflow
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        <a href="https://docs.vettero.com/build/agents">
          Agents
        </a>
      </strong>
    </td>
    
    <td>
      Tools picker or <code>
        #
      </code>
      
       mention — workflow must be <strong>
        general
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        <a href="https://docs.vettero.com/build/functions">
          Functions
        </a>
        
         / <a href="https://docs.vettero.com/build/widgets">
          widgets
        </a>
      </strong>
    </td>
    
    <td>
      Bind as a resource or job; <code>
        vt.runWorkflow
      </code>
      
       / <code>
        vt.startJob
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        <a href="https://docs.vettero.com/build/event-handlers">
          Event handlers
        </a>
      </strong>
    </td>
    
    <td>
      Free-form handler workflow, or map the event to this workflow
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Another workflow
      </strong>
    </td>
    
    <td>
      Palette resource / invoke block
    </td>
  </tr>
</tbody>
</table>

Callers pass an object matching **Arguments**. `runWorkflow` waits for completion and fails if the run errors or sits in human approval.

## Limits

- **Channel** is chosen at create and cannot change.
- Chat-only and HITL blocks are invalid on **general** graphs.
- Integration blocks need a connected service with the right capability.
- System-managed event-handler workflows cannot be renamed or deleted as ordinary workflows. Mapping-mode handler graphs are not free-form edited.

## Where workflows are used

<table>
<thead>
  <tr>
    <th>
      Place
    </th>
    
    <th>
      How
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Build → Workflows
      </strong>
    </td>
    
    <td>
      Root list and detail
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Agent builder → Workflows
      </strong>
    </td>
    
    <td>
      Nested graphs
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        <a href="https://docs.vettero.com/build/agents">
          Agents
        </a>
      </strong>
    </td>
    
    <td>
      Callable <strong>
        general
      </strong>
      
       tools
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        <a href="https://docs.vettero.com/build/event-handlers">
          Event handlers
        </a>
      </strong>
    </td>
    
    <td>
      Handler graph or mapping target
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        <a href="https://docs.vettero.com/build/functions">
          Functions
        </a>
        
         / <a href="https://docs.vettero.com/build/widgets">
          widgets
        </a>
      </strong>
    </td>
    
    <td>
      Bound resource or job
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        <a href="https://docs.vettero.com/integrations/chat-integrations">
          Chat integrations
        </a>
      </strong>
      
       / <strong>
        <a href="https://docs.vettero.com/build/channels">
          Channels
        </a>
      </strong>
    </td>
    
    <td>
      Web widget or In App / messaging / voice when the workflow has a supported channel
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        <a href="https://docs.vettero.com/configuration/mcp-servers">
          MCP Servers
        </a>
      </strong>
    </td>
    
    <td>
      Listed workflows as MCP tools
    </td>
  </tr>
</tbody>
</table>


## Sitemap

See the full [sitemap](https://docs.vettero.com/sitemap.md) for all pages.
