Contents

Lua Script

lua_script · Nodes · Scripting

Runs a Lua script against workflow input.

Executes Lua with access to input data.

Config:

  • input_names - named input sockets (default: single input)
  • script - Lua code
  • timeout - execution timeout in seconds (default: 30)

Available in script:

  • inputs - table with named input values

Return: Script must return a value. nil becomes true.

Example:

local data = inputs.input
return { count = #data, first = data[1] }

Sandboxed: no os, io, debug, require, loadfile. 10MB memory limit.

Inputs

  • inputOptional

Outputs

  • output

Configuration

FieldTypeRequiredDescription
scriptcode(lua)No
input_namesarray<string>No
timeout_secsintegerNo
base_configrecordNoShared node configuration. failure_mode decides what a failure of this node does to the workflow; leave it at the default stop unless the workflow handles the failure itself on the node's error output (route_to_error) or the node is a rare emergency kill switch (stop_workflow).