Skip to content

Get Variable

The Get Variable module allows getting the value of a variable previously stored with Set Variable. Internally it uses the base Variable module with the get action. Optionally, a data type can be specified so the value is automatically converted (for example, from string to integer or JSON). It also supports an optional filter for more specific searches. The obtained value is returned within the variable field of the output data.

ParameterTypeRequiredDescription
keytextYesName of the variable to get. Supports {{variable}}.
datatextNoOptional filter to search for the value.
typeselectNoData type for value conversion: Text (varchar), Integer, Float, Boolean, JSON, Array, Date, DateTime. Default: varchar.
{
"nextModule": "siguiente_modulo",
"data": {
"variable": "valor_almacenado"
},
"_meta_": {
"key": "nombre_variable",
"data": ""
}
}
{
"label": "Get Variable",
"key": "ultimo_pedido_id",
"data": "",
"type": "int"
}
  • Internally executes the Variable module with action: 'get'.
  • The value is returned in data.variable. Subsequent nodes access the value with data.variable.
  • If a data type is specified, automatic conversion is attempted. If conversion fails, the original value is kept.
  • If the variable does not exist, data.variable will be null or undefined.
  • Supports dynamic variables {{variable}} in the key.
  • The data (filter) field is optional. If left empty, the variable is retrieved without filtering.
  • parentNode: variable.
  • setVariable (to create/update variables)
  • deleteVariable (to delete variables)
  • variable (base module used internally)
  • decision (to evaluate the obtained value)