Skip to content

Workflow Builder User Guide

Overview

The Workflow Builder enables users to create custom workflows for repetitive processes (music videos, slide decks, social media content, reports). Build workflows visually with drag-drop interface, execute steps in parallel for 3-5x speedup, and monitor progress in real-time.

Quick Start

1. Create Workflow

Navigate to: Dashboard → Workflows → Create Workflow

Options: - From Template: Start with pre-built workflow (music video, slide deck, email campaign) - From Scratch: Build custom workflow step-by-step - From Intent: Describe process in natural language, AI composes workflow

2. Add Steps

Workflow Canvas: Drag-and-drop interface

Step Types: - Generate Images: AI image generation (DALL-E, Midjourney, Stable Diffusion) - Generate Video: AI video generation (Runway Gen-3, Pika) - Generate Audio: Music, voiceovers (Eleven Labs, Suno) - Generate Text: Copy, scripts (GPT-4o, Claude) - Composite Media: Combine images, video, audio (FFmpeg) - API Call: HTTP requests to external services - Transform Data: JSON, CSV manipulation - Conditional: If/else branching based on step results - Approval Gate: Pause for human approval

Adding Steps: 1. Click "+ Add Step" button 2. Select step type from library 3. Configure step (see configuration section below) 4. Click "Add to Workflow"

3. Configure Dependencies

Types: - Sequential: Step B waits for Step A to complete - Parallel: Steps A and B run simultaneously (3-5x faster) - Conditional: Step C only runs if Step A succeeded

Setting Dependencies: 1. Click on step card 2. Go to "Dependencies" tab 3. Select "Depends On" dropdown 4. Choose previous steps that must complete first 5. Save

Parallel Groups: - Steps with same parallel group number run concurrently - Example: Generate images (group 1) + Generate video (group 1) = both run at same time - Sequential steps: Use different group numbers (0, 2, 3, ...)

4. Execute Workflow

Steps: 1. Review workflow configuration 2. Click "Execute Workflow" button 3. Monitor progress in real-time

Execution Features: - Real-time progress bar (0-100%) - Step-by-step status (pending, running, completed, failed) - Parallel execution visualization (multiple steps active) - Cost tracking ($0.00 → estimated total) - Time remaining estimate


Workflow Templates

Music Video Generation

Duration: ~10 minutes Cost: ~$15-$25 Steps: 1. Analyze audio file (extract tempo, beats, mood) 2. Generate scene descriptions based on audio analysis 3. Parallel: Generate visuals for each scene (10 scenes) 4. Composite video with transitions and effects 5. Render final video with audio sync

Parallelization Benefit: 10 scenes generated simultaneously → 5x faster than sequential

Slide Deck Generation

Duration: ~5 minutes Cost: ~$5-$10 Steps: 1. Analyze presentation topic and key points 2. Generate outline (intro, main points, conclusion) 3. Parallel: Generate slide content + images for each slide 4. Apply brand styling (colors, fonts, logos) 5. Generate PDF and PowerPoint files

Email Campaign Generation

Duration: ~3 minutes Cost: ~$2-$5 Steps: 1. Analyze target audience and campaign goal 2. Generate subject lines (10 variations) 3. Generate email body (HTML + plain text) 4. Generate images for email (hero, product shots) 5. Generate A/B test variations

Social Media Content Batch

Duration: ~8 minutes Cost: ~$10-$15 Steps: 1. Analyze content theme and target platforms 2. Parallel: Generate content for each platform: - Instagram post + caption + hashtags - Twitter thread (5 tweets) - LinkedIn article - Facebook post 3. Generate images for each platform (optimized sizes) 4. Schedule posts (integration with social media tools)


Step Configuration

Generate Images Step

Configuration:

{
  "prompt": "Professional office workspace, modern design",
  "count": 5,
  "size": "1024x1024",
  "style": "photorealistic",
  "model": "dall-e-3"  // or "midjourney", "stable-diffusion"
}

Output: Array of image URLs

Generate Video Step

Configuration:

{
  "prompt": "Time-lapse of city skyline at sunset",
  "duration_seconds": 30,
  "resolution": "1920x1080",
  "fps": 30,
  "model": "runway-gen3"  // or "pika"
}

