Variable (Base)
Description
Section titled “Description”The Variable module is the base node for managing persistent variables in the workflow. It allows storing, reading, updating and deleting variables that are saved in memory and can be accessed from any workflow of the same client. It supports multiple data types (varchar, int, float, boolean, json, array, date, datetime) with automatic conversion. Variables are identified by a unique key per workflow and client. Supports dynamic variables {{variable}} in both the key and value. This module is the base implementation used internally by the Set Variable, Get Variable and Delete Variable nodes.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| action | select | Yes | Action to perform: get (retrieve), add (create/update), update (update), delete (delete). |
| key | text | Yes | Variable name. Supports {{variable}}. |
| data | text | Depends | Value to store (for add/update) or filter (for get). Supports {{variable}}. If empty in add, the input data is used. |
| type | select | No | Data type: varchar, int, float, boolean, json, array, date, datetime. Default: varchar. |
| persistent | boolean | No | If active, the variable persists between executions. Default: true. |
Output
Section titled “Output”{ "nextModule": "siguiente_modulo", "data": { "variable": "valor_almacenado" }, "_meta_": { "key": "nombre_variable", "data": "filtro" }}{ "nextModule": "siguiente_modulo", "data": { "variable": { "resolvedValue": "valor_guardado" } }}Delete
Section titled “Delete”{ "nextModule": "siguiente_modulo", "data": { "variable": { "resolvedKey": "nombre_variable" } }}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "label": "Variable (Base)", "action": "get", "key": "contador_pedidos", "data": "", "type": "int", "persistent": true}- Variables are accessible from all workflows of the same client.
- Supports dynamic variables
{{variable}}in key and data. - The data type is applied as conversion after getting or saving the value.
- If
datais empty in theaddaction, the node’s input data is used as the value. - The
getaction with emptydataretrieves the variable without filter. Withdata, it applies an additional filter. - This module is hidden in the interface (
hidden: true). Users should use Set Variable, Get Variable or Delete Variable. - The
memoryalias points to this same module for compatibility.
Related Nodes
Section titled “Related Nodes”- setVariable (wrapper for Variable with action=add)
- getVariable (wrapper for Variable with action=get)
- deleteVariable (wrapper for Variable with action=delete)
- memory (obsolete alias for Variable)