> ## 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 operations you chain together as steps to build a connector's actions and event setup.

**Step functions** are the operations a connector runs, one step at a time, to carry out an [action](/connector-yaml-reference/yaml-schema/actions) or set up [events](/connector-yaml-reference/yaml-schema/events). Each step takes parameters and returns output that later steps and the result of the action or event setup can use. See [Expression Language](/connector-yaml-reference/expression-language) for how to reference a step's output.

## Step shape

Steps take one of two shapes:

<Tabs>
  <Tab title="SimpleStep">
    Runs one step function once.

    <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>JEXL 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: `false` (default) skips the step, `true` runs it anyway, and `break` halts the action.<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">
    Runs one or more step functions once for each item in the array its `iterator` resolves to.

    <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>JEXL 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: `false` (default) skips the step, `true` runs it anyway, and `break` halts the action.<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

Calls that send a request and return a response for later steps to use.

<CardGroup cols={2}>
  <Card title="request" href="/connector-yaml-reference/step-functions/request">
    Sends an HTTP request to the provider's API and returns the response.
  </Card>

  <Card title="paginated_request" href="/connector-yaml-reference/step-functions/paginated-request">
    Sends HTTP requests to a paginated endpoint until it has one page of results, then returns a cursor for the next page.
  </Card>

  <Card title="soap_request" href="/connector-yaml-reference/step-functions/soap-request">
    Sends a SOAP request to the provider and returns the parsed response.
  </Card>

  <Card title="soap_paginated_request" href="/connector-yaml-reference/step-functions/soap-paginated-request">
    Sends SOAP requests to a paginated endpoint until it has one page of results, then returns a cursor for the next page.
  </Card>

  <Card title="mcp_request" href="/connector-yaml-reference/step-functions/mcp-request">
    Calls a tool on the provider's MCP server, or lists the tools it offers.
  </Card>

  <Card title="code_execution_lambda" href="/connector-yaml-reference/step-functions/code-execution-lambda">
    Invokes an AWS Lambda function, returning its response when invoked synchronously.
  </Card>

  <Card title="call_action" href="/connector-yaml-reference/step-functions/call-action">
    Runs another action and returns its result.
  </Card>
</CardGroup>

### Authentication

Prepare credentials that later requests use for authorization.

<CardGroup cols={2}>
  <Card title="sign_jwt" href="/connector-yaml-reference/step-functions/sign-jwt">
    Signs a JWT with a private key, for later requests to use as a credential.
  </Card>
</CardGroup>

### Transform Data

Work on manipulating data already available in the action from the current context and previous steps.

<CardGroup cols={2}>
  <Card title="map_fields" href="/connector-yaml-reference/step-functions/map-fields">
    Maps fields from source data onto the shape the action returns.
  </Card>

  <Card title="typecast" href="/connector-yaml-reference/step-functions/typecast">
    Converts fields in source data to their declared types.
  </Card>

  <Card title="group_data" href="/connector-yaml-reference/step-functions/group-data">
    Combines the output of several earlier steps into one record or list.
  </Card>

  <Card title="static_values" href="/connector-yaml-reference/step-functions/static-values">
    Returns fixed values, or the result of an expression.
  </Card>
</CardGroup>

### Files

Upload files to a provider or download them from one.

<CardGroup cols={2}>
  <Card title="upload_file" href="/connector-yaml-reference/step-functions/upload-file">
    Uploads a file to the provider as a multipart form.
  </Card>

  <Card title="upload_binary" href="/connector-yaml-reference/step-functions/upload-binary">
    Uploads raw binary content to the provider.
  </Card>

  <Card title="download_file" href="/connector-yaml-reference/step-functions/download-file">
    Downloads a file from the provider, as a buffer or a stream.
  </Card>
</CardGroup>

### Events & Automation

Start work outside the action's request and response flow.

<CardGroup cols={2}>
  <Card title="emit_event" href="/connector-yaml-reference/step-functions/emit-event">
    Emits an event with a type, date and payload.
  </Card>

  <Card title="browser_use" href="/connector-yaml-reference/step-functions/browser-use">
    Runs a task in a browser session, starting at a given URL.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.