# AutomationNodeType

A type of step an automation flow is built from: a trigger that starts a run, a condition, an action, or a step that steers the run, such as a split or a loop. Its `config_schema` says which settings a step of the type takes.

## Used by
- GET /api/v2/automation-node-types: List the step types automations are built from (AutomationNodeTypeList)
- GET /api/v2/automation-node-types/{automation_node_type}: Read a step type with the schema of its settings (AutomationNodeType)

## AutomationNodeType fields
- type (string ≤ 100, required): The step type as a flow stores it in `nodes[].type`, such as `action.notify`.
- slug (string ≤ 100, required): The type with `.` replaced by `-`, such as `action-notify`: how this API addresses it.
- kind (string, required): `trigger` starts a run and is always the flow's first step; `condition` and `action` are steps; `flow` steers the run, such as a split, a loop, a wait or a stop.
- category (string or null, required): The group the builder lists it in; `null` for triggers.
- label (string ≤ 255, required): The step type's name.
- description (string or null, required, multiline): What a step of the type does.
- available (boolean, required): Whether you may add it to a flow whose trigger has no record, such as a schedule. `false` does not always mean you cannot use it: some types fit a record trigger only, such as "Add to timeline", or only "Record updated", such as "Field changed", and the steps of an integration need it set up. Check the step in its flow with `check-flow` to know.
- allowed_in_loop (boolean, required): Whether it may be among the steps a loop repeats.
- lanes (array of object, required): The ways out of a step of the type with no settings yet. Lines name them in `edges[].lane`, so their keys never change.
  - key (string ≤ 40, required): The lane key, such as `next`, `yes` or `each`.
  - label (string ≤ 100, required): What the builder calls it.
  - kind (string, required): `next` simply follows, `branch` is one way a decision can go, `body` is what a loop repeats, `after` follows once a loop is done.
- lanes_from_config (object or null, required): For a step whose ways out come from its own settings, such as the paths of a split: where those settings list them. `null` for a step whose ways out never change.
  - list (string ≤ 100, required): The setting that lists them.
  - key (string ≤ 100, required): The member of each item that is its lane key.
  - label (string ≤ 100, required): The member of each item that is its name.
  - fallback (string ≤ 40, required): The lane taken when none of them applies.
- takes_one_lane (object, required): Whether each run goes down exactly one of the step's ways out, so a step its lines meet in runs once rather than once per way.
  - always (boolean, required): Whether each run always goes down exactly one way out.
  - config (string or null ≤ 100, optional): The setting that decides it, when it depends on one.
  - equals (string or null ≤ 100, optional): The value of that setting for which it is so.
  - default (string or null ≤ 100, optional): That setting's value when it is not set.
- passes_through (boolean, required): Whether the step hands on what came before it as `{{ prev.* }}` instead of its own output, as a decision or a wait does.
- manual (boolean or null, required): For a trigger: whether people start the automation by hand. `null` for other steps.
- receives_webhooks (boolean or null, required): For a trigger: whether other systems start it by sending a request to the automation's own address. `null` for other steps.
- watches_dates (boolean or null, required): For a trigger: whether it starts when a date on a record is reached. `null` for other steps.
- config_schema (object, required, detail only): The JSON Schema of the step's settings, `nodes[].config`, translated from the checks saving a flow runs. A setting it does not list is refused. Where a check depends on other settings or on the data before the step, such as the fields of the trigger's record, the property carries `x-plnnrly-checked-on-save: true` and says what is checked; check a whole flow with its automation's `check-flow` action.
- secret_inputs (array of object, required, detail only): The settings that take a secret, such as a token for another system. A secret is write-only: saving the flow stores it encrypted and keeps only its reference, which is all a read shows.
  - input (string ≤ 100, required): The setting a secret value is sent in, such as `headers.*.value`.
  - stored_as (string ≤ 100, required): The setting that holds its reference once saved, such as `headers.*.secret`.
- outputs (array of object, required, detail only): What a step of the type with no settings yet hands to later steps. Many depend on the settings, such as the record type a search goes through.
  - key (string ≤ 100, required): The member a later step reads as `{{ steps.<key>.<member> }}`.
  - label (string ≤ 255, required): What it is called.
  - type (string, required): What kind of value it holds.
  - record_type (string or null ≤ 255, optional): For a record, its type, so later steps can read its fields.
- links (AutomationNodeTypeLinks, required)
  - self (url, required): The canonical URI of this record.

Only on `?view=detail`: config_schema, secret_inputs, outputs

## Variants

### AutomationNodeTypeList

What a collection returns, and what `?view=summary` returns on a single record.

16 fields.
Omits: config_schema, secret_inputs, outputs

### AutomationNodeTypeLinks

The `links` object on this resource.

Keys: self

## Example
```json
{
  "type": "…",
  "slug": "…",
  "kind": "trigger",
  "category": "fetch",
  "label": "…",
  "description": "…",
  "available": false,
  "allowed_in_loop": false,
  "lanes": [
    {
      "key": "…",
      "label": "…",
      "kind": "next"
    }
  ],
  "lanes_from_config": {
    "list": "…",
    "key": "…",
    "label": "…",
    "fallback": "…"
  },
  "takes_one_lane": {
    "always": false,
    "config": "…",
    "equals": "…",
    "default": "…"
  },
  "passes_through": false,
  "manual": false,
  "receives_webhooks": false,
  "watches_dates": false,
  "config_schema": {},
  "secret_inputs": [
    {
      "input": "…",
      "stored_as": "…"
    }
  ],
  "outputs": [
    {
      "key": "…",
      "label": "…",
      "type": "string",
      "…": "1 optional field left out"
    }
  ],
  "links": {
    "self": "https://<your-url>/api/v2/work-items/1"
  }
}
```
