# Write Liquid Text

## How does the Text Step work?

The Text Step allows users to concatenate the outputs of previous steps into a single string. It's most often used as the final step in your workflow to ensure your final output is structured exactly the way you would like.

{% hint style="info" %}
Text Steps are also a great option for extracting multiple values stored in lists or arrays that you may want to concatenate into a single string.
{% endhint %}

## How to Configure a Text Step?

The most basic implementation of a Text Step is straightforward. You simply need to reference the desired variables or step outputs using Liquid syntax, as shown below:

<figure><img src="/files/L3E0v5LdfVHwwFf3AySl" alt=""><figcaption><p>Call your previous steps together</p></figcaption></figure>

In this example, our Text Step is concatenating Step 10 (generating a title) with Step 9 (generating the article content). So, our end result is a properly formatted article with the title followed by the body.

## Concatenating the Output of an Iteration Step

One of the more popular use-cases for a Text Step is to extract values from an Iteration Step. The general formatting for this is:

```
{% for chunk in step_x.output %}
{{chunk}}
{% endfor %}
```

with "step\_x" representing your Iteration Step, and the "chunk" being the values we want to pull. Let's take a look at another example:

<figure><img src="/files/fIH6ce2YxD7uZH4BblOz" alt=""><figcaption><p>Concatenate values pulled from the Iteration Step</p></figcaption></figure>

This is pulled directly from our "Article Merge" template. Out Iteration Step (step\_12) checks to see whether it is writing an introduction for our article or if it is writing the body of the article. By calling our Text Step as:

```
{% for chunk in step_12.output %}
{{ chunk }}
{% endfor %}
```

We are effectively combining the results of each piece into a single string.


---

# 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.airops.com/actions/workflow-concepts/workflow-steps/logic-steps/text.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.
