Configuration
array
required
List of functions to execute in order. Each can be any function type.
string
Variable name to store this step’s result for use in subsequent steps
Data Flow
Data flows between sequence steps usingresponse_variable:
1
Step 1 executes
First function runs and produces a result
2
Result stored
Result is stored in the variable name specified by
response_variable3
Step 2 accesses data
Subsequent steps can use the variable in templates
4
Final result
The last step’s output becomes the function’s final result
Use Cases
Data Processing
Fetch raw data and format it for presentation
Multi-step Workflows
Execute complex sequences requiring different function types
Service + Template
Call services and format their responses
Conditional Logic
Use templates to process results conditionally
Best Practices
Name variables clearly
Name variables clearly
Use descriptive names for
response_variable:Keep sequences focused
Keep sequences focused
Each composite function should accomplish one logical task. If you need many steps, consider breaking into multiple functions.✅ Good: 2-4 steps for a single purpose❌ Bad: 10+ steps doing unrelated things
Handle errors
Handle errors
Add error handling in templates:
Debug step by step
Debug step by step
Test each step individually before combining:
- Create individual functions for each step
- Verify each works correctly
- Combine into composite function
- Test the complete sequence
Common Patterns
Pattern 1: API + Format
Pattern 2: Service + Extract
Pattern 3: Multi-source Aggregation
Pattern 4: Scrape + Process
Debugging
Enable detailed logging:- Each step’s input parameters
- Each step’s output result
- Variable assignments
- Template rendering
Examples
Search and Play Music
Search for music, then play the first result:Get History with Formatting
Combine nativeget_history with template formatting:
Fetch and Process External Data
Get data from API and format it:Next Steps
Native Functions
Built-in functions
Template Functions
Data formatting
Script Functions
Service sequences