Skip to content

Set Variable

The Set Variable module allows creating or updating a persistent variable in the workflow. Internally it uses the base Variable module with the add action, which creates the variable if it doesn’t exist or updates it if it already exists. It is the recommended node for storing data that needs to persist between workflow executions or be shared between different workflows of the same client. It supports multiple data types and dynamic variables in the key and value.

ParameterTypeRequiredDescription
keytextYesName of the variable to create/update. Supports {{variable}}.
datatextYesValue to store. Can use dynamic variables like {{input.data}}.
typeselectNoData type: Text (varchar), Integer, Float, Boolean, JSON, Array, Date, DateTime. Default: varchar.
persistentbooleanNoIf active, the variable persists between workflow executions. Default: true.
{
"nextModule": "siguiente_modulo",
"data": {
"variable": {
"resolvedValue": "valor_guardado"
}
}
}
{
"label": "Set Variable",
"key": "ultimo_pedido_id",
"data": "{{data.pedido_id}}",
"type": "int",
"persistent": true
}
  • Internally executes the Variable module with action: 'add'.
  • If the variable already exists, it is updated with the new value.
  • Supports dynamic variables {{variable}} in both the key and value.
  • Available data types are: varchar (text), int, float, boolean, json, array, date, datetime.
  • Variables with persistent: true are maintained between workflow executions.
  • Variables are accessible from any workflow of the same client.
  • parentNode: variable.
  • getVariable (to get the variable value)
  • deleteVariable (to delete the variable)
  • variable (base module used internally)
  • memory (obsolete alias)