> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/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 cannot be manipulated using a script.
* The script node does not 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/obfXwZeC6EncVIoC/ai-for-service/flows/node-types/images/general-settings-script-task.png?fit=max&auto=format&n=obfXwZeC6EncVIoC&q=85&s=448d59c35c0ba818ae2052054268a6f9" 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/WQeI2XsPNoZFdu0g/ai-for-service/flows/node-types/images/connection-rules-script-task.png?fit=max&auto=format&n=WQeI2XsPNoZFdu0g&q=85&s=17d069e9a2574e2add73aea979739bdf" alt="Connection Rules" width="411" height="567" data-path="ai-for-service/flows/node-types/images/connection-rules-script-task.png" />
