Node reference
Delete State
Remove saved workflow memory
Delete State removes one saved key from this workflow on the current runtime. Use it to clear a checkpoint or reset a stored preference.
Try it step by step#
- Save greeting with Set State, then connect Delete State with Key set to greeting.
- Connect Get State using the same key.
- Run and inspect both results. Run Delete State again without another write to see what happens when the key is already absent.
What to expect#
The first deletion reports {"key":"greeting","deleted":true}. A later deletion reports deleted: false. Get State reports found: false after either.
Things to check#
- Deletion affects this one key, not every saved value.
- Use the same spelling and expression result in the read, write, and delete steps. A different key is a different stored value.
Keep learning#
Parameters#
| Setting | Default | What it does |
|---|---|---|
| Key | (empty) | A name private to this workflow. Expressions can choose it dynamically. |
Inputs#
| Port | Value | Description |
|---|---|---|
in | any | Trigger that removes the configured workflow State key. |
Outputs#
| Port | Value | Description |
|---|---|---|
out | object | The key and whether it existed before deletion. |
out fields#
| Field | Type | Description |
|---|---|---|
key | string | Workflow-scoped State key. |
deleted | boolean | Whether a stored value was removed. |