Store variables between workflow runs using data tables as a key-value store — Workflow n8n

Moyen complexité Déclencheur10 nœuds🏷️ Miscellaneouspar Mario

Aperçu

Store Variables Between Workflow Runs Using n8n's Built-In Data Tables (Key-Value Store)

Purpose

This workflow implements a simple key value store based on the built-in data tables feature in n8n – no external service needed.

What this is for

This is a workflow snippet which could be used to store a “last checked” timestamp or other variables between workflow runs.

Setup

Self-deploying – no extra setup needed Just clone the template into your n8n instance and follow the instructions on the

Nœuds utilisés

Upsert Global "your_variable_name"Stop and ErrorGlobal foundWhen clicking ‘Execute workflow’Format valueSticky Note8Do something

Aperçu du workflow

1. Get variable
Fallback: Create table if it does not exist
_Needs to run first if previous node
failed - hence it is placed above_
2. Define default value if needed
4. Save variable
How it works
A data table is used as a key value store having the tw
_It is referenced by name, which makes it easier to mig
1. At
3. Use variable
C
Create Globals table
S
Stop and Error
I
If not the expected error
G
Global found
W
When clicking ‘Execute w…
G
Get Global "your_variabl…
S
Set default value
F
Format value
D
Do something
U
Upsert Global "your_vari…
10 nodes10 edges

Comment ça fonctionne

  1. 1

    Déclencheur

    Le workflow démarre avec un déclencheur déclencheur.

  2. 2

    Traitement

    Les données transitent par 10 nœuds, connecting datatable, if, manualtrigger.

  3. 3

    Sortie

    Le workflow termine son automatisation et livre le résultat à la destination configurée.

Détails des nœuds (10)

UP

Upsert Global "your_variable_name"

dataTable

#1
ST

Stop and Error

stopAndError

#2
GL

Global found

if

#3
WH

When clicking ‘Execute workflow’

manualTrigger

#4
FO

Format value

set

#5
ST

Sticky Note8

stickyNote

#6
DO

Do something

noOp

#7

Comment importer ce workflow

  1. 1Cliquez sur le bouton Télécharger JSON à droite pour enregistrer le fichier du workflow.
  2. 2Ouvrez votre instance n8n. Accédez à Workflows → Nouveau → Importer depuis un fichier.
  3. 3Sélectionnez le fichier store-variables-between-workflow-runs-using-data-tables-as-a-key-value-store téléchargé et cliquez sur Importer.
  4. 4Configurez les identifiants pour chaque nœud de service (clés API, OAuth, etc.).
  5. 5Cliquez sur Tester le workflow pour vérifier que tout fonctionne, puis activez-le.

Ou collez directement dans n8n → Importer depuis JSON :

{ "name": "Store variables between workflow runs using data tables as a key-value store", "nodes": [...], ...}

Intégrations

datatableifmanualtriggersetstopanderror

Obtenir ce workflow

Téléchargez et importez en un clic

Télécharger JSONVoir sur n8n.io
Nœuds10
Complexitémedium
Déclencheurtrigger
CatégorieMiscellaneous

Créé par

Mario

Mario

@octionic

Tags

datatableifmanualtriggersetstopanderror

Nouveau sur n8n ?

n8n est un outil d'automatisation de workflows gratuit et open-source. Hébergez-le vous-même ou utilisez la version cloud.

Obtenir n8n gratuitement →

Related Miscellaneous Workflows