Documentation
HomeAPISign In
  • Getting Started
    • Overview
      • Core Concepts
      • Building your First Workflow
    • API Reference
  • Your Data
    • Brand Kits
    • Knowledge Bases
      • Add Data
        • Upload Files
        • Web Scrape
        • Import from Google Drive
        • Import from SQL Database
        • Import from Shopify
      • Knowledge Base Search
      • Knowledge Base Metadata
      • Knowledge Base API
  • Building Workflows
    • Workflow Concepts
      • Workflow Inputs
        • Input Types
      • Workflow Outputs
      • Variable Referencing
      • Liquid Templating
    • Workflow Steps
      • AI
        • Prompt LLM
          • Model Selection Guide
          • Prompting Guide
        • Transcribe Audio File
      • Web Research
        • Google Search
        • Web Page Scrape
      • Code
        • Run Code
        • Call API
        • Format JSON
        • Run SQL Query
        • Write Liquid Text
      • Flow
        • Condition
        • Iteration
        • Human Review
        • Content Comparison
        • Error
      • Data
        • Read from Grid
        • Write to Grid
        • Search Knowledge Base
        • Write to Knowledge Base
        • Get Knowledge Base File
      • AirOps
        • Workflow
        • Agent
      • Image & Video
        • Generate Image with API
        • Search Stock Images
        • Fetch Stock Image with ID
        • Resize Image
        • Screenshot from URL
        • Create OpenGraph Image
        • Create Video Avatar
      • SEO Research
        • Semrush
        • Data4SEO
      • Content Quality
        • Detect AI Content
        • Scan Content for Plagiarism
      • Content Processing
        • Convert Markdown to HTML
        • Convert PDF URL to Text
        • Group Keywords into Clusters
      • B2B Enrichment
        • Hunter.io
        • People Data Labs
      • CMS Integrations
        • Webflow
        • WordPress
        • Shopify
        • Contentful
        • Sanity
        • Strapi
      • Analytics Integrations
        • Google Search Console
      • Collaboration Integrations
        • Gmail
        • Google Docs
        • Google Sheets
        • Notion
        • Slack
    • Testing and Iteration
    • Publishing and Versioning
  • Running Workflows
    • Run Once
    • Run in Bulk (Grid)
    • Run via API
    • Run via Trigger
      • Incoming Webhook Trigger
      • Zapier
    • Run on a Schedule
    • Error Handling
  • Grids
    • Create a Grid
      • Import from Webflow
      • Import from Wordpress
      • Import from Semrush
      • Import from Google Search Console
    • Add Columns in the Grid
    • Run Workflows in the Grid
      • Add Workflow Column
      • Run Workflow Column
      • Map Workflow Outputs
      • Review Workflow Run Metadata
    • Review Content in the Grid
      • Review Markdown Content
      • Review HTML Content
      • Compare Content Difference
    • Publish to CMS from Grid
    • Pull Analytics in the Grid
    • Export as CSV
  • Copilot
    • Chat with Copilot
    • Edit Workflows with Copilot
    • Fix Errors with Copilot
  • Monitoring
    • Task Usage
    • Analytics
    • Alerts
    • Execution History
  • Your Workspace
    • Create a Workspace
    • Folders
    • Settings
    • Billing
    • Use your own LLM API Keys
    • Secrets
    • Team and Permissions
  • Chat Agents (Legacy)
    • Agent Quick Start
    • Chat Agents
    • Integrate Agents
      • Widget
      • Client Web SDK
  • About
    • Ethical AI and IP Production
    • Principles
    • Security and Compliance
Powered by GitBook
On this page
  • How does the Text Step work?
  • How to Configure a Text Step?
  • Concatenating the Output of an Iteration Step

Was this helpful?

  1. Building Workflows
  2. Workflow Steps
  3. Code

Write Liquid Text

Format your output into a string

Last updated 3 months ago

Was this helpful?

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.

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.

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:

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:

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.

Call your previous steps together
Concatenate values pulled from the Iteration Step