Shapes

People, AI and code

Code

Runs a Rhai script for logic the other shapes do not cover.

Nodes › CodeOpen in Neblex
Good for
Custom logic
Role
Works on the records in a flow
Find it in
Nodes › Code

When to use it

  • Calculations, conditions or restructuring go beyond mappings.
  • You want to reuse functions from your Transform Modules.

Reach for something else when

Example

Calculate tiered discounts across all order lines and return one record per order.

  1. Webhook
  2. Code
  3. Stripe

How it works

Settings
Each record or All records mode; Imported modules (Transform Module names); a snippet library; the script (up to 100 KB).
Output
Each record: one record per input (the returned object or the changed item). All records: the returned list becomes the records.
More
See Scripting with Rhai.
More in the guide

Add it to a flow

  1. Open the flow from Build › Workflows.
  2. Open Nodes and find Code under Code, or search for it. Click it or drag it onto the canvas.
  3. Drag from the previous step's output handle to its input, then open its settings with ✎ Edit.
  4. Run the flow and click the step to see the records it received and produced.