Skip to content

Execute JavaScript

The script.js processor takes in any payload type and executes a JavaScript function that is able to process the payload. The end value of payload will be returned as the output of the processor.

Ending with a payload value of undefined is treated the same as any other processor returning nil.

This run your JavaScript program in a sandboxed environment. It currently support the ES2023 specification.

  • type: script.js
  • params:
    • program: The JavaScript program to run. The payload is available as a global variable called payload.

Replace all occurrences of | with , in the payload

- type: script.js
params:
program: |
payload = payload.replaceAll('|',',');