Skip to Content
DocumentationWorkflowNodesInline Script

Inline Script Node

Executes custom JavaScript code within the workflow.

Input Fields

Task Name: Descriptive name for this script.

Script: JavaScript code to execute. Use GraalJS syntax (similar to Node.js).

Evaluation Parameter: Optional input parameter name. Access via task.input.parameterName in your script.

Available Context

workflow.variables: Access all workflow variables. Example: workflow.variables.customerName

task.input: Access input parameters passed to this task

Return value: Use return statement to output data for subsequent nodes. Example: return { result: total, processed: true };

Example Scripts

Calculate total:

return workflow.variables.items.reduce((sum, item) => sum + item.price, 0);

Transform data:

return { fullName: workflow.variables.firstName + ' ' + workflow.variables.lastName };

Conditional logic:

if (workflow.variables.amount > 1000) return 'high'; else return 'low';

Tips:

  • Use for custom data transformations and calculations
  • Keep scripts simple and focused on a single task
  • Test thoroughly before deploying
  • Use console.log() for debugging (visible in workflow logs)
Need help? Have feedback?