Creating Workflows
Learn how to design and build effective workflows in the Flow Editor.
Workflow Anatomy
Every workflow follows a basic structure:
Input → Processing → Output
- Input - Data enters the workflow (prompts, uploads, data feeds)
- Processing - Nodes transform, generate, or analyze
- Output - Results are previewed, saved to the library, or sent to an API endpoint
Starting a Workflow
The Start Node
Every workflow begins with a Start node. This node:
- Triggers when you click the Run button (on the Start node itself or in the Floating Action Bar)
- Has no inputs (it is the entry point)
- Has one output of type
flowthat connects to your first processing node - Shows the estimated credit cost and a warning if you have insufficient credits
Adding Your First Node
After the Start node, add nodes based on what you want to create:
| Goal | Typical Node Chain |
|---|---|
| Generate an image from text | Start → Text Prompt → Text to Image → Preview Media |
| Process an uploaded image | Start → Upload Media → Image Upscale → Preview Media |
| Batch process data | Start → Data Feed → Batch Processor → ... → Batch End |
| Create video from image | Start → Upload Media → Image to Video → Preview Media |
| Intelligent content creation | Start → Text Prompt → Brain → Text to Image → Preview Media |
Common Workflow Patterns
Linear Workflow
The simplest pattern -- nodes execute in sequence:
Start → A → B → C → Preview
Example: Generate image and upscale it
Start → Text Prompt → Text to Image → Image Upscale → Preview Media
Branching Workflow
Split data into multiple paths. The DAG execution engine runs independent branches concurrently:
Start → A → B → Preview 1
↘ C → Preview 2
Example: Generate an image and create both a video and an upscaled version
Start → Text Prompt → Text to Image → Image to Video → Preview Media
↘ Image Upscale → Preview Media
Merging Workflow
Combine multiple inputs using a Sync Gate or multi-input node:
Path A ↘
→ Sync Gate → Next Node
Path B ↗
Example: Combine audio and video
Upload Video ↘
→ Lip Sync → Preview Media
Text to Audio ↗
Conditional Workflow
Route data to different paths based on conditions using the Conditional Switch node:
Start → Analyze → Conditional Switch
↓ Branch A → Processing A
↓ Branch B → Processing B
Example: Process based on image content
Start → Upload Media → Vision Analyzer → Conditional Switch
↓ Has Face → Face Swap
↓ No Face → Image Upscale
Batch Processing
Process multiple items through the same workflow segment. Edges within the batch scope appear as dotted lines:
Start → Data Feed → Batch Processor → Processing → Batch End → Preview
Example: Generate images for multiple prompts
Start → Data Feed → Batch Processor → Text to Image → Batch End
Batch context variables are available inside the loop:
$item- The current item being processed$index- Current iteration index (0-based)$total- Total number of items
Connecting Nodes
Handle Types
Nodes have typed handles for inputs and outputs. Handles are color-coded:
| Type | Color | Description |
|---|---|---|
image | Blue | Static images (PNG, JPG, WebP) |
video | Purple | Video files (MP4, WebM) |
audio | Green | Audio files (MP3, WAV) |
text | Yellow | Strings and prompts |
flow | Primary | Flow trigger (Start node output) |
mask | Amber | Mask data for inpainting |
any | Gray | Universal connector, accepts all types |
Connection Rules
- Outputs connect to inputs (not output-to-output or input-to-input)
- Types must be compatible (or use
anyhandles) - One output can connect to multiple inputs (branching)
- Some inputs accept multiple connections (e.g., Sync Gate has 3 inputs)
- The Quick Connect Menu (appears when you drop a connection on empty space) automatically filters to show only compatible nodes
Valid Connection Examples
[image output] → [image input] ✓
[image output] → [any input] ✓
[any output] → [image input] ✓
[text output] → [image input] ✗
Using Node Configurations
Each node has configuration options that appear in the Node Inspector panel when selected.
Node-Specific Options
Each node type has unique options. For example:
- Text to Image - Model selection, aspect ratio, style, seed
- Brain - System prompt, mode (creative/research/hybrid/analysis), connected output configuration
- Batch Processor - Mode (parallel/sequential), concurrency, error handling
- Conditional Switch - Branch conditions and routing rules
- Data Feed - JSON data input with row/column structure
Working with Data
Input Sources
Data enters workflows through:
- Text Prompt - Manual text input
- Upload Media - Upload images, videos, or audio from your device
- Remote Media - Load media from a URL
- Library - Select assets from your Content Library
- Data Feed - Structured JSON data for batch processing
Data Transformation
Use the Brain node for complex data transformation:
Start → Data Feed → Brain (Transform) → Text to Image
The Brain node can:
- Extract information from structured data
- Reformat text prompts
- Make decisions based on content
- Generate new data from multiple inputs
- Operate in four modes: creative, research, hybrid, and analysis
Output Destinations
- Preview Media - Display results in the canvas for review
- Text Preview - Display text output inline
- Content Library - Automatically save generated media when Auto-save to Library is enabled
- API Endpoint - Expose workflow results through an API (when API mode is enabled)
Best Practices
1. Plan Before Building
Sketch your workflow first:
- What inputs do you need?
- What transformations occur?
- Where do outputs go?
Or use AI Generation in the Bottom Node Menu -- describe your workflow in natural language and the AI will build it for you.
2. Test Incrementally
Add nodes one at a time and test:
- Verify each node works before adding the next
- Use Preview Media nodes to check intermediate results
- Use the Inspector node to debug data flowing between nodes
- Fix issues early before the workflow grows complex
3. Handle Errors Gracefully
Add error handling for production workflows:
- Use Retry Gate for transient failures (e.g., API timeouts)
- Add Conditional Switch for edge cases
- Use the Inspector node to log and examine values at any point
4. Optimize for Performance
Consider execution efficiency:
- Parallel branches execute concurrently automatically
- Use Batch Processor for multiple items (recommended concurrency: 3-5)
- Choose appropriate models -- use Budget Mode for drafts, premium models for final output
5. Document Your Workflow
Make workflows understandable:
- Use Post-It Note nodes to annotate complex sections
- Name your workflow clearly when saving
Next Steps
- Executing Workflows - Run and debug
- AI Generation - Let AI build workflows
- Node Reference - Explore all available nodes