Write Liquid Text
Format your output into a string
Last updated
Was this helpful?
Format your output into a string
Last updated
Was this helpful?
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.
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:
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.
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:
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:
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:
We are effectively combining the results of each piece into a single string.