Scripting
This guide will help you make the most of workflow scripting
Overview
Our workflow engine uses Scriban - a fast, powerful, safe, and lightweight text templating and scripting engine designed specifically for .NET environments.
Scriban allows you to inject dynamic logic, handle data transformations, execute loops, and evaluate expressions directly within your workflows. Because it parses templates into a robust Abstract Syntax Tree (AST), it delivers high execution performance with minimal Garbage Collector pressure while remaining strictly sandboxed.
Key Scriban Capabilities
- Blazing-Fast Parsing: Built with a custom, low-allocation lexer and parser optimized for .NET.
- Rich Expression Language: Native support for variables, custom objects, conditional statements, loops, and pipe operators (e.g.,
value | string.upcase). - Liquid Compatibility: Supports alternative parsing modes to seamlessly handle or migrate existing Liquid templates.
- Extensible Runtime: Out-of-the-box support for comprehensive built-in modules spanning strings, math, arrays, dates, and regular expressions.
Note
The documentation in this section is pulled from the Scriban GitHub repository and modified to include only sections relevant to your scripting needs inside our workflow builder, but may contain references to configuring Scriban inside .NET. These sections aren't relevant to how you'll be utilizing Scriban scripting inside your workflows and can be skipped over.
Language reference
| Guide | What you'll learn |
|---|---|
| Language reference | Full syntax reference: blocks, literals, variables, expressions, statements |
Built-in functions
| Module | What it provides |
|---|---|
| Built-in functions overview | Index of all built-in function groups |
| Array functions | add, sort, map, filter, join, and more |
| String functions | upcase, downcase, replace, truncate, split, and more |
| Date functions | now, parse, add_days, to_string, and more |
| Math functions | ceil, floor, round, abs, and more |
| Object functions | typeof, keys, values, has_key, and more |
| Regex functions | match, replace, split, escape, and more |
| HTML functions | escape, strip, url_encode, url_decode |
| TimeSpan functions | from_days, from_hours, from_minutes, and more |
Liquid compatibility
| Guide | What you'll learn |
|---|---|
| Liquid support | Using Scriban with Liquid templates, syntax mapping, and migration |