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

# Set Workflow State

> Store a value after a successful run. Exact configuration, ports, placement, and execution behavior.

**Node type:** `set_workflow_state` · **Version:** `1` · **Category:** Data

Store a value after a successful run. This node can change external state or produce an external side effect.

## Configuration

| Field   | Type   | Default | What it controls                                      |
| ------- | ------ | ------- | ----------------------------------------------------- |
| `key`   | string | `""`    | Workflow-scoped state key.                            |
| `value` | any    | `null`  | Literal value, protected reference, or mapped output. |

<Note>State writes are committed only after the complete workflow succeeds. Node tests only preview state changes.</Note>

## Workflow JSON

The editor stores this node with the following implemented default configuration:

```json title="Default node configuration" theme={"system"}
{
  "type": "set_workflow_state",
  "version": 1,
  "configuration": {
    "key": "",
    "value": null
  }
}
```

Values may be entered literally or mapped from an earlier compatible output when the inspector exposes a mapping control. See [Variables and data mapping](/workflows/variables-and-data).

## Inputs

| Port    | Type     | Required | Description |
| ------- | -------- | -------- | ----------- |
| `key`   | `string` | Yes      | Key         |
| `value` | `any`    | Yes      | Value       |

## Outputs

| Port    | Type  | Required | Description  |
| ------- | ----- | -------- | ------------ |
| `value` | `any` | No       | Stored value |

## Where it can run

* Desktop local runner
* Paired self-hosted runner
* Hosted runner

## Test and inspect

Use **Test node** in the editor to preview this step with the current configuration. A full run records resolved inputs, outputs, logs, duration, and any artifacts in the execution inspector. Side-effecting or destructive nodes can require an additional confirmation or approved workflow permission.
