Skip to Content

Code action reference

This page is generated from the plugin registry. Do not edit it by hand.

Execute custom JavaScript code server-side in a sandboxed VM. Code can make outbound HTTP requests via fetch (subject to the configured timeout). Not a security boundary; intended for authenticated team members only.

For guidance and examples see the Code guide.

Set actionType in a node’s config to the action type shown under each heading. See the workflow definition page for the node format.

ActionAction type
Run Codecode/run-code

Run Code

Action type: code/run-code. Connection: not required.

Execute custom JavaScript in a sandboxed environment with access to workflow data via template variables

Inputs

FieldTypeRequiredDefaultAllowed valuesDescription
codestringYesJavaScript Code.
timeoutnumberNo60min 1, max 120Timeout (seconds).

Outputs

OutputDescription
successWhether the code executed successfully
resultThe return value of the executed code
logsCaptured console output (log, warn, error) from the code
errorError message if execution failed
lineLine number where the error occurred (if available)