HeliosHELIOS DOCS
Utility Nodes

Script Node

Run scripts for data transformations and automation tasks with built-in support for multiple languages and package management

Script Node

The Script node lets you run custom code directly inside your workflows. It supports Bash, Python, and JavaScript/TypeScript - each executed in an isolated sandbox environment.

Scripts are executed using the following runners:

LanguageRunnerDescription
Bash/bin/bashNative shell execution
PythonuvFast Python package runner with inline dependency support
JavaScript/TypeScriptDenoSecure JavaScript/TypeScript runtime with built-in module support

Configuration

Input

FieldTypeRequiredDefaultDescription
languagestringNo"bash"Script language: bash, python, typescript
scriptstringYes-The script code to execute

Output

FieldTypeDescription
stdoutstringStandard output from the script
stderrstringStandard error output (truncated to 1024 characters on failure)
exitCodenumberProcess exit code (0 = success)

Basic Usage

Bash

echo "Current date: $(date)"
echo "Files in /tmp:"
ls -la /tmp

Python

import json

data = {"status": "ok", "count": 42}
print(json.dumps(data))

JavaScript/TypeScript

const result = { transformed: true, timestamp: Date.now() };
console.log(JSON.stringify(result));

3rd Party Dependencies

One of the most powerful features of the Script node is the ability to pull in third-party packages without any pre-configuration.

Python - uv inline dependencies

Python scripts are executed with uv, which supports inline script metadata for declaring dependencies. Add a special comment block at the top of your script and uv will automatically install the packages before running:

# /// script
# dependencies = [
#   "requests",
#   "beautifulsoup4",
# ]
# ///

import requests
from bs4 import BeautifulSoup

resp = requests.get("https://example.com")
soup = BeautifulSoup(resp.text, "html.parser")
print(soup.title.string)

JavaScript/TypeScript - Deno imports

JavaScript/TypeScript scripts are executed with Deno, which supports importing third-party modules directly via npm:, jsr:, or URL specifiers - no install step needed:

import { nanoid } from "npm:nanoid@5";
import { camelCase } from "jsr:@luca/[email protected]";

const id = nanoid();
const name = camelCase("hello world");
console.log(JSON.stringify({ id, name }));

Error Handling

A script node fails when the process exits with a non-zero exit code. On failure, stderr is captured (truncated to the last 1024 characters) and surfaced as the error message.

Use a condition node after the script to branch on success or failure based on the exit code.

Last updated on