Key-Value Store
The Key-Value Store (KV) is the simplest piece of storage in Publicus: a flat map of names to free-form values, scoped to the tenant. Every activity in every flow can read every key, which makes it the natural home for cursors, counters, feature flags, and anything else that needs to outlive a single run.


Managing entries in the app
Section titled “Managing entries in the app”Go to Key-value.
-
New key-value entry — create a new entry.
-
Fill in:
- Key — how you will reference it, e.g.
last_sync_time. - Value — any string or JSON payload.


- Key — how you will reference it, e.g.
-
Save. The entry is available to flows immediately.
From the same screen you can edit, delete, and tag entries. Each key
holds one entry: saving a new entry, or renaming one, under a key that is
already taken is refused. A workspace created before that rule can still
hold two entries under one key, and $kv then reads either of them; a
write or a delete by key reaches them all, so delete the spare one.
Inspecting values
Section titled “Inspecting values”The list shows a preview of each entry’s value, pretty-printed and truncated to roughly 120 characters; hover over it to see the full value in a tooltip. The value column is searchable by content, so you can find an entry by what is stored in it, not only by its key.
Each entry also has an Inspect action that opens a read-only view of the stored JSON, pretty-printed with a copy button. Use it to check what a flow wrote without opening the edit form.


Reading a key from a flow
Section titled “Reading a key from a flow”Two ways:
- Implicitly, in any expression field: a Transformer template, a
Rest/Operation URL, an Injector body, and so on. Write
{{ $workflow->kv('last_sync_time') }}. It works for every key, including one with a dot, a dash or a colon in it, such as{{ $workflow->kv('acme.last-sync') }}, and the run fetches only the keys named this way. The shorter{{ $kv->last_sync_time }}reads the same entry, but only for a key made of letters, digits and underscores, and it loads every entry in the workspace to do it. - Explicitly, via the
KeyValueStore / Getnode. You pick the entry; the node emits the stored value as its output, and the next node reads it as$prev.
Writing a key from a flow
Section titled “Writing a key from a flow”Use the Key-Value Set node. Instructions:
- Entry — pick the entry, or leave it empty and give a Key
instead. By key, the entry is created when the workspace has none, so
a flow can keep one entry per customer (
cursor:{{ $prev->customerId }}) without anyone making them first. - Value — the new value. The field is expression-capable, so you
can snapshot part of the upstream output on each run, e.g.
{!! $prev->meta->nextCursor !!}. Use the raw{!! !!}echo here: a later run reads the stored value back, so it must not be HTML-escaped.
The Set node overwrites the current value; it does not merge.
Removing and listing keys from a flow
Section titled “Removing and listing keys from a flow”- Key-Value Delete removes an entry, by the entry or by its key.
- Key-Value List lists the entries whose
key starts with a prefix, such as every
cursor:entry, for the next node to work through.
Starting a flow when an entry changes
Section titled “Starting a flow when an entry changes”When Key-Value Entries Change
starts a flow when an entry is added, edited or deleted, for every key or only
the keys under a prefix such as rates-. The run gets the key and the entry’s
value. The Triggers button on the Key-value screen shows which flows
start on a change and what the latest changes started.


Typical uses
Section titled “Typical uses”- Cursors for paginated APIs when the cursor needs to survive between scheduled runs.
- Last-success timestamps for incremental syncs.
- Feature flags toggled outside of code to turn branches of a flow on or off.
- Counters that accumulate across runs, written with
Setusing a{{ $kv->counter + 1 }}expression.
Anything that needs structure — more than one field per record, or the ability to filter — belongs in the Table Store instead.