Search documentation

Search for pages in the documentation

Performance Optimization

Tips for building efficient, fast workflows

Efficient workflows execute faster, cost less, and provide better user experiences. This guide covers optimization techniques for building high-performance automations.

Performance Factors

What Affects Performance

FactorImpactControllable?
Node countMore nodes = more processingYes
AI model tierHigher tiers = slowerYes
Input data sizeLarger data = slower processingPartially
External API speedVaries by serviceNo
Parallel vs serialParallel is fasterYes
Network latencyVariesNo

Performance Budgets

Node TypeTypical TimeTimeout
Load Meeting1-3 seconds30s
AI Prompt (medium)5-15 seconds120s
AI Agent15-60 seconds120s
Slack Post1-2 seconds30s
Email Send1-2 seconds30s
CRM operations2-5 seconds30s

Optimization Strategies

1. Use Parallel Processing

Run independent operations concurrently:

Sequential (slow):

text
[Load] ──▶ [AI: Summary] ──▶ [AI: Items] ──▶ [Combine]

Time: 5s + 10s + 10s = 25s

Parallel (fast):

text
         ┌──▶ [AI: Summary] ──┐
[Load] ──┤                    ├──▶ [Zip]
         └──▶ [AI: Items] ───┘

Time: 5s + max(10s, 10s) = 15s

2. Choose Appropriate Model Tiers

Match AI complexity to task complexity:

TaskRecommended Tier
Yes/no classificationlow (fast, cheap)
Simple summarizationmedium
Complex analysishigh (slow, expensive)
Simple extractionlow or medium

Example:

text
[AI: Classify urgency] ──▶ model: low (fast)
[AI: Generate report] ──▶ model: high (thorough)

3. Minimize AI Input Size

Large inputs slow down AI nodes:

Full transcript (slow):

liquid
{{ json.callRecording.transcript }}
// Could be 10,000+ words

Summary first (fast):

liquid
{{ json.callRecording.transcriptSummary }}
// ~500 words

Strategy: Use transcriptSummary unless you need full detail.

4. Batch Similar Operations

Group similar actions when possible:

Individual calls:

text
[Select Many] ──▶ [API Call] ──▶ (N separate calls)

Batch when available:

text
[Process All] ──▶ [Single Batch API Call]

Note: Some operations must be per-item (like individual emails).

5. Filter Early

Remove unwanted items before expensive processing:

Process then filter:

text
[AI: Analyze all] ──▶ [If: relevant?] ──▶ [Use result]

Filter then process:

text
[If: relevant?] ──▶ [AI: Analyze relevant only]

6. Reduce Unnecessary Loads

Don't load data you don't need:

Load always:

text
[Trigger] ──▶ [Load Meeting] ──▶ [If: needs data?]

Load when needed:

text
[Trigger] ──▶ [If: needs data?] ──▶ [Load Meeting]

7. Use Appropriate Execution Mode

Choose per-item vs batch wisely:

ScenarioModeReason
Send individual emailsPer-itemEach needs separate send
Combine for single summaryBatchNeed all data together
Process independentlyPer-itemCan parallelize

8. Simplify Prompts

Concise prompts are faster:

Verbose:

text
You are an AI assistant. Your job is to help with meetings.
Please carefully read the following meeting transcript and
then provide a summary. The summary should be comprehensive
but also concise. Make sure to include key points...
[200 more words of instructions]

Concise:

text
Summarize this meeting in 2-3 sentences. Focus on decisions and action items.

Monitoring Performance

Check Execution Times

Review execution logs for timing:

  • Total workflow duration
  • Per-node duration
  • Identify slowest nodes

Identify Bottlenecks

Common bottlenecks:

  • AI nodes (especially high tier)
  • Sequential dependencies
  • Large data processing
  • External API calls

Performance Metrics

Track over time:

  • Average execution time
  • 95th percentile execution time
  • Timeout rate
  • Error rate

Timeout Management

Avoiding Timeouts

AI nodes timeout at 120 seconds. To avoid:

  1. Reduce input size - Use summaries instead of full transcripts
  2. Simplify prompts - Remove unnecessary instructions
  3. Lower model tier - If quality allows
  4. Split complex tasks - Multiple simpler AI calls

Handling Timeouts

When timeouts might occur:

text
[AI: Complex task]
    ├── Success ──▶ [Use result]
    └── Error ────▶ [AI: Simpler fallback] ──▶ [Use fallback]

Cost Optimization

Performance and cost often align:

OptimizationPerformanceCost
Lower model tierFasterCheaper
Smaller inputsFasterCheaper
Fewer AI callsFasterCheaper
Early filteringFasterCheaper

AI Token Usage

Monitor token usage:

  • Prompt tokens (input)
  • Completion tokens (output)
  • Total cost per execution

Reducing Token Usage

  1. Use summaries instead of full text
  2. Limit output length in prompts
  3. Use lower tiers for simple tasks
  4. Combine prompts when possible

Architecture for Performance

Design Patterns

Fast path / slow path:

text
[Quick check]
    ├── Simple case ──▶ [Fast processing]
    └── Complex case ─▶ [Full processing]

Progressive processing:

text
[Quick summary] ──▶ [If: needs detail?] ──▶ [Deep analysis]

Parallel fan-out:

text
         ┌──▶ [Task A] ──┐
[Start] ─┼──▶ [Task B] ──┼──▶ [Combine] ──▶ [End]
         └──▶ [Task C] ──┘

Performance Best Practices

PracticeImpact
Parallelize independent tasksSignificant
Use appropriate model tiersSignificant
Minimize AI input sizeModerate
Filter before expensive operationsModerate
Keep prompts conciseModerate
Avoid unnecessary loadsLow-Moderate
Choose right execution modeLow

Performance Checklist

Before releasing, verify:

  • AI nodes use appropriate model tiers
  • Independent operations are parallel
  • AI inputs are reasonably sized
  • Unnecessary processing is filtered out
  • No redundant data loads
  • Prompts are concise
  • Expected execution time is acceptable

Example: Optimized Workflow

Before optimization:

text
[Trigger] ──▶ [Load Meeting]
              ──▶ [AI High: Summarize full transcript]
              ──▶ [AI High: Extract items from full transcript]
              ──▶ [AI High: Analyze sentiment from full transcript]
              ──▶ [Combine all]
              ──▶ [Send]

Time: ~60-90 seconds

After optimization:

text
[Trigger] ──▶ [Load Meeting]
              │
              ├──▶ [AI Medium: Summarize from summary] ──┐
              ├──▶ [AI Low: Extract items from summary] ─┼──▶ [Zip] ──▶ [Send]
              └──▶ [AI Low: Classify sentiment] ─────────┘

Time: ~15-25 seconds

Optimizations applied:

  1. Parallel processing (3 AI nodes run concurrently)
  2. Lower model tiers where appropriate
  3. Use transcript summary instead of full transcript
  4. Simpler task prompts