Overview
Edge Connectors use Liquid templates to dynamically substitute values from events, user parameters, and environment variables into your action configurations. Templates allow you to:- Access event data (alerts, incidents, etc.)
- Use user-provided parameters from manual triggers
- Reference environment variables securely
- Transform data with filters
Edge Connectors use the osteele/liquid library, a Go implementation of Shopify’s Liquid template language.
Basic Syntax
Simple Fields
Access top-level fields directly:Nested Fields
Use dot notation for nested objects:Array Access
Access array elements by index or using helpers:Environment Variables
Securely access environment variables:Event Data Access
Alert Events
Common fields available in alert events:Incident Events
Common fields available in incident events:Action Trigger Events
Fields available when users manually trigger actions:Filters
Filters transform values using the pipe (|) operator.
Array Filters
map - Extract property from objects:String Filters
upcase - Convert to uppercase:Number Filters
plus - Add:Date Filters
date - Format timestamp:%Y- Year (2025)%m- Month (01-12)%d- Day (01-31)%H- Hour 24h (00-23)%M- Minute (00-59)%S- Second (00-59)%B- Full month name (January)%b- Short month name (Jan)
Real-World Examples
Example 1: Alert Notification
Format a Slack message with alert details:Example 2: Incident Summary
Create a concise incident summary:Example 3: Script Parameters
Pass structured data to a script:Example 4: Conditional Values
Use defaults for optional fields:Example 5: Complex Transformation
Chain multiple filters:Advanced Patterns
Chaining Filters
Combine multiple filters in sequence:Nested Array Access
Access deeply nested data:Safe Navigation
Liquid handles missing values gracefully:Common Patterns
Service List
Environment Detection
Severity Formatting
User Context
Timestamp Formatting
Limitations
To keep templates simple and secure, the following Liquid features are not supported:
- No logic tags:
{% if %},{% unless %},{% case %}not supported - No loops:
{% for %}not supported - use filters likemapandjoininstead - No custom tags: Only
{{ }}output tags are supported - No assignments:
{% assign %}not supported
default filter for conditional logic:
Tips & Best Practices
1. Use Default Filter
Always provide fallback values for optional fields:2. Extract Then Join
For arrays of objects, usemap + join:
3. Test Templates
Test with sample event data before deploying:- Use the Event Examples for reference payloads
- Verify templates produce expected output
- Handle edge cases (empty arrays, missing fields)
4. Keep It Simple
Complex logic belongs in scripts, not templates:5. Environment Variables for Secrets
Never hardcode secrets in templates:6. Format for Readability
Use multiline strings for JSON/YAML bodies:Troubleshooting
Template Returns Empty String
- Check field name spelling
- Verify field exists in event payload (see Event Examples)
- Use
defaultfilter:{{ field | default: "missing" }}
Array Access Fails
- Verify array is not empty
- Use
.firstor.lasthelpers for safety - Check array index is in bounds
Filter Not Working
- Verify filter name is correct
- Check filter arguments (some require arguments:
{{ value | round: 2 }}) - Ensure input type matches filter (can’t
upcasea number)
Environment Variable Not Found
- Verify variable is set in environment
- Check variable name (case-sensitive)
- Edge Connector supports both
REC_prefix and plain names
Next Steps
- See Action Configuration to use templates in actions
- Review Event Examples for available fields
- Read the main Edge Connectors documentation