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

# Step Functions

> The step functions composable inside actions[].steps and events.setup steps.

Step functions are the named runtime operations you compose inside `actions[].steps` and `events.setup.*.steps`. Each takes a typed `parameters` object and produces a typed output that downstream steps and the action's `result` reference via `${steps.<stepId>.output.*}`.

## Step shape

Each step in a step list invokes one step function. Two shapes are discriminated by the presence of an `iterator`: a `SimpleStep` runs once, and a `ForeachStep` runs once per element of the array its `iterator` resolves to. Every step has a `stepId` unique within its action, a `stepFunction` naming the function to run and its `parameters`, and an optional `condition` that skips the step when it evaluates false.

<Tabs>
  <Tab title="SimpleStep">
    <table>
      <colgroup>
        <col width="210" />

        <col width="400" />

        <col width="90" />

        <col width="90" />
      </colgroup>

      <thead>
        <tr>
          <th>Field</th>
          <th>Description</th>
          <th>Type</th>
          <th>Required</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>`condition`</td>
          <td>Expression gating whether this step runs.</td>
          <td>string</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`description`</td>
          <td>Explains what this step does.</td>
          <td>string</td>
          <td>Yes</td>
        </tr>

        <tr>
          <td>`ignoreError`</td>
          <td>Whether a failure in this step is ignored so execution continues.</td>
          <td>boolean</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`onConditionError`</td>
          <td>How to behave when the condition expression errors.<br />Allowed: `true`, `false`, `break`</td>
          <td>enum</td>
          <td>No</td>
        </tr>

        <tr>
          <td>[`stepFunction`](#steps-stepfunction)</td>
          <td>Step function executed by this step.</td>
          <td>object</td>
          <td>Yes</td>
        </tr>

        <tr>
          <td>`stepId`</td>
          <td>Identifier for this step, used to reference its output.</td>
          <td>string</td>
          <td>Yes</td>
        </tr>
      </tbody>
    </table>

    <AccordionGroup>
      <Accordion title="steps.stepFunction">
        Step function executed by this step.

        <table>
          <colgroup>
            <col width="210" />

            <col width="400" />

            <col width="90" />

            <col width="90" />
          </colgroup>

          <thead>
            <tr>
              <th>Field</th>
              <th>Description</th>
              <th>Type</th>
              <th>Required</th>
            </tr>
          </thead>

          <tbody>
            <tr>
              <td>`functionName`</td>
              <td>Name of the step function to execute.</td>
              <td>string</td>
              <td>Yes</td>
            </tr>

            <tr>
              <td>`parameters`</td>
              <td>Arguments passed to the step function.</td>
              <td>object</td>
              <td>Yes</td>
            </tr>

            <tr>
              <td>`version`</td>
              <td>Version of the step function to use.</td>
              <td>string</td>
              <td>No</td>
            </tr>
          </tbody>
        </table>
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="ForeachStep">
    <table>
      <colgroup>
        <col width="210" />

        <col width="400" />

        <col width="90" />

        <col width="90" />
      </colgroup>

      <thead>
        <tr>
          <th>Field</th>
          <th>Description</th>
          <th>Type</th>
          <th>Required</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>`condition`</td>
          <td>Expression gating whether this step runs.</td>
          <td>string</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`description`</td>
          <td>Explains what this step does.</td>
          <td>string</td>
          <td>Yes</td>
        </tr>

        <tr>
          <td>`ignoreError`</td>
          <td>Whether a failure in this step is ignored so execution continues.</td>
          <td>boolean</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`iterator`</td>
          <td>Expression that produces the array this step loops over. The step function(s) run once per item until the array is exhausted, halting early if an item fails and `ignoreError` is not set.</td>
          <td>string</td>
          <td>Yes</td>
        </tr>

        <tr>
          <td>`onConditionError`</td>
          <td>How to behave when the condition expression errors.<br />Allowed: `true`, `false`, `break`</td>
          <td>enum</td>
          <td>No</td>
        </tr>

        <tr>
          <td>[`stepFunction`](#steps-stepfunction)</td>
          <td>Step function run for each iterated item. Provide this or `stepFunctions`, not both.</td>
          <td>object</td>
          <td>No</td>
        </tr>

        <tr>
          <td>[`stepFunctions`](#steps-stepfunctions)</td>
          <td>Step functions run in sequence for each iterated item. Provide this or `stepFunction`, not both.</td>
          <td>object\[]</td>
          <td>No</td>
        </tr>

        <tr>
          <td>`stepId`</td>
          <td>Identifier for this step, used to reference its output.</td>
          <td>string</td>
          <td>Yes</td>
        </tr>
      </tbody>
    </table>

    <AccordionGroup>
      <Accordion title="steps.stepFunction">
        Step function run for each iterated item. Provide this or `stepFunctions`, not both.

        <table>
          <colgroup>
            <col width="210" />

            <col width="400" />

            <col width="90" />

            <col width="90" />
          </colgroup>

          <thead>
            <tr>
              <th>Field</th>
              <th>Description</th>
              <th>Type</th>
              <th>Required</th>
            </tr>
          </thead>

          <tbody>
            <tr>
              <td>`functionName`</td>
              <td>Name of the step function to execute.</td>
              <td>string</td>
              <td>Yes</td>
            </tr>

            <tr>
              <td>`parameters`</td>
              <td>Arguments passed to the step function.</td>
              <td>object</td>
              <td>Yes</td>
            </tr>

            <tr>
              <td>`version`</td>
              <td>Version of the step function to use.</td>
              <td>string</td>
              <td>No</td>
            </tr>
          </tbody>
        </table>
      </Accordion>

      <Accordion title="steps.stepFunctions">
        Step functions run in sequence for each iterated item. Provide this or `stepFunction`, not both.

        <table>
          <colgroup>
            <col width="210" />

            <col width="400" />

            <col width="90" />

            <col width="90" />
          </colgroup>

          <thead>
            <tr>
              <th>Field</th>
              <th>Description</th>
              <th>Type</th>
              <th>Required</th>
            </tr>
          </thead>

          <tbody>
            <tr>
              <td>`functionName`</td>
              <td>Name of the step function to execute.</td>
              <td>string</td>
              <td>Yes</td>
            </tr>

            <tr>
              <td>`parameters`</td>
              <td>Arguments passed to the step function.</td>
              <td>object</td>
              <td>Yes</td>
            </tr>

            <tr>
              <td>`version`</td>
              <td>Version of the step function to use.</td>
              <td>string</td>
              <td>No</td>
            </tr>
          </tbody>
        </table>
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>

## Step functions

### Requests

<CardGroup cols={2}>
  <Card title="request" href="/connector-yaml-reference/step-functions/request" />

  <Card title="paginated_request" href="/connector-yaml-reference/step-functions/paginated-request" />

  <Card title="soap_request" href="/connector-yaml-reference/step-functions/soap-request" />

  <Card title="soap_paginated_request" href="/connector-yaml-reference/step-functions/soap-paginated-request" />
</CardGroup>

### Transform data

<CardGroup cols={2}>
  <Card title="map_fields" href="/connector-yaml-reference/step-functions/map-fields" />

  <Card title="typecast" href="/connector-yaml-reference/step-functions/typecast" />

  <Card title="group_data" href="/connector-yaml-reference/step-functions/group-data" />

  <Card title="static_values" href="/connector-yaml-reference/step-functions/static-values" />
</CardGroup>

### Files

<CardGroup cols={2}>
  <Card title="upload_file" href="/connector-yaml-reference/step-functions/upload-file" />

  <Card title="upload_binary" href="/connector-yaml-reference/step-functions/upload-binary" />

  <Card title="download_file" href="/connector-yaml-reference/step-functions/download-file" />
</CardGroup>

### Events & automation

<CardGroup cols={2}>
  <Card title="emit_event" href="/connector-yaml-reference/step-functions/emit-event" />

  <Card title="browser_use" href="/connector-yaml-reference/step-functions/browser-use" />
</CardGroup>
