Workflows
Build automated data pipelines using the dcupl Console's visual graph-based editor. Connect nodes, define data flow, and process data at scale.
What are Workflows?
Workflows are directed acyclic graphs (DAGs) where data flows through connected processing steps:
flowchart LR T[Trigger] --> F[Fetch Data] F --> TR[Transform] TR --> S[Save Results] F -->|error| E[Handle Error]
- Nodes are execution units that process data
- Edges define how data flows between nodes
- Items are discrete data units moving through the graph
- Ports are typed connection points (success, error, custom)
Creating a Workflow
- Open your project in the Console
- Navigate to Workflows in the sidebar
- Click Create Workflow
- Enter a name and key for your workflow
The visual workflow editor opens with an empty canvas ready for design.
Triggers
Every workflow starts with a trigger that defines how it's activated:
| Trigger | Description | Use Case |
|---|---|---|
| Manual | Trigger from Console or API | Testing, on-demand processing |
| Webhook | HTTP endpoint receives requests | External integrations, real-time events |
| Scheduled | Runs on a cron schedule | Daily syncs, periodic updates |
Adding a Trigger
- From the node palette, drag a trigger onto the canvas
- Configure the trigger type and settings
- Connect it to your first processing node
Node Types
Drag nodes from the palette onto the canvas to build your workflow.
Request Node
Makes HTTP requests to external APIs:
- Configure URL, method, headers, and body
- Access workflow variables with
{{variables.apiToken}} - Success data flows to the
mainport - Errors route to specialized ports (
error,client-error,server-error,timeout)
Script Node
Executes JavaScript for data transformation:
- Access input items with
$items()or$json() - Return transformed items
- Route to multiple output ports with
$ports() - Use built-in utilities like
fetch(),csvToJson(),jsonToCsv()
File Nodes
Work with files from various storage backends:
| Node | Purpose |
|---|---|
| dcupl-files | Read/write local project files |
| git-files | Clone, commit, push to Git repositories |
| s3-files | Upload/download from AWS S3 |
| azure-files | Upload/download from Azure Blob Storage |
Data Mapper Node
Transform data structures with visual field mapping:
- Map source fields to target fields
- Rename properties
- Flatten or nest structures
dcupl Instance Node
Query and update dcupl data directly in workflows:
- Initialize dcupl instances
- Run queries against models
- Update data programmatically
Connecting Nodes with Edges
Edges define how data flows between nodes.
Creating Connections
- Click on a node's output port
- Drag to another node's input port
- Release to create the connection
Edge Conditions
Filter items that flow through an edge:
- Click on an edge to select it
- Add a condition expression (e.g.,
$json.status === 'active') - Only items matching the condition pass through
Edge Transforms
Modify items as they flow through:
- Select an edge
- Add a transform expression
- Items are transformed before reaching the target node
Data Flow Patterns
Linear Flow (ETL)
flowchart LR E[Extract] --> T[Transform] --> L[Load]
Simple sequential processing from source to destination.
Parallel Branches
flowchart LR S[Source] --> A[Process A] S --> B[Process B] A --> M[Merge] B --> M
Process data through multiple paths simultaneously, then combine results.
Conditional Routing
flowchart LR V[Validate] -->|valid| P[Process] V -->|invalid| E[Log Error]
Route items to different nodes based on conditions.
Merge Strategies
When multiple edges connect to a single node, configure how incoming data is combined:
| Strategy | Behavior | Use Case |
|---|---|---|
| Append | Concatenate all items | Aggregating multiple sources |
| Merge | Combine by index position | Parallel enrichment |
| Merge by Key | Join by common field | SQL-style joins |
| Wait All | Keep inputs separate | Comparing datasets |
| First | Use first to complete | Failover scenarios |
Configuring Merge Strategy
- Select a node with multiple incoming edges
- Open the node configuration
- Choose the merge strategy
- For
merge-by-key, specify the key field
Error Handling
Workflows treat errors as data that can be routed and processed.
Error Ports
Every node has an error output port that triggers when:
- An exception is thrown
- Validation fails
- A timeout occurs
Connect error ports to handle failures gracefully:
flowchart LR A[API Call] -->|success| P[Process] A -->|error| E[Handle Error]
- Error port connected: Workflow continues, error becomes data
- Error port not connected: Workflow stops, error propagates
HTTP-Specific Error Ports
Request nodes provide specialized error routing:
| Port | Status | Description |
|---|---|---|
main |
2xx | Success responses |
client-error |
4xx | Bad request, not found, unauthorized |
server-error |
5xx | Server problems (retry these) |
timeout |
- | Request took too long |
error |
- | Network errors, DNS failures |
Error Handling Patterns
Fallback to backup:
flowchart LR P[Primary] -->|error| B[Backup] P -->|success| R[Result] B -->|success| R
Graceful degradation:
flowchart LR F[Fetch Live] -->|success| P[Process] F -->|error| D[Use Defaults] D --> P
Variables
Store configuration values and secrets that can be accessed throughout workflows.
Adding Variables
- Click Settings in the workflow toolbar
- Navigate to Variables
- Add key-value pairs
- Mark sensitive values as Secret
Using Variables
Reference variables in node configurations:
- URLs:
{{variables.apiBaseUrl}}/users - Headers:
Bearer {{variables.apiToken}}
Variables resolve from (highest to lowest priority):
- Runtime variables (passed when triggering)
- Project-level variables
- Workflow template variables
Response Configuration
Configure how your workflow returns results:
| Type | Description |
|---|---|
| Status | Return execution status only |
| Script | Custom response with transformed data |
| Debug | Full execution details (development only) |
Deploying Workflows
Save and Deploy
- Click Save to save your workflow
- Click Deploy to deploy to a runner
- Select the target runner instance
- Wait for status to show Ready
Testing
- Use the Run button for manual execution
- Send requests to the webhook endpoint
- View execution logs in the Console
Memory Efficiency
V3 workflows use item-based data flow for significant memory improvements:
| Dataset Size | Memory Usage |
|---|---|
| 10K items | ~10MB |
| 100K items | ~10MB |
| 1M items | ~10MB |
Previous node results are garbage collected as items flow forward.
Best Practices
Node Design
- Keep nodes focused on single responsibility
- Use descriptive names
- Handle errors with dedicated error ports
Performance
- Use stream mode for large datasets (100K+ items)
- Set buffer sizes for backpressure control
- Monitor memory in production
Testing
- Test with realistic data volumes
- Verify merge strategies work correctly
- Test error paths thoroughly
What's Next?
- Getting Started - Build your first workflow step-by-step
- RAPI - Deploy workflows as REST APIs
- AI Features - Generate workflows with AI assistance