# Text Block

## Sending predefined messages

The text block enables the virtual assistant to send specific, static messages to users.

#### **Key Features**

* Supports messages **up to 300 characters**.
* Can be displayed as a standard virtual assistant response or as a **caption** (smaller text below the bot’s main response).

#### **Common Use Cases**

* **Welcome Message**: A warm greeting when users start a conversation. This message typically introduces the virtual assistant and explains its features.

{% hint style="info" %}
💡 Tip: If your response exceeds 300 characters, you can split it into multiple text blocks. However, we recommend using a maximum of 3 blocks (900 characters total) to keep messages concise and readable within a chat format.
{% endhint %}

<figure><img src="/files/DTDN4hLRqykML2ml9zXC" alt=""><figcaption><p>Welcome Text Messages</p></figcaption></figure>

{% hint style="info" %}
*The welcome message is one of the first things to configure when building an AI agent. It is included by default in every workspace. Learn more in our step-by-step guide:* [Configure Your AI Agents](/build-your-ai-agents/configure-your-ai-agents.md).
{% endhint %}

* **Conditional Responses**: A Text Block can be used **within a Condition Block** to display specific messages based on predefined variables.

> *Example*
>
> *Scenario: A virtual assistant that provides order status updates based on the user's order status.*
>
> * *If order\_status = "shipped", then display: "📦 Your order has been shipped! You can track it using this link: \[tracking\_link]."*
> * *If order\_status = "processing", then display: "⏳ Your order is currently being processed. We’ll notify you once it’s shipped!"*
> * *If order\_status = "delayed", then display: "⚠️ We’re sorry! Your order is delayed due to unexpected circumstances. Our support team is here to help if you need more details."*

* **Debugging**: A Text Block can be particularly useful for debugging when placed inside a Condition Block.

<figure><img src="/files/POU20QwKRyrKhhO0XFNY" alt=""><figcaption><p>Text Block within a Condition Block</p></figcaption></figure>

<figure><img src="/files/a87SbD7tysSX1bIPqIFI" alt="" width="370"><figcaption><p>Text shown during the conversation after a condition is met</p></figcaption></figure>

By using the `$env` variable, which differentiates between test and live environments, you can display debugging information as a text caption when `$env = test`.

This allows you to show internal notes that help track which agent is responding or which workflow triggered a specific reply. If `$env = production`, the debugging text is not shown, ensuring a clean user experience.

> *Example: If $env = test, display: "Response generated by \[Agent Name]"*

{% hint style="info" %}
Learn more about Condition Blocks, Variables, and Debugging at these links: [Condition Block](/getting-started/agents-workflows-and-triggers/blocks/logic-blocks/condition-block.md), [Variables](/getting-started/workspace/variables.md), [Testing and Debugging](/build-your-ai-agents/testing-and-debugging.md).
{% endhint %}


---

# 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://guide.indigo.ai/getting-started/agents-workflows-and-triggers/blocks/message-blocks/text-block.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.
