Frontend Script Node
| Description | The Frontend - Script node allows you to execute custom scripts on the frontend during the flow. These scripts can interact with the UI, manipulate data displayed to the user, or trigger client-side logic. It is typically used for dynamic behaviors, custom validations, or integrating additional frontend functionality within the flow. |
| Available in | Authentication, Admin, Self Service, Consent, Library, Custom, User Defined |
| Node Name | Frontend - Script |
Script Configurations
Script to execute
Allows defining **custom script** that is executed within the rendered **HTML page**. The script runs in the browser context when the node is processed and can be used to **manipulate the page**, interact with loaded libraries, or perform **custom client-side logic**.Variable Output Table
The **Variable Output Table** defines the possible outputs of the node and allows you to create **custom outputs** that can be used during the flow execution. Each custom output represents a possible **exit path** from the node and can be triggered from the [**Front End Form node**]({filename}/pages/io/io-nodes/io-node-types/user-agent-components/frontend-form.md) by assigning the same **output ID** to an HTML element (for example, a button). This mechanism allows the node behavior to be dynamically controlled by scripts, UI interactions, or nested flows. **Callback example from the script:** `return callback({"output": "next", "data": response)`Head element
The node provides the ability to **inject head elements** into the rendered page. See [Start Node — Head element]({filename}/pages/io/io-nodes/io-node-types/flow-nodes/start.md#head-element) for full details.Save in the Flow store
Attributes can be saved **into a variable** for reuse by other nodes. See [Common Configurations]({filename}/pages/io/io-nodes/io-node-types/common-configurations.md#save-in-the-flow-store) for details.Default Output Node
- Failure
Note: By default, the Frontend Script node only has a Failure exit. Any other outputs must be defined in the Variable Output Table configuration.