Ep 02: Anatomy of a Workflow — Nodes, Triggers, and Connections

⏱ Est. reading time: 13 min Updated on 4/10/2026

The Three Building Blocks

In n8n, all automation logic is built on three fundamental concepts. Understanding the relationship between them is the foundation for mastering the entire platform.

graph TB
    subgraph "n8n Workflow Triad"
        direction LR
        T["🔔 Triggers
When to start?"] N["⚙️ Nodes
What to do?"] C["🔗 Connections
How does data flow?"] T -->|"Starts workflow"| N N -->|"Passes Items via connection"| N end style T fill:#6366f1,stroke:#4f46e5,color:#fff style N fill:#22c55e,stroke:#16a34a,color:#fff style C fill:#f59e0b,stroke:#d97706,color:#fff

1. Triggers — The Starting Gun

Triggers determine when a workflow wakes up. n8n offers five main categories:

Trigger Type Typical Node How It Works Use Case
Manual Manual Trigger Click "Test Workflow" Debugging & testing
Scheduled Schedule Trigger Cron expression based Daily reports, periodic syncs
Webhook Webhook External HTTP request hits endpoint API callbacks, form submissions
Event-Based Gmail / Telegram Trigger Polling or push-based listeners Email processing, chat bots
Chat Chat Trigger Built-in n8n chat UI receives messages AI conversational bots
sequenceDiagram
    participant External as External System
    participant Trigger as 🔔 Trigger
    participant WF as ⚙️ Workflow Engine
    participant Node1 as Node A
    participant Node2 as Node B

    Note over External,Trigger: Phase 1: Awaiting event
    External->>Trigger: Event arrives (HTTP / email / timer / chat)
    
    Note over Trigger,WF: Phase 2: Wake up workflow
    Trigger->>WF: Start execution with initial Data Items
    
    Note over WF,Node2: Phase 3: Execute node by node
    WF->>Node1: Pass Items
    Node1->>Node2: Process and forward
    Node2->>WF: Execution complete, log results

Webhook Trigger Configuration

# When you enable a Webhook trigger, n8n auto-generates two URLs:

# Test URL (only active while the editor is open)
https://your-n8n.com/webhook-test/unique-path-id

# Production URL (permanently active after workflow activation)
https://your-n8n.com/webhook/unique-path-id
// When a Webhook receives a POST request, n8n wraps the HTTP body 
// into its standard Item format
// Example incoming request: POST { "name": "Alice", "email": "[email protected]" }
//
// n8n internally wraps it as:
[
  {
    "json": {                    // 'json' is the core data carrier of an n8n Item
      "name": "Alice",           // Original fields preserved intact
      "email": "[email protected]",
      "headers": { ... },        // HTTP request headers
      "params": { ... },         // URL query parameters
    },
    "binary": { ... }            // File uploads go here
  }
]

2. Nodes — The Workers

Nodes are the components that actually do the work. Each node receives upstream Data Items, performs a specific operation, and passes the result as new Items downstream.

Six Categories of Nodes

graph TB
    subgraph "n8n Node Type System"
        Root[All Nodes 1000+]
        
        Root --> Cat1[🔌 Integration
Gmail / Slack / GitHub
Direct third-party API] Root --> Cat2[⚙️ Core
If / Switch / Merge / Set
Data flow control] Root --> Cat3[💻 Code
Code Node JS/Python
Custom logic] Root --> Cat4[🤖 AI
Agent / LLM / Memory
LLM invocations] Root --> Cat5[📦 Data
Data Tables / Spreadsheet
Persistent storage] Root --> Cat6[🧩 Community
Community Nodes
npm-installed extensions] end style Root fill:#1a1d28,stroke:#ff6d5b,color:#fff style Cat4 fill:#ff6d5b,stroke:#e55a4e,color:#fff

Node Input/Output Contract

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// Data structure example during node execution
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

// 🔵 Input: Items array from upstream node
const input = [
  { "json": { "id": 1, "name": "Product A", "price": 299 } },
  { "json": { "id": 2, "name": "Product B", "price": 59 } },
  { "json": { "id": 3, "name": "Product C", "price": 188 } }
];

// ⚙️ Processing: e.g., If node routes by condition (price > 100)

// 🟢 Output True branch:
const outputTrue = [
  { "json": { "id": 1, "name": "Product A", "price": 299 } },  // ✓ passes
  { "json": { "id": 3, "name": "Product C", "price": 188 } }   // ✓ passes
];

// 🔴 Output False branch:
const outputFalse = [
  { "json": { "id": 2, "name": "Product B", "price": 59 } }    // ✗ fails condition
];

3. Connections — The Data Highways

Connections are directed edges linking nodes together. They define both execution order and serve as data transport conduits for Items.

Three Connection Patterns

graph LR
    subgraph "Pattern 1: Sequential"
        S1[Node A] --> S2[Node B] --> S3[Node C]
    end
    
    subgraph "Pattern 2: Branching"
        B1[If Node] -->|True| B2[Send Email]
        B1 -->|False| B3[Log Error]
    end
    
    subgraph "Pattern 3: Merging"
        M1[API Source 1] --> M3[Merge Node]
        M2[API Source 2] --> M3
        M3 --> M4[Unified Processing]
    end

Key Rule: Item Pass-Through Mechanism

sequenceDiagram
    participant NodeA as Node A (outputs 3 Items)
    participant Edge as Connection (pipe)
    participant NodeB as Node B (processes each)
    
    Note over NodeA: Output: [{id:1}, {id:2}, {id:3}]
    NodeA->>Edge: Emit 3 Items
    
    Note over NodeB: n8n iterates automatically!
No for-loop needed Edge->>NodeB: Item 1 {id:1} Note over NodeB: Execution #1 Edge->>NodeB: Item 2 {id:2} Note over NodeB: Execution #2 Edge->>NodeB: Item 3 {id:3} Note over NodeB: Execution #3 Note over NodeB: Aggregates: 3 processed Items

⚠️ Core insight: In n8n, you almost never need to write loops manually. If upstream emits N Items, the downstream node automatically executes N times. This is n8n's Item-Driven implicit loop mechanism, covered in depth in Episode 04.


Episode Summary

mindmap
  root((n8n Core Triad))
    Triggers
      Manual
      Scheduled (Cron)
      Webhook (HTTP)
      Event-Based (Polling)
      Chat Trigger
    Nodes
      Integration (1000+ APIs)
      Core (If/Switch/Merge)
      Code (JS/Python)
      AI (Agent/LLM)
      Data (Data Tables)
      Community (npm)
    Connections
      Sequential
      Branching
      Merging
      Item Pass-Through

Next Episode

In Ep 03, we'll get hands-on — spinning up a complete n8n instance locally in under 3 minutes using Docker Compose, with encryption keys and data persistence properly configured.