Output: Video URL

Conditional Step

Configuration:

{
  "condition": "{{step_3.output.success}} == true && {{step_3.output.quality_score}} > 8.0",
  "if_true_step": "deploy_production",
  "if_false_step": "regenerate_content"
}

Supported Operators: - Comparison: ==, !=, >, <, >=, <= - Logical: &&, ||, ! - Parentheses: (, )

Approval Gate Step

Configuration:

{
  "title": "Review Generated Content",
  "description": "Please review the generated video before deploying to social media",
  "approval_timeout_hours": 24,
  "required_approvers": 1
}

How it works: 1. Workflow pauses at this step 2. Notification sent to approvers 3. Approvers review content and click "Approve" or "Reject" 4. If approved: Workflow continues 5. If rejected: Workflow stops or branches to "rejection" path 6. If timeout: Workflow fails after 24 hours


Parallel Execution

How It Works

Sequential Execution (traditional):

Step 1 (30s) → Step 2 (60s) → Step 3 (60s) → Step 4 (45s) = 195 seconds

Parallel Execution (optimized):

Step 1 (30s) → [Step 2 (60s) + Step 3 (60s) in parallel] → Step 4 (45s) = 135 seconds
Speedup: 31% faster, same cost

Setting Parallel Groups

Method 1: Automatic Optimization 1. Build workflow sequentially 2. Click "Optimize Workflow" button 3. System analyzes dependencies 4. Automatically assigns parallel groups 5. Review suggestions, apply

Method 2: Manual Assignment 1. Click on step card 2. Set "Parallel Group" number 3. Steps with same number run in parallel 4. Group 0 = sequential (one at a time) 5. Group 1+ = parallel (concurrent with other steps in same group)

Example:

Step 1: Analyze audio (group 0) - runs first
Step 2: Generate scene 1 (group 1) - runs in parallel with steps 3-5
Step 3: Generate scene 2 (group 1)
Step 4: Generate scene 3 (group 1)
Step 5: Generate scene 4 (group 1)
Step 6: Composite video (group 2) - waits for all group 1 steps

Best Practices

✅ Good for Parallel Execution: - Image generation (multiple images) - Video scene generation (multiple scenes) - API calls to different services - Text generation (multiple variations) - Independent data transformations

❌ NOT Good for Parallel Execution: - Steps with dependencies (B needs output from A) - Database transactions (race conditions) - File operations on same file - Sequential processes (step 2 builds on step 1)


Workflow Optimization

Cost Optimization

Goal: Minimize AI API costs while maintaining quality

Strategies: 1. Model Selection: Use cheaper models for simple tasks - GPT-4o Mini for basic text generation (5x cheaper than GPT-4o) - Stable Diffusion for simple images (10x cheaper than DALL-E 3) 2. Batch Operations: Generate multiple outputs in one API call - Generate 10 images in one request instead of 10 separate requests 3. Caching: Reuse results from previous executions - If input is identical, use cached result (0 cost) 4. Early Termination: Stop workflow if quality threshold not met - Conditional step: If quality < 7.0, stop and regenerate

Cost Savings: 20-30% reduction typical

Time Optimization

Goal: Minimize workflow duration

Strategies: 1. Maximize Parallelization: Identify all independent steps, run concurrently 2. Fast Models: Use faster AI models when quality difference < 5% - GPT-4o Turbo: 2x faster than GPT-4o, similar quality 3. Reduce Retries: Set max_retries=1 for non-critical steps 4. Skip Unnecessary Steps: Use conditionals to skip steps when possible

Time Savings: 30-50% reduction typical

Balanced Optimization

Goal: Best cost/time ratio

MAGIEVA Default: Automatically selects balanced optimization

How it works: 1. Identify expensive operations (> $1.00 per step) 2. Parallelize expensive operations only 3. Keep cheap operations sequential (< $0.10 per step) 4. Use mid-tier models (good quality, reasonable cost/time)


Monitoring & Debugging

Real-Time Monitoring

Workflow Execution Dashboard: - Overall progress (0-100%) - Active steps (currently running) - Completed steps (with duration and cost) - Failed steps (with error messages) - Pending steps (waiting for dependencies)

Step Details: - Click on step card to view: - Input parameters - Output data - Logs - Retry history - Cost breakdown

