Evaluate counters and key-value storage with the KeyValue community node
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 Starts when you manually execute the workflow. 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. Sets the workflow-ID counter in KeyValue to mark that the one-time initialization logic has been executed. Reads a KeyValue record (keyed by workflow ID) from the businessprocess directory and compares its stored date with today’s date. If today’s date is already stored, it stops in a “logic already executed” branch; otherwise it runs the main logic branch. Writes today’s date back to KeyValue (businessprocess directory) to enforce “run once per day” behavior on subsequent executions.
Setup Install the KeyValue community node (n8n-nodes-keyvalue) in n8n under Settings → Community nodes. Ensure your n8n instance has persistent filesystem storage for the KeyValue root directory (so counters and records survive restarts/containers). If needed, update the directory names used for records (for example, businessprocess and dir1) to match your environment and naming conventions.
Related Templates
Track Expenses by Parsing Telegram Transaction Messages to Google Sheets
Overview This n8n workflow template automatically parses incoming Telegram transaction messages and logs structured dat...
Automated SEO Performance Collection from Google Search Console to NocoDB
Problem Monitoring SEO performance from Google Search Console (GSC) manually is repetitive and prone to human error. Fo...
Send Daily Weather Forecasts from OpenWeatherMap to Telegram with Smart Formatting
🌤️ Daily Weather Forecast Bot A comprehensive n8n workflow that fetches detailed weather forecasts from OpenWeatherMap...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments