Liquid filters are transformation functions that modify workflow data output. Chain multiple filters together to format text, perform calculations, manipulate arrays, and process dates within your automation workflows.
Filter syntax : {{ workflow_data | filter_name: argument1, argument2 }}
Common filter use cases:
Format API response data for display
Clean and validate user input
Perform calculations on numeric values
Transform arrays from external services
Format dates for different systems
String Filters: Text Processing and Formatting
Transform text data from workflow steps with these essential string manipulation filters:
Filter & Syntax Description Example upcase
Converts a string to uppercase. {{ "hello" | upcase }}
→ HELLO
downcase
Converts a string to lowercase. {{ "HELLO" | downcase }}
→ hello
capitalize
Capitalizes the first word of a string. {{ "hello world" | capitalize }}
→ Hello world
truncate: num
Shortens a string to num
characters. {{ "Hello world" | truncate: 8 }}
→ Hello...
split: "char"
Splits a string into an array on a character. {{ "a,b,c" | split: "," }}
→ ["a","b","c"]
append: "str"
Adds a string to the end. {{ "hello" | append: " world" }}
→ hello world
prepend: "str"
Adds a string to the beginning. {{ "world" | prepend: "hello " }}
→ hello world
remove: "str"
Removes all occurrences of a substring. {{ "hello world" | remove: "l" }}
→ heo word
replace: "a", "b"
Replaces all occurrences of string “a” with “b”. {{ "hi hi" | replace: "hi", "bye" }}
→ bye bye
escape
Escapes a string for use in HTML. {{ "<p>text</p>" | escape }}
→ <p>text</p>
Perform calculations and format numeric data from workflow API responses and user inputs:
Filter & Syntax Description Example plus: num
Adds a number. {{ 5 | plus: 3 }}
→ 8
minus: num
Subtracts a number. {{ 5 | minus: 3 }}
→ 2
times: num
Multiplies by a number. {{ 5 | times: 3 }}
→ 15
divided_by: num
Divides by a number. {{ 15 | divided_by: 3 }}
→ 5
round: digits
Rounds to the nearest integer or specified decimal places. {{ 4.56 | round }}
→ 5
ceil
Rounds up to the nearest integer. {{ 4.1 | ceil }}
→ 5
floor
Rounds down to the nearest integer. {{ 4.9 | floor }}
→ 4
Array Filters: Process Lists and Collections
Manipulate arrays and lists from API responses, database queries, and workflow data:
Filter & Syntax Description Example size
Returns the number of items in an array. {{ [1,2,3] | size }}
→ 3
first
Returns the first item of an array. {{ ["a","b"] | first }}
→ a
last
Returns the last item of an array. {{ ["a","b"] | last }}
→ b
join: "char"
Joins array elements with a character. {{ ["a","b"] | join: ", " }}
→ a, b
sort: "key"
Sorts an array. Can sort an array of objects by a key. {{ [3,1,2] | sort }}
→ [1,2,3]
uniq
Removes duplicate elements from an array. {{ [1,2,2,3] | uniq }}
→ [1,2,3]
map: "key"
Creates an array of values by extracting a key from objects. {{ users | map: "name" }}
→ ["Alice", "Bob"]
Date Filters: Advanced Date Processing for Workflows
Custom date filters designed specifically for workflow automation, enabling sophisticated date parsing, formatting, and conditional logic:
The carbon_date
filter automatically parses various date formats and converts them to your desired output format. Essential for standardizing date formats between different APIs and systems.
Syntax : {{ date_string | carbon_date: "output_format" }}
Reformat an ISO 8601 date
Output
{{ "2025-12-25T10:30:00Z" | carbon_date: "F j, Y" }}
Common Format Codes:
Code Description Example Y
Four-digit year 2025
m
Month (01-12) 12
d
Day (01-31) 25
H
Hour (00-23) 10
i
Minute (00-59) 30
s
Second (00-59) 00
F
Full month name December
M
Short month name Dec
l
Full day of week Thursday
D
Short day of week Thu
c
ISO 8601 format 2025-12-25T10:30:00+00:00
carbon_condition: Date-Based Workflow Logic
The carbon_condition
filter enables date-based conditional logic in workflows, returning boolean values for time-based decision making. Perfect for expiration checks, deadline monitoring, and time-sensitive automation.
Syntax : {{ date_string | carbon_condition: "condition_name" }}
Check if an expiry date is in the past
{% if subscription . expires_at | carbon_condition : "is_past" %}
Your subscription has expired.
{% endif %}
Available Conditions:
Condition Description is_today
Is the date today? is_tomorrow
Is the date tomorrow? is_yesterday
Was the date yesterday? is_future
Is the date in the future? is_past
Is the date in the past? is_weekend
Is the date on a weekend? is_weekday
Is the date on a weekday? in_7_days
Is the date exactly 7 days from now? within_14_days
Is the date between now and 14 days from now? before_30_days
Is the date before 30 days from now? older_than_90_days
Is the date more than 90 days in the past? newer_than_3_days
Is the date within the last 3 days? after_5_days
Is the date more than 5 days in the future? exactly_1_day
Is the date exactly 1 day from now? (Same as is_tomorrow
)
For conditions like in_X_days
, you can use singular or plural (e.g., in_1_day
works too).