---
title: "Lambda"
description: "Start a nested callback body. Connect from a Callback outlet (loop, async, and similar). Optionally set local variables."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/module/lambda"
---
# Lambda

> Start a nested callback body. Connect from a Callback outlet (loop, async, and similar). Optionally set local variables.

<block-meta block="Yes" channels="Any" folder="basic/module" group="Module" groupTo="/build/workflows/blocks/module" icon="i-lucide-flag" pipe="Value" scope="Callback, async callback" tool="No" type="lambda.start">



</block-meta>

**Lambda** (palette name **Lambda**, type `lambda.start`) is the start of a **callback** scope. Connect it to a parent **Callback** outlet — for example a [loop](https://docs.vettero.com/build/workflows/blocks/loops) — not to the main **Out** path.

That outlet is a **new scope**. Blocks after Lambda run only inside the nested body. Named variables from outside still work. This body’s **args.*** are the callback values from the handle (item, index, and similar). Lambda puts those same callback args on **pipe.value** for the next block — `pipe.value` and `args.*` are the same object. You cannot wire the body back onto the main path except through the parent’s normal **Out**.

**Variables** on Lambda are [Set](https://docs.vettero.com/build/workflows/blocks/context/set) in **this** body only. They do not change names on the outer workflow. Use [Update](https://docs.vettero.com/build/workflows/blocks/context/update) to change an outer name.

A [Return](https://docs.vettero.com/build/workflows/blocks/module/return) after Lambda returns from **this body** (this iteration or task), not from the whole workflow. The parent loop or task collects that value. That is not the same as Return on the main path after [Start](https://docs.vettero.com/build/workflows/blocks/module/start).

Lambda is valid in **callback** and **async callback** scope only. The builder rejects it on the main path.

## Configure

<table>
<thead>
  <tr>
    <th>
      Setting
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Output schema
      </strong>
      
       (optional)
    </td>
    
    <td>
      Shape this body should <strong>
        return
      </strong>
      
      . When set, it must match the parent handle’s return shape exactly (for example a for-of item result)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Variables
      </strong>
    </td>
    
    <td>
      Optional named values set in this body’s local scope when the lambda starts. Same as <a href="https://docs.vettero.com/build/workflows/blocks/context/set">
        Set
      </a>
      
      , including naming rules.
    </td>
  </tr>
</tbody>
</table>

If you leave output schema empty, the parent handle’s return shape is used.

## Handles

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

<tbody>
  <tr>
    <td>
      <strong>
        In
      </strong>
      
       (target)
    </td>
    
    <td>
      Connect from the parent <strong>
        Callback
      </strong>
      
       (lambda) outlet
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Out
      </strong>
      
       (source)
    </td>
    
    <td>
      Continues the nested body toward <a href="https://docs.vettero.com/build/workflows/blocks/module/return">
        Return
      </a>
    </td>
  </tr>
</tbody>
</table>

## Pipe schema

The next block in the body reads this on the data pipe (`pipe.value`). That value **is** the `args` object this invocation received from the parent handle — the same object as `args.*`.

Keys are exact names from that handle (for example `item` and `index` on [For Of](https://docs.vettero.com/build/workflows/blocks/loops/for-of) — not `Item`). After a later block runs, `pipe.value` becomes that block’s output; `args.*` stay the callback args for the rest of the body.

## Use case

- After a [For Of](https://docs.vettero.com/build/workflows/blocks/loops/for-of) **Callback**, start the per-item body with Lambda, then [Return](https://docs.vettero.com/build/workflows/blocks/module/return) a mapped value.
- Same pattern for [For](https://docs.vettero.com/build/workflows/blocks/loops/for), [While](https://docs.vettero.com/build/workflows/blocks/loops/while), and other callback outlets (including async tasks).
- Keep loop logic in its own scope so a **Return**, [Continue](https://docs.vettero.com/build/workflows/blocks/loops/continue), or [Break](https://docs.vettero.com/build/workflows/blocks/loops/break) cannot be mistaken for the workflow’s main Return.

<block-page-nav>



</block-page-nav>


## Sitemap

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