Debugging Failed Workflows

Common Failure Reasons:

  1. API Rate Limit Exceeded
  2. Solution: Add delay between API calls, reduce parallel steps
  3. Retry: Automatically retries after 2s, 4s, 8s (exponential backoff)

  4. Model Timeout

  5. Solution: Reduce complexity (shorter prompts, lower resolution)
  6. Retry: Switch to faster model automatically

  7. Invalid Output Format

  8. Solution: Fix conditional expression, update expected output schema
  9. Manual Fix: Edit step configuration, retry step

  10. Budget Exceeded

  11. Solution: Increase budget limit or wait until next month
  12. No Retry: Workflow stops immediately

Retry Options: - Automatic: Failed steps retry 3 times (exponential backoff) - Manual: Click "Retry Step" button in workflow monitor - Skip: Click "Skip Step" to continue workflow (step marked as skipped)


Advanced Features

Dynamic Workflow Composition

From Natural Language Intent:

Example:

Intent: "Create a social media campaign for product launch. Generate 10 posts for Instagram, 5 tweets, and 1 LinkedIn article. Use images from our asset library."

System generates:
- Step 1: Analyze product and target audience
- Step 2-11: Generate Instagram posts (parallel, group 1)
- Step 12-16: Generate tweets (parallel, group 2)
- Step 17: Generate LinkedIn article (group 3)
- Step 18-28: Generate images for posts (parallel, group 4)
- Step 29: Package all content for review

Benefits: - No manual workflow building - Optimized parallel execution automatically - Adapts to intent complexity

Workflow Versioning

How it works: - Each workflow has version number (v1, v2, v3) - Modifying workflow creates new version - Existing executions continue with original version - New executions use latest version

Rollback: 1. Go to workflow settings 2. Click "Version History" 3. Select previous version 4. Click "Restore Version"

Workflow Templates (Marketplace)

Create Template from Workflow: 1. Build and test workflow 2. Click "Save as Template" 3. Enter template metadata (name, description, category) 4. Publish to marketplace (private or public) 5. Others can instantiate your workflow template


Troubleshooting

Workflow won't start

Check: - All required fields filled in - No circular dependencies (A depends on B, B depends on A) - Budget sufficient for estimated cost

Parallel steps executing sequentially

Check: - Steps have same parallel group number - MAX_PARALLEL_STEPS setting (should be > 1) - Dependencies: If step has "depends_on", it can't run in parallel with dependency

Workflow stuck at checkpoint

Solutions: - Check if approval required (approval gate step) - Click "Resume" button - If checkpoint expired (> 24 hours), restart workflow


Best Practices

Design Phase

  1. Start Simple: Build with 3-5 steps, test, then expand
  2. Test with Sample Data: Use placeholder inputs before real data
  3. Plan Dependencies: Draw workflow diagram on paper first
  4. Estimate Costs: Review estimated cost per step before executing

Execution Phase

  1. Monitor Actively: Watch first few executions closely
  2. Review Outputs: Check step outputs for quality
  3. Set Approval Gates: For expensive steps (> $5), add approval gate

Optimization Phase

  1. Analyze Metrics: Review cost/time per step after 5+ executions
  2. Identify Bottlenecks: Which steps take longest? Cost most?
  3. Apply Optimizations: Parallelize, use cheaper models, add conditionals
  4. A/B Test: Run both versions, compare results

FAQs

Q: What's the maximum number of parallel steps? A: Default: 10 parallel steps. Contact support to increase limit.

Q: Can I schedule workflows to run automatically? A: Yes! Use workflow scheduling feature (cron-like syntax).

Q: How do I share workflows with my team? A: Workflows are organization-level. All team members can view, edit, execute.

Q: Can I integrate external APIs? A: Yes! Use "API Call" step type, configure endpoint, headers, authentication.

Q: What happens if I close my browser during execution? A: Workflow continues in background. You can return later to view results.

Q: Can I export workflow definition? A: Yes! Click "Export" button, download JSON file. Import to another org if needed.


Getting Help

  • Support: support@magieva.com
  • Community: Discord

Last Updated: 2026-02-07 Related Guides: Template Marketplace Guide, Application Generator Guide