> ## Documentation Index
> Fetch the complete documentation index at: https://docs.odella.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Text Block

> Output a string of text with dynamic interpolation using {{tags}}

## Overview

The Text Block outputs a string of text and can interpolate values using `{{tags}}` within the text. The inputs are dynamically generated based on the interpolation tags used in the text.

<Frame>
  <img src="https://mintcdn.com/odella/PGZ7enNCqh0mvwj_/block-reference/assets/text_light.png?fit=max&auto=format&n=PGZ7enNCqh0mvwj_&q=85&s=968d0f3f077d5094c34a7a81aa7b7f26" alt="Text Block Screenshot" className="block dark:hidden" width="846" height="358" data-path="block-reference/assets/text_light.png" />

  <img src="https://mintcdn.com/odella/PGZ7enNCqh0mvwj_/block-reference/assets/text_dark.png?fit=max&auto=format&n=PGZ7enNCqh0mvwj_&q=85&s=1373b2b96877ef95f0f0b5868419c84b" alt="Text Block Screenshot" className="hidden dark:block" width="842" height="332" data-path="block-reference/assets/text_dark.png" />
</Frame>

## Inputs

<ParamField path="(Dynamic)" type="string">
  The inputs are dynamically generated based on the interpolation tags used in the text. For example, if the text contains `{{name}}`, an input named `name` will be created. All inputs are optional and accept string values. If an input is not connected, its tag will be replaced with an empty string.
</ParamField>

## Outputs

<ResponseField name="output" type="string">
  The output text after interpolating all input values into their corresponding tags.
</ResponseField>

## Editor Settings

<ParamField path="text" type="code" language="prompt-interpolation-markdown" default="{{input}}">
  The text to output. You can use interpolation tags in the format `{{tag}}` to insert input values. The text supports markdown formatting and will be displayed with syntax highlighting in the editor.
</ParamField>

<ParamField path="width" type="number" default={250}>
  The width of the block in pixels.
</ParamField>

<ParamField path="hidden" type="boolean" default={true}>
  Whether the block is hidden in the block menu.
</ParamField>

## Example: Simple Text Output

1. Add a Text Block to your flow
2. Set the text to `Hello World!`
3. Run the flow. The output will be `Hello World!`

<Frame>
  <img src="https://mintcdn.com/odella/63rQpScaEp0bDpCd/images/text-block-example-1.png?fit=max&auto=format&n=63rQpScaEp0bDpCd&q=85&s=66135c862b36faf907c2038e8f2bbf4d" alt="Text Block Example 1" width="890" height="528" data-path="images/text-block-example-1.png" />
</Frame>

## Example: Using Interpolation

1. Add a Text Block and set the text to `Hello {{name}}!`
2. Add another Text Block with value "World"
3. Connect the second block's output to the `name` input of the first block
4. Run the flow. The output will be `Hello World!`

<Frame>
  <img src="https://mintcdn.com/odella/63rQpScaEp0bDpCd/images/text-block-example-2.png?fit=max&auto=format&n=63rQpScaEp0bDpCd&q=85&s=f0a0589cccbb4ad3951c1a9784c5a258" alt="Text Block Example 2" width="1976" height="614" data-path="images/text-block-example-2.png" />
</Frame>

## Error Handling

The Text Block handles missing or null inputs gracefully by replacing their tags with empty strings. No errors will be thrown during normal operation.

## FAQ

<AccordionGroup>
  <Accordion title="Can I use multiple interpolation tags?">
    Yes, you can use any number of unique interpolation tags in your text. Each tag will create a corresponding input on the block.
  </Accordion>

  <Accordion title="What happens if an input is missing?">
    If an input is not connected or its value is null, the corresponding tag will be replaced with an empty string in the output.
  </Accordion>

  <Accordion title="Does the Text Block support markdown?">
    Yes, the text content supports markdown formatting and will be displayed with syntax highlighting in the editor.
  </Accordion>
</AccordionGroup>

## See Also

* [Object Block](/block-reference/data/object)
* [Number Block](/block-reference/data/number)
* [Code Block](/block-reference/advanced/code)
