> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-apis.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Script Task Node

Use this node to write a JavaScript script that processes context variables or other flow variables.

!!! Notes

* Form data can't be manipulated using a script.
* The script node doesn't create a step in the flow automatically. Steps must be explicitly designed on the canvas.

## Configure the Node

### General Settings

In **General Settings**, configure the following:

<img src="https://mintcdn.com/koreai-apis/fgKW8q6gJapKAFxm/ai-for-service/flows/node-types/images/general-settings-script-task.png?fit=max&auto=format&n=fgKW8q6gJapKAFxm&q=85&s=6e24ef5abb8265c2ebfb48e73b5dc28d" alt="General Settings" width="410" height="504" data-path="ai-for-service/flows/node-types/images/general-settings-script-task.png" />

1. **Custom Name**: Enter a name to identify the node.
2. **Define a Script**: Use the JavaScript editor to write the script to run.

### Connection Rules

Click the **Connection Rules** icon and select the target node for each outcome:

* **On Success**: The flow routes to this node when the script runs successfully.
* **On Error**: The flow routes to this node when the script fails.

<img src="https://mintcdn.com/koreai-apis/fgKW8q6gJapKAFxm/ai-for-service/flows/node-types/images/connection-rules-script-task.png?fit=max&auto=format&n=fgKW8q6gJapKAFxm&q=85&s=f133f6d1b951be772bc0c74bdb9f49f9" alt="Connection Rules" width="411" height="567" data-path="ai-for-service/flows/node-types/images/connection-rules-script-task.png" />
