Skip to main content
Once you’re comfortable with basic actions, you can build sophisticated workflows that handle complex scenarios.

Building Multi-Path Workflows

Sometimes an action needs to do different things based on the situation. This is where conditional logic shines.

Example: Role-Based License Access

A license renewal action that behaves differently based on user role:
This single action intelligently adapts based on who’s asking.
Design your conditional logic to handle all possible cases, including unexpected roles or missing data. Always include a default path.

Chaining Multiple Data Sources

Complex questions often require data from multiple systems. You can chain API calls together, using the output from one as input to the next.

Example: Complete Customer View

Getting comprehensive customer information from multiple systems:
Each API call builds on the previous ones, creating a rich, complete picture.

Optimization Strategies

When chaining multiple API calls:
  • Make independent calls in parallel when possible
  • Cache frequently accessed data
  • Handle partial failures gracefully
  • Set appropriate timeouts
  • Implement retry logic for critical calls

Handling Batch Operations

Need to perform the same action on multiple items? Loops let you process them efficiently.

Example: License Owner Notifications

Notifying multiple license owners about upcoming renewals:
The loop handles whether there’s 1 license or 100, adjusting automatically.

Loop Best Practices

  • Add limits to prevent infinite loops
  • Include progress indicators for long-running operations
  • Handle errors within the loop gracefully
  • Batch operations when possible for efficiency
  • Provide summary information when complete
Always set maximum iteration limits on loops to prevent runaway executions that could impact performance or costs.

Creating Self-Correcting Actions

Build in error recovery so your actions handle problems gracefully.

Example: Resilient API Integration

An API call that might timeout or fail:
Users get helpful messages instead of cryptic errors, and transient issues resolve themselves.

Error Recovery Strategies

Exponential Backoff: Increase wait time between retries Circuit Breaker: Stop trying after repeated failures Fallback Data: Use cached or default values when primary source fails Partial Success: Return what you can even if some operations fail User Notification: Keep users informed about what’s happening

Using Variables and Context

Actions can remember information throughout the workflow and reference it in later steps.

Example: Dynamic Output Generation

This makes your outputs dynamic and personalized.

Variable Scope

  • Variables persist throughout the action execution
  • Each execution has its own variable context
  • Variables can be overwritten by later steps
  • Use descriptive variable names for maintainability
Variables make your actions more dynamic and allow for complex decision-making based on accumulated data throughout the workflow.

Building Conversational Workflows

Create actions that feel like a conversation, asking follow-up questions based on previous answers.

Example: Guided Report Selection

Helping users find the right report through progressive questions:
Each answer narrows down to exactly what the user needs.

Conversational Design Principles

  • Limit to 2-3 questions maximum
  • Provide clear options rather than open-ended questions
  • Show progress (e.g., “Question 2 of 3”)
  • Allow users to go back and change answers
  • Provide a way to skip optional questions

Complex Data Transformations

Advanced actions often need sophisticated data processing.

Example: Multi-Source Data Aggregation

Data Transformation Techniques

Normalization: Standardize formats across sources Enrichment: Add calculated fields or derived values Filtering: Remove irrelevant or low-quality data Aggregation: Summarize detailed data into insights Joining: Combine related data from multiple sources

Performance Optimization Patterns

For actions that handle large datasets or complex operations:

Caching Strategy

Parallel Processing

Pagination Handling

Profile your actions to identify bottlenecks. Often, a single slow API call is the culprit. Consider caching, parallel requests, or alternative data sources.

Security Patterns

Advanced actions often handle sensitive data. Build in security from the start.

Data Access Control

Audit Trail Pattern

As next steps with these advanced patterns, you can: Apply best practices to ensure robustness