Data Transformation

Function

Use JavaScript to apply transformations on data or objects. The code entered into the script area represents the body of the function to be executed.

Notes:

  • Network and file system access is restricted.
  • Lodash is available through the variable _.

Inputs

Field

Type

Description

context

This value should be a JSON-serializable value, which will be made available in the script as $. This can be a hard-coded value, or composed from the workflow execution context using templating.

script [required]

string

A JS script which applies a transformation and returns a JSON-serializable value.

default: // Use `$` to access Trigger or Steps data. // Use `_` to access Lodash. // See https://lodash.com/ for reference. let name = $.WorkflowName; // TODO: transform your context return name.split('');

description

string

A description for the script.

Outputs

Field

Type

Description

data [required]