# Input Node

### Overview

The Input Node serves as the entry point for data into your flow. It allows you to define and configure input variables that will be used throughout your flow. The input node automatically includes a mandatory "query" input, which can accept either a string or an array of chat messages, making it versatile for both simple text inputs and complex chat interactions.

Usage cost: 0 credit

### Configuration

#### Settings

1. **Query Input** (Default, non-removable):
   * Type: string or ChatMessage\[]
   * Required: Yes
   * Handles both simple text and chat history
2. **Custom Inputs** (User-defined):
   * Name: Unique identifier for the input
   * Type: Choose from:
     * Basic Types: string, number, boolean, object, any
     * Array Types: string\[], number\[], object\[], ChatMessage\[]
     * Document Types: pdf, pptx, markdown, csv, json, docx, odt
   * Required: Toggle whether the input is mandatory

#### Output

The node dynamically generates outputs based on your configured inputs. By default, it includes:

1. **Default outputs** (always present):
   * `user_message` (string): The latest user message
   * `complete_chat_prompt` (ChatMessage\[]): Full chat history including the latest message
   * `message_history` (ChatMessage\[]): Chat history excluding the latest message
2. **Custom outputs** (based on configured inputs):
   * For regular inputs: Output matches the configured input name and type
   * For file inputs: Creates two outputs per file:
     * `{input_name}_full`: Complete document content
     * `{input_name}_pages`: Array of individual pages/sections

### Best Practices

1. **Naming Conventions**
   * Use clear, descriptive names for inputs
   * Avoid special characters and spaces
2. **Input Organization**
   * Group related inputs together
   * Place required inputs first
   * Keep the number of inputs minimal and focused
3. **Type Selection**
   * Use specific types instead of 'any' when possible


---

# 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/input-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.
