Zebflow Docs
kv.entry.get
Zebflow Docs

kv.entry.get

Read the entry --key from the project's key-value store (--durable for the disk-backed one)

kv.entry.get --key TEXT [--default JSON] [--durable] → entry

Read the entry --key from the project's key-value store (--durable for the disk-backed one). Adds entry: { key, value, found } and keeps the rest of the payload; a missing or expired key answers found: false with value set to --default (or null).

Flags

  • --key (required): The entry to read. Usually a {{ }} expression.
  • --default: The value answered when the key is missing or expired — a literal or {{ expr }}.
  • --durable: Use the disk-backed store, which survives a restart. Default: the in-memory one.

Examples

Read a cached value with a fallback

| kv.entry.get --key "settings:{{ $trigger.params.site }}" --default "{{ { theme: 'light' } }}"

Read it downstream as input.entry.value; the rest of the payload stays.

Input:

json
{  "webhook": {    "params": {      "site": "site-a"    }  }}

It answers:

json
{  "webhook": {    "params": {      "site": "site-a"    }  },  "entry": {    "key": "settings:site-a",    "value": {      "theme": "dark"    },    "found": true  }}