Blocks

Function

Run custom logic

Execute custom JavaScript or TypeScript code within your workflow to transform data or implement complex logic. Create reusable functions to process inputs and generate outputs for other blocks.

Back to Catalog
Core Blocksfunction

Block Preview

Function

Run custom logic

Usage

  1. Add the block to your workflow and connect it to the upstream step.
  2. Configure any required credentials or tokens in the inputs.
  3. Fill in required inputs and optional parameters for the run.
  4. Run a test execution, inspect outputs, and iterate before deploying.
  5. Deploy the function block with monitoring enabled in production.

Inputs (UI)

code

code

Placeholder: // Process input data const result = { processedAt: new Date().toISOString(), data: input.data || [] }; return result;

Layout: full

Inputs (API)

code

string

Optional

timeout

number

Optional

Outputs

Primary response type:

{
  "result": "json",
  "stdout": "string",
  "executionTime": "number"
}

Tool Access

function_execute
Function | NowFlow Blocks