Remember values between runs
Stored values let a workflow pick up where it left off, keep a count, or share a value with other workflows, from one run to the next.
Each run starts fresh: a step's result lasts only until the run ends. To keep something for the next run, such as the last record a workflow processed, save it as a stored value.
The four steps
| Step | What it does |
|---|---|
| Set a stored value | Saves a Value under a Name, replacing what was there |
| Get a stored value | Reads it back, or returns the Default value when nothing is stored yet |
| Increment a stored value | Adds an Amount (1 unless you change it) to a counter and returns the new total |
| Delete a stored value | Removes it; deleting something that was never set does nothing |
Each value has a Scope: the whole workspace, shared by every workflow, or just this workflow.
Pick up where it left off
A scheduled workflow that handles new records can remember how far it got:
- Trigger
Run on schedule
Built-in step · every hour
Get a stored value
Built-in step · last_seen
List orders
Shopify · created after @cursor.value
Repeat for each item
Built-in step
Create a QuickBooks invoice
QuickBooks
End repeat
Built-in step
Set a stored value
Built-in step · last_seen
Get a stored value returns found, which is false the first time, and value. Give it a Default value so the first run knows where to start.
Count things safely
Increment a stored value is safe to run from many runs at once: every increment is counted, with none lost. The counter starts at zero the first time. Its value must be a number; if it holds something else, the step fails and nothing is added.
Names and fields
Names use letters, digits and underscores, and each part can't start with a digit, such as last_seen or invoice_count. To work with one field inside a stored object, add a dotted path: customer.email. Setting a dotted path fills in any missing objects along the way.
Letting workflows change a value
A workflow can always read a stored value. To set, increment or delete one that someone created in the workspace, that value needs Let workflows edit this value turned on. A value a workflow creates itself can always be edited by workflows.
Reference
Every field of these steps is on the Stored Data Values reference page.
Use an AI agent
Give an AI a task, files to read and tools to use, and get back an answer or the exact fields you ask for. Use it where the work has no fixed recipe.
Run a workflow from another
Build a procedure once, such as "look up a customer", and use it as a step in any workflow. It takes inputs, hands back outputs, and doesn't count as an extra run.