> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.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:

![General Settings](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)

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.

![Connection Rules](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)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.