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
  • What is Liquid?
  • How to Reference Inputs with Liquid
  • How to Reference Outputs with Liquid
  • Consolidating Step Outputs using Liquid
  • Advanced Liquid Templating Use Cases
  • More Information

Was this helpful?

  1. Building Workflows
  2. Workflow Concepts

Liquid Templating

An introduction to our powerful templating language

Last updated 2 months ago

Was this helpful?

What is Liquid?

is a templating language created by Shopify and used extensively by others to create dynamic content. It's useful for referencing variables, modifying text (for example truncating) and for creating basic logic (if statements, for loops etc).

Liquid can be used in most areas throughout our product, including:

  • Input Fields in Workflows

  • LLM Prompts

  • Text Steps

  • Knowledge Base Search Steps

  • JSON Steps

Code Steps do NOT use Liquid Syntax

How to Reference Inputs with Liquid

This section will walk through how to reference your pre-defined input variables.

  1. Ensure that you have

  2. If you did not enter a separate variable name, use the default variable name to reference the input value

  3. Click the purple Variable Selector to see a list of your available inputs and select the desired input

In the example below, we walk through using our input variable value, and referencing it in our LLM Step using Liquid syntax.

How to Reference Outputs with Liquid

Just like with inputs, you can reference the outputs of any prior step of your Workflow in any subsequent step.

Currently, step names are automatically defined incrementally, e.g. step_1 ,step_2 , step_3 , etc.

To reference the output of a step, simply click the step_number pill or manually type it in in the format {{step_12.output}} . If that step outputs JSON, then you can reference any of the sub-keys.

In the example below, we walk through how you can view the full list of available variables and use the proper syntax to call them within your Workflow.

Consolidating Step Outputs using Liquid

One of the more useful applications for Liquid syntax is combining it with our Text Step to perform additional formatting and ensure your output looks exactly the way you desire.

The screenshot below showcases how we reference the output of previous steps (even pulling specific array elements as variables) to format our "step_2" into a more readable and organized output.

Advanced Liquid Templating Use Cases

Liquid templating provides powerful capabilities for handling complex data structures in your Workflows. Below are advanced techniques for working with iterators, arrays, and structured data.

Looping Through Iterator Outputs

When working with the Iteration Step, you can use Liquid's for loops to process the output array elements. This pattern is commonly used to consolidate information from multiple iterations into a single output:

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

Processing Search Results

Basic Content Extraction

Extract and format content from search results or Knowledge Base searches:

{% for result in step_3.output %}
  {{ result.content }}
{% endfor %}

Metadata Handling

Access and format metadata from Knowledge Base search results:

{% for result in step_4.output %}
  Title: {{ result.metadata.title }}
  Description: {{ result.metadata.description }}
{% endfor %}

By mastering these advanced Liquid templating techniques, you can transform complex data structures into well-formatted outputs that serve as perfect inputs for subsequent steps in your Workflow.

More Information

For additional information regarding Liquid, we recommend reviewing .

Liquid
configured an Input step
Shopify's Documentation