Runs an arbitrary JavaScript function.


Function Code

The JavaScript code. This must contain a function named run:

function run() {
  // code goes here

The function receives two parameters:

  • input - An object that contains the value's of the components configured Parameters.
  • context - An object that contains methods for logging values and sending HTTP requests.

The default code demonstrates the usage of these parameters:

function run(input, context) {
  // Get your input parameters:
  // input['abc']

  // Output logs
  // context.logger.warn('message2');
  // context.logger.error('message3');

  // Invoke HTTP request:
  // const response = context.http.get('');
  // const requestOptions = {
  //   headers: {
  //     'Content-Type': 'application/x-www-form-urlencoded',
  //     body: 'field1=value1&field2=value2'
  // };
  // response ='https://test.test/test-post', requestOptions);
  return {
    myresult1: "value1",
    myresult2: 123,


A list of parameters the function receives at runtime via the input object.


The name of the parameter.

You can use this name to access the parameter:

function run(input, context) {
  // input.myCustomParameter
  // input['myCustomParameter']


The value of the parameter.

Output Schema

A JSON Schema that defines the shape of the data returned by the function. This lets other steps in the flow reference the output of the function.

This is the default schema:

  "type": "object",
  "properties": {
    "myresult1": {
      "type": "string"
    "myresult2": {
      "type": "number"


The output is an object with a shape that's defined by its Output Schema field.