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: singleinput)script- Lua codetimeout- 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
| Field | Type | Required | Description |
|---|---|---|---|
script | code(lua) | No | |
input_names | array<string> | No | |
timeout_secs | integer | No | |
base_config | record | No | Shared 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). |