> For the complete documentation index, see [llms.txt](https://docs.agenticflow.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agenticflow.ai/workflows/workflow-inputs/text-input.md).

# Text Input

A **Text Input** is a fundamental input control that allows a user to enter a single line of text when they run a workflow. It is suitable for short pieces of text like a name, a search query, or a topic for content generation.

## How to Add

1. From your workflow's **Build** page, click on **+ Add Input** in the main canvas or the sidebar.
2. Select **Text Input** from the list of available controls.

## Configuration

When you add a Text Input control, you can configure the following settings:

* **Title:** The main label for the input field that the user will see.
* **Description:** Optional helper text that appears below the title to provide more context.
* **Variable Name:** The name used to access this input's value within the workflow. You can rename this by clicking on the green variable name at the bottom left of the control.
* **Optional/Required:** A toggle to specify whether the user must fill in this field before running the workflow.

## Setting a Default Value

You can pre-fill the Text Input with a default value:

1. Enter the desired default text into the input field.
2. Click the settings icon (⚙️) at the bottom right of the control.
3. Select **Set Current Value as Default**.

## Accessing the Value

To use the text provided by the user, you reference its variable name within double curly braces `{{}}`. For example, if the variable name is `topic`:

* **In most nodes:** You can directly use `{{topic}}` in a prompt or parameter field.
* **In a Code Node (Python):** You would access it as a variable, e.g., `topic = "{{topic}}"`
* **In a JavaScript step:** You would access it via `params.topic`.

### Example

If you create a **Text Input** with the variable name `product_name`, you could use it in a downstream OpenAI node like this:

```
Write a 50-word marketing description for the following product: {{product_name}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.agenticflow.ai/workflows/workflow-inputs/text-input.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
