What Are Workflow Templates?
A workflow template is a pre-configured sequence of steps that can include:- Multiple webhook calls or other actions
- Execution mode (FIFO or concurrent)
- Failure handling (stop on failure or continue)
- Retry strategies (retry from initial step or from failed step)
- Template variables for dynamic content
- System secret integration for secure credential management
Key Benefits
1. Strict Ordering with FIFO Mode
FIFO (First-In-First-Out) mode ensures steps execute in strict sequential order:- Guaranteed Order: Steps execute one after another, in the exact order defined
- Dependency Management: Later steps can safely depend on results from earlier steps
- Data Consistency: Ensures data flows correctly through the workflow
- Critical Operations: Perfect for operations where order matters (e.g., payment processing, data transformations)
- Payment processing workflows
- Data transformation pipelines
- Sequential API calls with dependencies
- Multi-step user onboarding
2. Parallel Execution with Concurrent Mode
Concurrent mode allows multiple steps to execute simultaneously:- Faster Execution: Multiple steps run in parallel, reducing total execution time
- Independent Operations: Ideal when steps don’t depend on each other
- Resource Efficiency: Better utilization of system resources
- Throughput Optimization: Maximize the number of operations completed per unit time
- Sending notifications to multiple services simultaneously
- Parallel data processing
- Independent API calls
- Bulk operations
3. Failure Handling
Workflow templates support configurable failure behavior:- Failure Stop: Workflow stops immediately when any step fails
- Continue on Failure: Workflow continues executing remaining steps even if one fails
- Selective Handling: Choose which steps are critical and which can fail safely
- Reliability: Prevent cascading failures
- Partial Success: Complete non-critical steps even if critical ones fail
- Error Isolation: Isolate failures to specific steps
- Better Debugging: Easier to identify and fix issues
4. Retry Strategies
When a step fails, you can choose how to retry:- Retry from Initial: Start the entire workflow from the beginning
- Retry from Failed: Resume from the failed step, preserving completed work
- Ensures all steps execute with fresh data
- Useful when steps depend on each other
- Guarantees consistency
- More efficient - doesn’t re-execute successful steps
- Faster recovery
- Preserves completed work
- Reduces unnecessary API calls
5. Execution Step Conditions
Workflow templates support conditional execution of steps based on field values:- Conditional Execution: Steps execute only when conditions are met
- Field-Based Logic: Evaluate workflow data to determine step execution
- Multiple Operators: Support for various comparison operators
- Better Workflow Control: Create dynamic, intelligent workflows that adapt to data
- Dynamic Workflows: Steps execute based on actual data values
- Efficient Execution: Skip unnecessary steps when conditions aren’t met
- Complex Logic: Build sophisticated workflows with conditional branching
- Resource Optimization: Only execute steps when needed
6. Template Variables
Workflow templates support the same powerful variable system as webhook templates:- System Secrets:
{{ #key }}- Access secrets from System Secret Vault (computed at runtime) - Workflow Variables:
{{ variable }}- Pass dynamic values between steps - Step Responses:
{{ step.response.variable }}- Access variables from previous workflow steps - Initial Variables:
{{ initial.variable }}- Access variables from initial workflow input
Execution Modes Comparison
| Feature | FIFO Mode | Concurrent Mode |
|---|---|---|
| Execution Order | Strict sequential | Parallel execution |
| Speed | Slower (sequential) | Faster (parallel) |
| Dependencies | Supports dependencies | Independent steps only |
| Use Case | Critical ordered operations | Independent operations |
| Resource Usage | Lower | Higher |
| Error Impact | Can stop entire workflow | Isolated to individual steps |
Failure Handling Strategies
Stop on Failure
When enabled, the workflow stops immediately if any step fails:- Critical workflows where all steps must succeed
- Financial transactions
- Data integrity requirements
- Sequential dependencies
Continue on Failure
When enabled, the workflow continues even if steps fail:- Non-critical operations
- Independent steps
- Partial success acceptable
- Notification workflows
Retry Strategies
Retry from Initial
Restarts the entire workflow from the first step:- Fresh start with latest data
- Ensures consistency
- All dependencies re-evaluated
Retry from Failed
Resumes from the failed step:- Efficient - doesn’t repeat successful steps
- Faster recovery
- Preserves completed work
Execution Step Conditions
Execution step conditions allow you to control when workflow steps execute based on field values. This provides fine-grained control over workflow execution and enables dynamic, data-driven workflows.How It Works
Each workflow step can have one or more execution conditions:- Condition Evaluation: Before executing a step, conditions are evaluated
- Field Comparison: Compare a field value against a specified value using an operator
- Conditional Execution: Step executes only if all conditions evaluate to
true - Skip on Failure: Steps are skipped if conditions aren’t met
Supported Operators
| Operator | Description | Example |
|---|---|---|
eq | Equal to | amount eq 100 |
ne | Not equal to | status ne "cancelled" |
lt | Less than | quantity lt 10 |
gt | Greater than | price gt 1000 |
lte | Less than or equal to | age lte 18 |
gte | Greater than or equal to | score gte 80 |
in | Value in array | status in ["active", "pending"] |
contains | String contains substring | email contains "@example.com" |
Condition Structure
Each condition consists of:- Field: The field path to evaluate (e.g.,
amount,user.status,step.response.payment_id) - Operator: The comparison operator (e.g.,
eq,gt,contains) - Value: The value to compare against
Example Conditions
Simple Field Comparison
amount > 1000
Multiple Conditions (AND Logic)
status == "approved" AND amount >= 500
Step Response Condition
Array Membership Check
String Contains Check
Use Cases
Conditional Payment Processing
- Step 2:
amount gt 1000 - Step 3:
amount gt 1000 - Step 4:
amount lte 1000
Role-Based Workflow Steps
- Step 2:
user.role eq "admin" - Step 3:
user.role in ["admin", "manager"]
Status-Based Branching
- Step 2:
status eq "cancelled" - Step 3:
status eq "confirmed" - Step 4:
status ne "pending"
Previous Step Dependency
- Step 2:
step.response.payment_status eq "success" - Step 3:
step.response.payment_status ne "success"
Best Practices
- Use Clear Field Names: Use descriptive field names for better readability
- Combine with Failure Handling: Use conditions with failure handling for robust workflows
- Test Conditions: Validate conditions with various data scenarios
- Document Logic: Clearly document why conditions are set
- Avoid Over-Complexity: Keep conditions simple and understandable
- Use Appropriate Operators: Choose operators that match your use case
- Consider Performance: Complex conditions may impact workflow execution time
Template Variables in Workflows
System Secret Variables
Workflow Variables
Step Response Variables
Access data from previous steps:Initial Variables
Access initial workflow input:Example Use Cases
E-commerce Order Processing (FIFO Mode)
- Mode: FIFO (strict order required)
- Failure Handling: Stop on failure
- Retry: Retry from initial
- Why: Each step depends on the previous one
Multi-Channel Notification (Concurrent Mode)
- Mode: Concurrent (independent operations)
- Failure Handling: Continue on failure
- Retry: Retry from failed
- Why: Steps are independent, partial success acceptable
Data Pipeline (FIFO Mode)
- Mode: FIFO (data transformation pipeline)
- Failure Handling: Stop on failure
- Retry: Retry from initial
- Why: Data integrity and consistency required
Best Practices
- Choose the Right Mode: Use FIFO for dependencies, concurrent for independence
- Configure Failure Handling: Set stop on failure for critical workflows
- Optimize Retry Strategy: Use “retry from failed” for efficiency, “retry from initial” for consistency
- Use Execution Conditions: Leverage step conditions for dynamic, intelligent workflows
- Use Template Variables: Leverage secrets and variables for flexibility
- Test Workflows: Validate workflows in staging before production, including all condition branches
- Monitor Performance: Track execution times and success rates
- Document Dependencies: Clearly document step dependencies and conditions in workflow descriptions
Related Documentation
- Webhook Template Overview - Learn about webhook templates
- System Secret Vault Overview - Manage secrets for workflows
- Scheduling Overview - Schedule workflows to run automatically

