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 upcaseConverts a string to uppercase. {{ "hello" | upcase }} → HELLOdowncaseConverts a string to lowercase. {{ "HELLO" | downcase }} → hellocapitalizeCapitalizes the first word of a string. {{ "hello world" | capitalize }} → Hello worldtruncate: numShortens 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 worldprepend: "str"Adds a string to the beginning. {{ "world" | prepend: "hello " }} → hello worldremove: "str"Removes all occurrences of a substring. {{ "hello world" | remove: "l" }} → heo wordreplace: "a", "b"Replaces all occurrences of string “a” with “b”. {{ "hi hi" | replace: "hi", "bye" }} → bye byeescapeEscapes 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: numAdds a number. {{ 5 | plus: 3 }} → 8minus: numSubtracts a number. {{ 5 | minus: 3 }} → 2times: numMultiplies by a number. {{ 5 | times: 3 }} → 15divided_by: numDivides by a number. {{ 15 | divided_by: 3 }} → 5round: digitsRounds to the nearest integer or specified decimal places. {{ 4.56 | round }} → 5ceilRounds up to the nearest integer. {{ 4.1 | ceil }} → 5floorRounds 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 sizeReturns the number of items in an array. {{ [1,2,3] | size }} → 3firstReturns the first item of an array. {{ ["a","b"] | first }} → alastReturns the last item of an array. {{ ["a","b"] | last }} → bjoin: "char"Joins array elements with a character. {{ ["a","b"] | join: ", " }} → a, bsort: "key"Sorts an array. Can sort an array of objects by a key. {{ [3,1,2] | sort }} → [1,2,3]uniqRemoves 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 YFour-digit year 2025mMonth (01-12) 12dDay (01-31) 25HHour (00-23) 10iMinute (00-59) 30sSecond (00-59) 00FFull month name DecemberMShort month name DeclFull day of week ThursdayDShort day of week ThucISO 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_todayIs the date today? is_tomorrowIs the date tomorrow? is_yesterdayWas the date yesterday? is_futureIs the date in the future? is_pastIs the date in the past? is_weekendIs the date on a weekend? is_weekdayIs the date on a weekday? in_7_daysIs the date exactly 7 days from now? within_14_daysIs the date between now and 14 days from now? before_30_daysIs the date before 30 days from now? older_than_90_daysIs the date more than 90 days in the past? newer_than_3_daysIs the date within the last 3 days? after_5_daysIs the date more than 5 days in the future? exactly_1_dayIs 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).