Core Concepts
Understand workflows, nodes, connections, expressions, and execution
Core Concepts
Think of DeepChain like LEGO blocks. You snap together small pieces (nodes) to build complex structures (workflows). This page explains each piece and how they fit together.
Workflows: The Big Picture
A workflow is a sequence of steps that runs automatically. Each step does one thing, and the output of one step becomes the input to the next.
Think of it like a recipe:
- Step 1: Fetch ingredients (HTTP Request node)
- Step 2: Prepare ingredients (Transform node)
- Step 3: Cook (API node)
- Step 4: Serve (Email or Slack node)
Workflow Lifecycle
Draft Active Paused Archived
│ │ │ │
└─── Build ──┘ │ │
Test └─── Running ┴─── Pause ──┘
Production Maintenance
Draft — You're building and testing. Not public yet.
Active — Live and running. Executes on schedule or when triggered.
Paused — Temporarily disabled. No executions happening, but you can restart later.
Archived — Done with this workflow. Keeps history, but read-only.
Note: You can pause and resume workflows anytime. Pausing is useful for maintenance or debugging.
Nodes: The Building Blocks
A node is a single action. HTTP Request fetches data. Log outputs text. Transform reshapes data.
Think of nodes like kitchen tools:
- HTTP Request is like a phone call (call an API and get data back)
- Transform is like a knife (chop data into pieces)
- Log is like plating (present the final result)
- Slack is like delivery (send the result somewhere)
Node Anatomy
Every node has inputs, a configuration, and outputs:
┌──────────────────────────────┐
│ HTTP Request │
├──────────────────────────────┤
│ Input (data comes in) │
│ ○ │
├──────────────────────────────┤
│ Configuration │
│ URL: http://example.com │
│ Method: GET │
├──────────────────────────────┤
│ │
│ Output (result goes out) ○ │
└──────────────────────────────┘
Node Types at a Glance
| Category | What It Does | Examples |
|---|---|---|
| Control Flow | Start/stop, branch, loop | Start, End, If/Else, Loop |
| Integration | Talk to external services | HTTP Request, Database, Webhook |
| Data | Transform and filter data | Transform, Filter, Map, Aggregate |
| Communication | Send notifications | Slack, Email, SMS |
| AI | Use artificial intelligence | AI Agent, Embeddings |
| Approval | Pause for human review | Approval, Multi-Party Approval |
| Utility | Helper functions | Log, Delay, Set Variable |
Each node has a unique ID. When you add the first HTTP Request node, it's called http_request_1. Add another, and it's http_request_2. You'll use these IDs to reference data between nodes.
Tip: Hover over a node to see its ID. You'll need this ID in expressions.
Connections: Data Flow
Connections are lines that join nodes together. They show how data flows from one node to the next.
Connection Rules
Think of connections like pipes:
Node A Node B
○ (output) ────────→ ○ (input)
- Outputs connect to inputs — Data flows from output ports to input ports
- One output, many inputs — One node can send data to multiple nodes
- Many outputs, one input — Multiple nodes can merge data into one node
- No circles — Data can't flow backwards (no loops)
Real Example
┌────────────┐ ┌────────────┐ ┌────────────┐
│ Fetch │ │ Transform │ │ Email │
│ from API │────────▶│ the data │────────▶│ result │
└────────────┘ └────────────┘ └────────────┘
When the Fetch node runs, it sends its output to Transform. When Transform finishes, it sends its output to Email.
Expressions: Referencing Data
Expressions let you grab data from previous nodes using the {{ }} syntax.
Basic Pattern
{{ node_id.output.field }}
Let's break it down:
node_id— The node's ID (e.g.,http_request_1)output— The node's output (could beresponse,data,rows, etc.)field— A field in the output (e.g.,body,name,email)
See It In Action
Node 1: HTTP Request fetches this:
{
"response": {
"body": {
"name": "Alice",
"email": "alice@example.com"
}
}
}
Node 2: Log uses this expression:
Message: User {{ http_request_1.response.body.name }}
Result: The log outputs "User Alice"
Common Patterns
// Get an entire response
{{ http_request_1.response.body }}
// Get a nested field
{{ http_request_1.response.body.user.email }}
// Combine text with data
Hello, {{ transform_1.output.name }}!
// Access array elements
{{ transform_1.output.items[0] }}
// Access loop variables
{{ loop_1.current.id }} // Current item being looped
{{ loop_1.index }} // Loop iteration number (0, 1, 2...)
Built-in Functions
DeepChain has functions you can use inside expressions:
// String functions
{{ upper("hello") }} // "HELLO"
{{ lower("HELLO") }} // "hello"
{{ trim(" hello ") }} // "hello"
// Array functions
{{ length([1, 2, 3]) }} // 3
{{ first([1, 2, 3]) }} // 1
{{ join(["a", "b"], ", ") }} // "a, b"
// Math
{{ sum([1, 2, 3]) }} // 6
{{ round(3.14159, 2) }} // 3.14
// Dates
{{ now() }} // Current date/time
{{ formatDate(date, "yyyy-MM-dd") }} // Format a date
// Conditional
{{ if(age > 18, "adult", "minor") }}
Tip: You can nest expressions. For example:
{{ upper(http_request_1.response.body.name) }}
Execution: How Workflows Run
Execution is the process of running a workflow. You trigger it, DeepChain runs each node in order, and results are stored.
Execution States
As a workflow runs, it moves through states:
Pending ──▶ Running ──▶ Completed ✓
│
└────▶ Failed ✗
Paused (waiting for approval)
| State | What It Means |
|---|---|
| Pending | Queued, waiting to run |
| Running | Currently executing |
| Completed | Done successfully ✓ |
| Failed | Hit an error ✗ |
| Paused | Waiting (e.g., for approval) |
| Cancelled | Manually stopped |
How Execution Works
Here's what happens when you click "Run":
1. You click "Run"
↓
2. DeepChain creates an execution record
↓
3. Workflow Runner picks up the job
↓
4. Start node runs first (always)
↓
5. First connected node runs (gets Start's output)
↓
6. Each subsequent node runs in order
↓
7. Final node finishes
↓
8. Execution marked as "Completed" ✓
Each node has access to:
- Previous outputs — What earlier nodes produced
- Workflow inputs — Initial data passed in
- Credentials — API keys, database passwords, etc.
- Environment variables — Configuration values
Error Handling
If a node fails, you can configure what happens:
on_error: "continue" # Keep going, ignore the error
on_error: "fail" # Stop immediately, mark execution failed
on_error: "retry" # Try again (3 times by default)
For example, if your HTTP request times out, you can retry 3 times before failing.
Workspaces: Teams and Isolation
A workspace is like a project folder. It isolates your workflows, credentials, and team members from other projects.
Think of it like Google Drive folders:
- You have one Organization
- Inside it, you can have multiple Workspaces
- Each Workspace is separate (workflows, credentials, team members)
Workspace Structure
Your Organization
│
├── Workspace: "Customer Support"
│ ├── Workflows
│ ├── Credentials (API keys, passwords)
│ ├── Team Members
│ └── Audit Logs
│
└── Workspace: "Finance"
├── Workflows
├── Credentials
├── Team Members
└── Audit Logs
Roles and Permissions
Different roles have different access:
| Role | Can Do | Can't Do |
|---|---|---|
| Owner | Everything. Manage members, billing, delete workspace | (Nothing—full access) |
| Admin | Create/edit workflows, manage credentials and settings | Change billing or delete workspace |
| Member | Create/edit their own workflows | Edit others' workflows or manage credentials |
| Viewer | See everything (read-only) | Edit or execute anything |
Note: Most users are "Members." Only business owners or team leads need "Admin" or "Owner."
Putting It All Together
Let's trace through a real workflow:
1. You create a workflow named "Sync Customers"
2. You add nodes:
├── Webhook (trigger)
├── HTTP Request (fetch from Salesforce)
├── Transform (clean the data)
├── Database (save to local DB)
└── Slack (notify when done)
3. You click "Run" (trigger manually)
4. Webhook node runs (passes empty data forward)
5. HTTP Request runs:
Input: Empty (from Webhook)
Output: { customers: [...] }
6. Transform runs:
Input: { customers: [...] }
Expression: {{ http_request_1.response.body.customers }}
Output: { cleaned_customers: [...] }
7. Database runs:
Input: Cleaned customers
Saves to database ✓
8. Slack runs:
Expression: "Synced {{ length(transform_1.output.cleaned_customers) }} customers"
Sends: "Synced 47 customers"
9. Workflow complete ✓
Key Takeaways
- Workflows are sequences of steps that run automatically
- Nodes are individual actions (fetch, transform, send)
- Connections show how data flows between nodes
- Expressions reference data from previous nodes
- Execution is the process of running a workflow
- Workspaces isolate projects and team members
Next Steps
Ready to go deeper?
All Node Types → — Explore 50+ available nodes.
Expression Reference → — Advanced expression techniques.
Connectors → — Integrate with external services.
Back to Quick Start → — Build another workflow.