BlocktionBlocktion Docs

Documentation

Getting Started

Understand the core building blocks and how they work together.

Blocktion API Documentation

Comprehensive reference and guides for the Blocktion REST API. Build powerful workflows, integrate with external services, and create amazing automation experiences.

Create your first workflow

Add nodes, wire data with expressions, and control execution order with explicit connections.

1. Create an empty workflow

POST /api/workflows with a name (optionally description and tags). You can also pass initial nodes, but adding/updating nodes later is fine.

2. Add nodes (instances of blocks)

PUT /api/workflows/<workflow_id> with a nodes object keyed by nodeId. Each node typically includes block_id, optional position_x/position_y, and a config object. Use system blocks directly; install marketplace blocks first if not available.

3. Let data connections be derived automatically

When a target node input is set via an expression like {{ outputs.<sourceNodeId>.<outputName> }} inside its config, the backend detects and creates a data connection from the source to the target. No manual wiring needed for these.

4. Add explicit connections when needed

For control-flow (order without data) or special cases, send explicit_connections in PUT /api/workflows/<workflow_id> using the connection model: connection_type is control_flow, data, or both; you may include conditions and a transformation.

5. Define workflow variables (optional)

Provide a variables map in PUT /api/workflows/<workflow_id>. Variables become available as inputs context for nodes and are also returned by /api/workflows/<workflow_id>/blocks/<block_id>/available-inputs.

6. Validate

POST /api/workflows/<workflow_id>/validate to confirm structure, missing references, cycles, and presence of at least one trigger node.

7. Execute

Manual: POST /api/workflows/<workflow_id>/execute with optional trigger_node_id and inputs.

Triggers: Set up triggers as nodes (detected by block_id containing "trigger" or an explicit flag), then:
  • Enable: POST /api/triggers/<trigger_id>/enable
  • Activate directly: POST /api/triggers/<trigger_id>/activate
  • Emit event: POST /api/triggers/events/emit
  • Process webhook: POST /api/triggers/webhooks/process

Notes

  • No strict order to create nodes or connections; update anytime.
  • Node positions (position_x, position_y) are optional and purely visual.
  • Use /api/workflows/<workflow_id>/topology to fetch nodes plus both derived and explicit connections.

API Reference

Authentication

Secure your API with OAuth2 password flow, JWT tokens, and role-based access control.

OAuth2 Password FlowJWT TokensRole-Based AccessDev Mode
View Documentation

Workflows

Create, manage, and execute complex workflows with visual workflow builder.

Visual BuilderExecution EngineStatus TrackingVersion Control
View Documentation

Blocks

Build reusable components with system, user, and custom blocks.

System BlocksCustom BlocksBlock ExecutionPublishing
View Documentation

Sessions

Track and manage workflow execution sessions with real-time monitoring.

Session ManagementReal-time LogsCommand ExecutionOutput Tracking
View Documentation

Providers

Integrate with external services using OAuth, API keys, or manual authentication.

OAuth IntegrationAPI Key AuthManual AuthService Discovery
View Documentation

DataStores

Manage data storage and retrieval with flexible data store configurations.

Data StorageQuery InterfaceSchema ManagementData Migration
View Documentation

Triggers

Automate workflows with webhook, schedule, data, and event-based triggers.

Webhook TriggersScheduled TriggersData TriggersEvent Triggers
View Documentation

Marketplace

Discover, install, and share blocks, workflows, and providers with the community.

Item DiscoveryInstallationRating & ReviewsCollections
View Documentation