# Output Node

### Overview

The Output Node is the final node in a flow, responsible for formatting and returning the flow's response. It allows you to template your response using variables from previous nodes, making it flexible for various use cases from simple text responses to complex formatted outputs.

Usage cost: 0 credit

### Configuration

#### Settings

* **Response Template** (Required):
  * A text field that supports variable interpolation
  * Can access any variable defined by previous nodes in the flow
* **Output as JSON** (`boolean`, Toggle):
  * **Off (Default):** The node outputs the final result generated from the 'Response Template' as a plain string.
  * **On:** Attempts to parse the final text generated from the 'Response Template' (after variable interpolation) as JSON. If parsing succeeds, the `response` output will contain a JSON object or array. If parsing fails, `response` will contain the raw interpolated string.
    * *Note:* Ensure the template produces valid JSON after variable interpolation when this is enabled.

#### Output

* **response** (string): The final interpolated response string

### Best Practices

1. **Variable Usage**
   * Always validate that required variables exist in the flow


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.waterflai.ai/studio/studio-builders/flow-components-nodes/output-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
