OFFICIAL EXAMPLE
Remember a value
Read a workflow State key, save a message, and confirm that the next run remembers it.
Before you begin#
- Use the Browser runtime and keep browser storage available. This example only writes the greeting key in its own workflow State.
Walk through the workflow#
- Import a new copy and run it once. The first Get State node reports found: false because the copy starts with no saved greeting.
- Set State saves the text Hello from a previous run. The final Get State reads it back with found: true.
- Run the same workflow again. The first Get State now finds the saved value before the write occurs.
- To start fresh, import another copy. State belongs to each workflow and the runtime where it runs; it is not included in downloaded files.