Skip to main content

Liquid Template Component

Transform data using a provided Liquid Template

Component key: liquid-template · Changelog ↓

Description

The LiquidJS Templating Engine is a simple, expressive and safe templating system. This component takes a template and data as inputs, and outputs a rendered document formatted by the template and populated with the data provided.

For example, suppose you have data that looks like this:

{
"completed_tasks": ["Groceries", "Laundry", "Exercise"],
"incomplete_tasks_count": 5
}

And suppose you have a template that looks like this:

{{ completed_tasks | size }} tasks were completed today, which include:
{%- for completed_task in completed_tasks -%}
- {{ completed_task }}
{%- endfor -%}

There are {{ incomplete_tasks_count }} yet to complete.

Passing in that data into that template, your result would read:

3 tasks were completed today, which include:
- Groceries
- Laundry
- Exercise

There are 5 yet to complete.

Actions

Render Template

Receives provided json data and transforms it into a new format using a Liquid Template | key: transform

InputNotesExample
Data

This JSON payload will be fed into the liquid template.

{
  "completedTasks": [
    "Groceries",
    "Laundry",
    "Exercise"
  ],
  "incompleteTasksCount": 5
}
Liquid Template

The Liquid Template that will be used to transform the provided data.

{{ completed_tasks | size }} tasks were completed today, which include:
{%- for completed_task in completed_tasks -%}
  - {{ completed_task }}
{%- endfor -%}

There are {{ incomplete_tasks_count }} yet to complete.
Example Payload for Render Template
Loading…

Changelog

2026-04-30

Updated spectral version