Stored Values
Built-in step · 10 steps
Save and reuse values across steps and runs: single values, counters, lists that collect items, and tables of rows.
To learn when to use these steps, with examples, read Remember values between runs.
Steps
| Step | What it does |
|---|---|
| Add to a stored list | Add an item to the end of a stored list, starting the list the first time, and get the whole list back. |
| Add to a stored number | Add a number to a counter and get the new total back. |
| Delete a stored value | Remove a stored value (a whole stored table included), or, with a dotted name, just one field of it. |
| Delete rows from a stored table | Remove the rows of a table stored in Lodol whose column holds a value, for example every row whose Status is done. |
| Find rows in a stored table | Look up rows in a table stored in Lodol: the rows whose column matches a value (for example the row whose Email is ana@example.com, or the orders whose Total is more than 100), or every row when no column is chosen. |
| Get a stored value | Read a stored value so the workflow can pick up where it left off, for example the last record it processed. |
| Pick the next one in turn | Hand out a list's people or things one after another, going back to the first after the last: the next sales rep for a new lead, the next person on the support rota. |
| Save a row to a stored table | Keep a row in a table stored in Lodol, for example a customer, an order already handled, or a line in a log, with no spreadsheet to set up. |
| Set a stored value | Save a value under a name so a later step or a future run can read it back, for example a cursor marking how far the workflow has gotten. |
| Take from a stored list | Take the items out of a stored list, oldest first: all of them, or only the first few, leaving the rest. |
Add to a stored list
Add an item to the end of a stored list, starting the list the first time, and get the whole list back. Many runs can add at once and every item lands: collect new orders as they come in, then send them all in one daily summary with Take from a stored list. The value must be one workflows are allowed to edit (turn on "Let workflows edit this value" when you create it); a value the workflow creates itself is editable automatically.
Inputs
- Name
nametextRequired - The name this value is stored under, for example cursor. To work with a single field inside a stored object, add a dotted path such as user.email. Letters, digits, and underscores only; each part can't start with a digit.
- Item
itemtextRequired - What to add: some text, a number, or a whole record, such as the order a trigger brought in.
- Add a list's items one by one
each_itemtrue/false - When the item is a list, add each of its items to the stored list rather than the list as one item.Default:
false. - Skip items already in the list
skip_presenttrue/false - Leave out an item the list already holds, so the same order or email is never in it twice.Default:
false. - Scope
scopetextRequired - Where this value lives: the whole workspace (shared by every workflow), or just this workflow.One of:
workspace(Whole workspace),workflow(This workflow). Default:workspace.
Outputs
countnumber- How many items the list holds now.
itemslist- Everything in the list now, oldest first.
nametextscopetext
Example output
{
"count": 2,
"items": [
{
"id": "1001"
},
{
"id": "1002"
}
],
"name": "new_orders",
"scope": "workflow"
}Add to a stored number
Add a number to a counter and get the new total back. Starts the counter at zero the first time. The value must be a number; if it holds something else, like text, the step fails and nothing is added. Safe to run from many workflow runs at once: every increment is counted, with none lost. The value must be one workflows are allowed to edit (turn on "Let workflows edit this value" when you create it); a value the workflow creates itself is editable automatically.
Inputs
- Name
nametextRequired - The name this value is stored under, for example cursor. To work with a single field inside a stored object, add a dotted path such as user.email. Letters, digits, and underscores only; each part can't start with a digit.
- Amount
amountnumber - How much to add. Defaults to 1. Use a negative number to count down.Default:
1. - Scope
scopetextRequired - Where this value lives: the whole workspace (shared by every workflow), or just this workflow.One of:
workspace(Whole workspace),workflow(This workflow). Default:workspace.
Outputs
nametextscopetextvaluenumber- The counter's new total after adding.
Example output
{
"name": "processed_count",
"scope": "workspace",
"value": 1
}Delete a stored value
Remove a stored value (a whole stored table included), or, with a dotted name, just one field of it. Deleting something that was never set does nothing and is not an error, so it's safe to run every time. The value must be one workflows are allowed to edit (turn on "Let workflows edit this value" when you create it); a value the workflow creates itself is editable automatically.
Inputs
- Name
nametextRequired - The name this value is stored under, for example cursor. To work with a single field inside a stored object, add a dotted path such as user.email. Letters, digits, and underscores only; each part can't start with a digit.
- Scope
scopetextRequired - Where this value lives: the whole workspace (shared by every workflow), or just this workflow.One of:
workspace(Whole workspace),workflow(This workflow). Default:workspace.
Outputs
deletedtrue/false- Whether a stored value was removed.
nametextscopetext
Example output
{
"deleted": true,
"name": "last_processed_id",
"scope": "workspace"
}Delete rows from a stored table
Remove the rows of a table stored in Lodol whose column holds a value, for example every row whose Status is done. To remove the whole table, use Delete a stored value. Deleting from a table that doesn't exist, or where nothing matches, does nothing and is not an error. Text matches ignoring capitals and spaces at either end, and a number matches the same number written as text (42 and "42"). The value must be one workflows are allowed to edit (turn on "Let workflows edit this value" when you create it); a value the workflow creates itself is editable automatically.
Inputs
- Table
nametextRequired - The stored table's name, for example customers. Letters, digits, and underscores only; it can't start with a digit.
- Column
columntextRequired - The column to look in, for example Status.
- Value
valuetext - Rows whose column holds this are deleted. Leave empty to delete the rows where the column is empty.
- Scope
scopetextRequired - Where this value lives: the whole workspace (shared by every workflow), or just this workflow.One of:
workspace(Whole workspace),workflow(This workflow). Default:workspace.
Outputs
deletednumber- How many rows were deleted.
nametextrow_countnumber- How many rows the table holds now.
scopetextwhereobject- The column and value the rows matched.
Example output
{
"deleted": 2,
"name": "customers",
"row_count": 11,
"scope": "workspace",
"where": {
"column": "Plan",
"value": "Free"
}
}Find rows in a stored table
Look up rows in a table stored in Lodol: the rows whose column matches a value (for example the row whose Email is ana@example.com, or the orders whose Total is more than 100), or every row when no column is chosen. The rows can be sorted by a column, and At most keeps only the first of them, for example the 10 newest orders. Returns the rows, the first of them as row, and how many there are; a table that doesn't exist yet has no rows. For rows that must meet more than one condition, follow this step with Filter list. Text matches ignoring capitals and spaces at either end, and a number matches the same number written as text (42 and "42"). Reading is always allowed.
Inputs
- Table
nametextRequired - The stored table's name, for example customers. Letters, digits, and underscores only; it can't start with a digit.
- Column
columntext - The column to look in, for example Email. Leave empty to get every row.
- Comparison
matchtext - How the column compares with the value. Numbers compare as numbers and dates as dates, so 9 is less than 10.One of:
is,is_not(is not),contains,more_than(is more than),less_than(is less than),is_empty(is empty),is_not_empty(is not empty). Default:is. - Value
valuetext - What to compare the column with, for example Pro. Left empty with is, it finds the rows where the column is empty.Only when Comparison is is, is not, contains, is more than or is less than.
- Order
sort_ordertext - The order the rows come back in.One of:
table(In the table's order),ascending(Smallest, earliest or A first),descending(Largest, latest or Z first). Default:table. - Sort by
sort_bytext - The column to sort the rows by, for example Date.Only when Order is Smallest, earliest or A first or Largest, latest or Z first.
- At most
limitnumber - Keep only this many rows, the first after sorting. Leave empty to get every row found.At least 1.
- Scope
scopetextRequired - Where this value lives: the whole workspace (shared by every workflow), or just this workflow.One of:
workspace(Whole workspace),workflow(This workflow). Default:workspace.
Outputs
countnumber- How many rows were found (no more than At most).
foundtrue/false- Whether the table exists yet.
headerslist- The table's columns.
nametextrowobject- The first row found, or empty when none was.
rowslist- The rows found, in the table's order or the order asked for.
scopetextwhereobject- The column, comparison and value looked for, or empty when every row was asked for.
Example output
{
"count": 2,
"found": true,
"headers": [
"Name",
"Email",
"Plan"
],
"name": "customers",
"row": {
"Email": "ana@example.com",
"Name": "Ana Souza",
"Plan": "Pro"
},
"rows": [
{
"Email": "ana@example.com",
"Name": "Ana Souza",
"Plan": "Pro"
},
{
"Email": "ben@example.com",
"Name": "Ben Okafor",
"Plan": "Pro"
}
],
"scope": "workspace",
"where": {
"column": "Plan",
"value": "Pro"
}
}Get a stored value
Read a stored value so the workflow can pick up where it left off, for example the last record it processed. Returns the default you provide when nothing has been stored under this name yet. A stored table comes back as its list of rows. Reading is always allowed.
Inputs
- Name
nametextRequired - The name this value is stored under, for example cursor. To work with a single field inside a stored object, add a dotted path such as user.email. Letters, digits, and underscores only; each part can't start with a digit.
- Scope
scopetextRequired - Where this value lives: the whole workspace (shared by every workflow), or just this workflow.One of:
workspace(Whole workspace),workflow(This workflow). Default:workspace. - Default value
defaulttext - What to return when nothing has been stored under this name yet. Leave empty to get nothing back. The type selector controls how it's read: Auto infers it, so 0 comes back as a number.
Outputs
foundtrue/false- Whether the stored value was already set.
nametextscopetextvalue- The stored value, or the default when unset.
Example output
{
"found": true,
"name": "last_processed_id",
"scope": "workspace",
"value": "42"
}Pick the next one in turn
Hand out a list's people or things one after another, going back to the first after the last: the next sales rep for a new lead, the next person on the support rota. Each run gets the next item and remembers where it got to, so two runs at once never get the same one. The value must be one workflows are allowed to edit (turn on "Let workflows edit this value" when you create it); a value the workflow creates itself is editable automatically.
Inputs
- Rotation name
nametextRequired - A name for this rotation, for example lead_owners. Runs that use the same name share one place in the turn. Letters, digits, and underscores only.
- Who or what takes turns
itemslistRequired - The list to take turns over, such as the rows of a sheet of sales reps. Its order is the order of the turns.
- Scope
scopetextRequired - Where this value lives: the whole workspace (shared by every workflow), or just this workflow.One of:
workspace(Whole workspace),workflow(This workflow). Default:workspace.
Outputs
countnumber- How many are in the list.
itemobject- The list item whose turn it is: a sheet row keeps its columns, so read item.Email or item.Name.
positionnumber- Which place in the list it was, from 1.
Example output
{
"count": 3,
"item": {
"Email": "dana@example.com",
"Name": "Dana"
},
"position": 2
}Save a row to a stored table
Keep a row in a table stored in Lodol, for example a customer, an order already handled, or a line in a log, with no spreadsheet to set up. With "Update the row with the same" set to a column, the row that already has the same value there (say, the same Email) is updated instead, so each customer appears once; its other columns are kept. It also claims a place in one step: a time slot or a code only one booking may take (Keep a row that's already there), or one of a workshop's 12 seats (Capacity). The table is created the first time. Safe to run from many workflow runs at once. A stored table holds up to 5,000 rows. Text matches ignoring capitals and spaces at either end, and a number matches the same number written as text (42 and "42"). The value must be one workflows are allowed to edit (turn on "Let workflows edit this value" when you create it); a value the workflow creates itself is editable automatically.
Inputs
- Table
nametextRequired - The stored table's name, for example customers. Letters, digits, and underscores only; it can't start with a digit.
- Row
rowobjectRequired - The row's columns and values, for example Name: Ana and Email: ana@example.com.
- Update the row with the same
match_ontext - A column of the row, for example Email. When the table already has a row with the same value in it, that row is updated instead of a new one being added. Leave empty to always add a row.
- Keep a row that's already there
keep_existingtrue/false - With "Update the row with the same" set: when the table already has a row with the same value, leave that row as it is and save nothing, and give back added as false. For something only one run may take, such as a time slot, a seat or a code: of two runs saving the same value at the same moment, exactly one adds the row. Follow it with an If on @saved.added being false that stops the run with a message.Default:
false. - Capacity
capacitynumber - Add the row only while the table holds fewer than this many rows (with the same value in Capacity per as this row, when that is set), for example 12 for a workshop's 12 seats. When it is full, nothing is saved and full comes back true. Of runs saving at the same moment, no more than this many get in. Follow it with an If on @saved.full that stops the run with a message. Leave empty for no limit.
- Capacity per
capacity_pertext - A column of the row, for example workshop_id: Capacity counts only the rows with the same value in it as this row. Leave empty to count every row in the table.
- Scope
scopetextRequired - Where this value lives: the whole workspace (shared by every workflow), or just this workflow.One of:
workspace(Whole workspace),workflow(This workflow). Default:workspace.
Outputs
addedtrue/false- True when a new row was added, false when an existing row was updated (or, with Keep a row that's already there, left as it was).
fulltrue/false- True when Capacity was reached, so the row wasn't saved.
kepttrue/false- True when Keep a row that's already there left a matching row as it was and saved nothing.
nametextrowobject- The row as it is now stored.
row_countnumber- How many rows the table holds now.
scopetext
Example output
{
"added": true,
"full": false,
"kept": false,
"name": "customers",
"row": {
"Email": "ana@example.com",
"Name": "Ana Souza",
"Plan": "Pro"
},
"row_count": 13,
"scope": "workspace"
}Set a stored value
Save a value under a name so a later step or a future run can read it back, for example a cursor marking how far the workflow has gotten. Overwrites whatever was stored there before; setting a dotted path fills in any missing objects along the way. A list of rows (for example the rows Read a file returns) fills a stored table in one go; a table holds up to 5,000 rows. The value must be one workflows are allowed to edit (turn on "Let workflows edit this value" when you create it); a value the workflow creates itself is editable automatically.
Inputs
- Name
nametextRequired - The name this value is stored under, for example cursor. To work with a single field inside a stored object, add a dotted path such as user.email. Letters, digits, and underscores only; each part can't start with a digit.
- Value
valuetextRequired - What to store. The type selector controls how it's saved: Auto figures it out (123 becomes a number, true a yes/no, and text stays text), or pin it to Text or Number.
- Scope
scopetextRequired - Where this value lives: the whole workspace (shared by every workflow), or just this workflow.One of:
workspace(Whole workspace),workflow(This workflow). Default:workspace.
Outputs
nametextscopetextvalue- The value that was stored.
Example output
{
"name": "last_processed_id",
"scope": "workspace",
"value": "42"
}Take from a stored list
Take the items out of a stored list, oldest first: all of them, or only the first few, leaving the rest. Taking empties what it takes, so two runs never get the same item and nothing is handled twice. A list nothing was added to gives no items. The value must be one workflows are allowed to edit (turn on "Let workflows edit this value" when you create it); a value the workflow creates itself is editable automatically.
Inputs
- Name
nametextRequired - The name this value is stored under, for example cursor. To work with a single field inside a stored object, add a dotted path such as user.email. Letters, digits, and underscores only; each part can't start with a digit.
- How many
countnumber - How many items to take from the front of the list. Leave empty to take them all.
- Scope
scopetextRequired - Where this value lives: the whole workspace (shared by every workflow), or just this workflow.One of:
workspace(Whole workspace),workflow(This workflow). Default:workspace.
Outputs
countnumber- How many items were taken.
itemslist- The items taken, oldest first.
nametextscopetext
Example output
{
"count": 2,
"items": [
{
"id": "1001"
},
{
"id": "1002"
}
],
"name": "new_orders",
"scope": "workflow"
}