Skip to main content

Blocks Overview

Blocks are reusable workflow packages in Flow Studio. You take an entire pipeline of nodes and edges, wrap it behind a clean set of inputs and outputs, and drop it onto any canvas as a single node. This lets you build complex multi-step processes once and reuse them everywhere.

What Are Blocks?

A Block is a meta-node that encapsulates a complete workflow inside a single draggable unit. From the outside it looks and behaves like any other node -- it has typed input and output handles that you connect to the rest of your workflow. On the inside it contains a full graph of nodes and edges that execute as a self-contained pipeline.

Think of Blocks as functions in programming: you define the logic once, expose the parameters you need, and call it as many times as you want without duplicating work.

Key Concepts

Encapsulation

A Block hides its internal complexity behind a clear interface. Other users (or your future self) only need to know what goes in and what comes out -- not how the pipeline works internally.

Reusability

The same Block can be used multiple times across different workflows. Update the Block definition in one place and every instance benefits.

Typed Inputs and Outputs

Every Block defines typed handles for its inputs and outputs:

TypeDescriptionHandle Color
ImageImage assets (photos, illustrations, AI generations)Blue
PromptText prompts for AI generationPurple
VideoVideo assetsOrange

Connections between Blocks and other nodes are validated by type -- you can only connect matching types.

Scoping

Blocks can be scoped at two levels:

ScopeVisibilityWho Can Edit
ProjectAvailable within the project where they were createdCreator, or workspace admin/owner
WorkspaceAvailable across all projects in the workspaceAdmin or owner only

Nesting

Blocks can contain other Blocks, up to 3 levels deep. This lets you compose higher-order pipelines from smaller building blocks. XainFlow enforces the nesting limit and detects circular references automatically.

Anatomy of a Block Node

When you place a Block on the canvas, it displays:

SectionWhat It Shows
HeaderBlock name, internal node summary, status badge, credit estimate, and play button
InputsOne row per input handle, with a colored icon and label
PipelineA compact horizontal visualization of the internal nodes in execution order
OutputsOne row per output handle (replaced by thumbnail previews after execution)
FooterVersion number

After execution, the output section is replaced by floating thumbnail previews that show the generated results directly on the canvas.

When to Use Blocks

Blocks are ideal when you find yourself:

  • Repeating the same sequence of nodes across multiple workflows
  • Standardizing a process (for example, a brand-consistent image generation pipeline) for your team
  • Simplifying a complex workflow by breaking it into logical, named sections
  • Sharing reusable pipelines across projects in your workspace