Updated Jul 15, 2026

Utilities

Glue workflow stages with a Node.js script

Run a JavaScript file between workflow stages.

Agent

overview

What execute-nodejs does

execute-nodejs sits between stages when catalog tools do not line up. Feed it a script FILE, run custom JavaScript, and emit FILE plus FOLDER for the next node.

Operators reach for it to normalize JSON, merge host lists, call an HTTP API, or apply logic the catalog lacks. Wire prior output into the script workspace, transform it, write results out.

Versus jq or gron, this is full Node, not a fixed JSON transform. Prefer those peers for pure reshape jobs. Prefer a Python execution node when the team writes Python instead.

use cases

Where execute-nodejs fits

Reshape data between two tools

Read the output of one stage, transform it in JavaScript to the exact shape the next tool wants, and write it back so two otherwise-incompatible nodes connect cleanly.

Call an external API mid-workflow

Use Node's HTTP client to enrich results from a third-party service, then emit the combined data for downstream nodes to consume.

Apply custom logic the catalog lacks

When no existing tool covers a step, encode the logic as a Node script so the workflow keeps running end to end without manual intervention.

Build a custom report format

Aggregate findings from earlier stages and render them into the exact JSON, CSV, or HTML layout a report or alert step expects.

reference

execute-nodejs inputs and flags

1 inputs
NameTypeFlagDescription
scriptFILE·JavaScript code file to execute.

Showing key inputs. execute-nodejs exposes 1 inputs in total.

example

Run execute-nodejs

execute-nodejs · command
# execute-nodejs: run transform.js against a host list# inputs: script=transform.jsnode transform.js  # writes api.example.com and app.example.com lines
sample output
api.example.comapp.example.comstaging.example.comdev.example.commail.example.comcdn.example.comvpn.example.comwww.example.com

guidance

Choosing execute-nodejs

Use execute-nodejs when a stage needs custom JavaScript, data reshaping, or an API call no catalog tool covers. Prefer jq for pure JSON transforms. Prefer the Python execution node for Python logic.

jq

Purpose-built JSON transform. Prefer it when you only reshape JSON and do not need full Node.

gron

Flattens JSON into greppable lines. Useful for quick filters, not general scripting.

json2html

Fixed JSON-to-HTML render. A narrow transform versus arbitrary Node code.

faq

execute-nodejs questions

A JavaScript FILE. The node runs it with Node.js and captures the files the script writes.

Run execute-nodejs yourself

Raw data feeds execute-nodejs, which runs a JavaScript file to transform it and writes the reshaped result as a queryable output.

Facts on this page come from the live Trickest tool library.