Skip to main content
Workflow Templates are reusable configurations that define multi-step workflows with advanced execution modes, failure handling, and retry strategies. Similar to Webhook Templates, they support template variables and can be executed in FIFO (First-In-First-Out) or concurrent modes, providing flexibility for different use cases.

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
Workflow templates allow you to orchestrate complex operations while maintaining consistency and reusability across your application.

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)
Use Cases:
  • 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
Use Cases:
  • 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
Benefits:
  • 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
Retry from Initial Benefits:
  • Ensures all steps execute with fresh data
  • Useful when steps depend on each other
  • Guarantees consistency
Retry from Failed Benefits:
  • 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
Benefits:
  • 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

Failure Handling Strategies

Stop on Failure

When enabled, the workflow stops immediately if any step fails:
When to Use:
  • 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:
When to Use:
  • Non-critical operations
  • Independent steps
  • Partial success acceptable
  • Notification workflows

Retry Strategies

Retry from Initial

Restarts the entire workflow from the first step:
Benefits:
  • Fresh start with latest data
  • Ensures consistency
  • All dependencies re-evaluated

Retry from Failed

Resumes from the failed step:
Benefits:
  • 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:
  1. Condition Evaluation: Before executing a step, conditions are evaluated
  2. Field Comparison: Compare a field value against a specified value using an operator
  3. Conditional Execution: Step executes only if all conditions evaluate to true
  4. Skip on Failure: Steps are skipped if conditions aren’t met

Supported Operators

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

Result: Step 2 executes only if amount > 1000

Multiple Conditions (AND Logic)

Result: Step 3 executes only if status == "approved" AND amount >= 500

Step Response Condition

Result: Step 4 executes only if the previous step’s payment_status is “success”

Array Membership Check

Result: Step 5 executes only if user role is “admin” or “manager”

String Contains Check

Result: Step 6 executes only if email contains “@company.com”

Use Cases

Conditional Payment Processing

Conditions:
  • Step 2: amount gt 1000
  • Step 3: amount gt 1000
  • Step 4: amount lte 1000

Role-Based Workflow Steps

Conditions:
  • Step 2: user.role eq "admin"
  • Step 3: user.role in ["admin", "manager"]

Status-Based Branching

Conditions:
  • Step 2: status eq "cancelled"
  • Step 3: status eq "confirmed"
  • Step 4: status ne "pending"

Previous Step Dependency

Conditions:
  • Step 2: step.response.payment_status eq "success"
  • Step 3: step.response.payment_status ne "success"

Best Practices

  1. Use Clear Field Names: Use descriptive field names for better readability
  2. Combine with Failure Handling: Use conditions with failure handling for robust workflows
  3. Test Conditions: Validate conditions with various data scenarios
  4. Document Logic: Clearly document why conditions are set
  5. Avoid Over-Complexity: Keep conditions simple and understandable
  6. Use Appropriate Operators: Choose operators that match your use case
  7. 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

  1. Choose the Right Mode: Use FIFO for dependencies, concurrent for independence
  2. Configure Failure Handling: Set stop on failure for critical workflows
  3. Optimize Retry Strategy: Use “retry from failed” for efficiency, “retry from initial” for consistency
  4. Use Execution Conditions: Leverage step conditions for dynamic, intelligent workflows
  5. Use Template Variables: Leverage secrets and variables for flexibility
  6. Test Workflows: Validate workflows in staging before production, including all condition branches
  7. Monitor Performance: Track execution times and success rates
  8. Document Dependencies: Clearly document step dependencies and conditions in workflow descriptions