Templates / Evaluate counters and key-value storage with the KeyValue community node

Evaluate counters and key-value storage with the KeyValue community node

Unknown

by Stéphane Heckel ✓ · 29 views · created 2026-06-24 · File Management

Unknown. This template uses community nodes we can't verify statically. Uses community nodes that can't be verified statically (unverified community packages are off by default in 3.0). Static check, last run 2026-10-19.

Community nodes

These come from third-party npm packages. In n8n 3.0 unverified community packages are off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).

Nodes used (7)

What it does

Quick overview This workflow demonstrates the n8n KeyValue community node by using a counter to run one-time initialization logic per workflow, storing a per-day execution flag to allow the main logic only once per day, and showcasing basic directory, record, and counter operations. How it works 1. Starts when you manually execute the workflow. 2. Reads a KeyValue counter named after the current n8n workflow ID and runs a one-time “first execution” branch only when the counter does not yet exist. 3. Sets the workflow-ID counter in KeyValue to mark that the one-time initialization logic has been executed. 4. Reads a KeyValue record (keyed by workflow ID) from the businessprocess directory and compares its stored date with today’s date. 5. If today’s date is already stored, it stops in a “logic already executed” branch; otherwise it runs the main logic branch. 6. Writes today’s date back to KeyValue (businessprocess directory) to enforce “run once per day” behavior on subsequent executions. Setup 1. Install the KeyValue community node (n8n-nodes-keyvalue) in n8n under Settings → Community nodes. 2. Ensure your n8n instance has persistent filesystem storage for the KeyValue root directory (so counters and records survive restarts/containers). 3. If needed, update the directory names used for records (for example, businessprocess and dir1) to match your environment and naming conventions.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.