blokboard/ Open app

Node reference

Get State

Read this workflow's memory on the current runtime

CoreData

Get State reads a value saved by an earlier step or run of the same workflow on the same runtime. Use it to remember a checkpoint or a previous result.

Try it step by step#

  1. Set Key to greeting and run Get State before anything has saved that key.
  2. Add Set State with the same key and the value Hello, then a second Get State.
  3. Run the workflow twice and compare the first read in each run.

What to expect#

A missing key returns {"key":"greeting","found":false,"value":null}. After saving, it returns found: true and value: "Hello".

Things to check#

  • Check found to distinguish a missing key from a saved null value.
  • State belongs to the workflow and runtime. An imported copy starts with its own State, and moving execution to another runtime does not move stored values.

Keep learning#

Parameters#

SettingDefaultWhat it does
Key(empty)A name private to this workflow. Expressions can choose it dynamically.

Inputs#

PortValueDescription
inanyTrigger that reads the configured workflow State key.

Outputs#

PortValueDescription
outobjectThe stored value and whether the key exists.

out fields#

FieldTypeDescription
keystringWorkflow-scoped State key.
valueunknownJSON-compatible State value.
foundbooleanWhether this workflow has the key.