Programming
Core programming constructs for flow control - loops, functions, conditional branching, and debugging.
Overview
The Programming package provides essential flow control constructs for building automation logic. Use it when you need loops, conditional branching, custom functions, delays, or debugging capabilities in your workflows.
Key Features
- Loops - Iterate over arrays and collections
- Conditionals - Branch logic based on conditions
- Functions - Create reusable workflow components
- Flow Control - Break out of loops, add delays
- Debugging - Log values and debug flow execution
Available Nodes
- For Each - Loop through array or collection items
- Switch - Conditional branching based on value
- Function - Define reusable workflow functions
- Break - Exit from a loop early
- Sleep - Pause execution for specified time
- Debug - Log values for debugging
When to Use This Package
- Iteration: Process arrays of data items
- Conditional Logic: Make decisions based on values
- Code Reuse: Create functions for repeated logic
- Timing: Add delays between operations
- Troubleshooting: Debug workflow execution
Typical Workflow
- Load data into array
- For Each to iterate through items
- Switch to route based on item type
- Sleep between API calls if needed
- Break to exit early if condition met
Use Cases
- Process each row in a data table
- Route records based on category or status
- Create reusable validation functions
- Add rate limiting delays to API calls
- Debug variable values during development
Tips
- Use Debug during development, remove for production
- Add Sleep between operations for reliability
- Use Break with conditions to exit loops early
- Define Functions for commonly repeated logic
📄️ Break
Core.Programming.Break
📄️ Debug
Core.Programming.Debug
📄️ For Each
Core.Programming.ForEach
📄️ Function
Core.Programming.Function
📄️ Sleep
Core.Programming.Sleep
📄️ Switch
Core.Programming.Switch