Skip to content

Execute Node.js Step

The Execute Node.js step is an advanced Flow step for running custom JavaScript logic inside a workflow.

What this is

Use this step only when standard Studio steps cannot express the transformation or decision your Flow needs. It is best suited for advanced admins or teams working with a technical implementer.

For code examples, package behavior, runtime details, and implementation constraints, use the Developer Hub.

When to use it

Use Execute Node.js when:

  • A Flow needs a custom calculation.
  • Data must be reshaped before a later step can use it.
  • A simple business rule is easier to maintain as a short script.
  • Your team accepts the maintenance responsibility for custom logic.

Use dedicated steps instead when possible. HTTP Request, Condition, Extract Data, String to JSON, JSON to String, and variable steps are easier for non-technical users to review.

Before you start

Make sure:

  • A technical owner can review the logic.
  • The step has a clear input and output.
  • The script avoids unnecessary side effects.
  • The Flow has a fallback path if the step fails.
  • The team understands that custom logic may require extra review before publishing.

Configure the step

  1. Add an Execute Node.js step to the Flow.
  2. Keep the step name specific, such as Calculate renewal score.
  3. Add the custom logic provided by your technical owner.
  4. Save the result in an output variable.
  5. Connect the next step.
  6. Test the Flow with normal, empty, and unexpected inputs.

Use outputs in later steps

Use the output variable in later steps such as Condition, Ask to LLM, Final, or data transformation steps.

Troubleshooting

The step fails

Ask the technical owner to review the script, inputs, and expected output.

Later steps cannot read the result

Confirm the step saves an output variable and that later steps reference the same variable name.

The Flow is difficult to maintain

Replace custom logic with standard Studio steps where possible, or document who owns the script.

Studio · Pulse — Cognipeer product documentation