IOLEBA

 IOLEBA N8N Textbook – Table of Contents

IOLEBA
Chapter 3

Understanding Nodes and Data Flow

Introduction

Now that you have n8n installed and have created your first basic workflow, it's time to dive deeper into the fundamental building blocks: nodes and data flow. Understanding how nodes work and how data moves through workflows is essential to becoming proficient with n8n.

What Are Nodes?

Node: A self-contained unit in an n8n workflow that performs a single, specific action. Nodes are connected together to create automated processes.

Think of nodes as LEGO blocks. Each piece has a specific purpose, and by connecting them in different ways, you can build incredibly complex structures.

The Three Categories of Nodes

1. Trigger Nodes

Trigger nodes are the starting point of workflows. They listen for specific events and initiate the workflow when those events occur.

Common Trigger Types:
  • Schedule Trigger: Runs at specified times
  • Webhook: Triggered by HTTP requests
  • Email Trigger: Monitors inbox for new messages
  • Manual Trigger: Click Execute to start

2. Action Nodes

Action nodes do the actual work. They perform operations like sending emails, updating databases, creating files, or calling APIs.

Category Examples Common Uses
Communication Gmail, Slack, Twilio Send messages, notifications
Data Storage Google Sheets, Airtable Store, retrieve records
CRM/Marketing HubSpot, Mailchimp Manage contacts, campaigns
E-commerce Shopify, Stripe Process orders, payments
💡 The HTTP Request Node: If n8n doesn't have a dedicated node, the HTTP Request node can connect to virtually any web service with an API.

3. Logic/Control Nodes

Logic nodes add intelligence by manipulating data, making decisions, and controlling execution flow.

Essential Logic Nodes:
  • IF Node: Create conditional branches
  • Switch Node: Route data to different paths
  • Set Node: Create or modify data
  • Merge Node: Combine data from branches
  • Loop Over Items: Process items individually

Understanding Data Flow

When a workflow executes:

  1. The trigger node activates and produces initial data
  2. Data passes to the next connected node
  3. Each node receives output from the previous node
  4. Nodes can transform, filter, or enhance data
  5. The final node produces the end result

The JSON Data Structure

All data in n8n is represented in JSON format.

Basic JSON Example:
{
  "name": "John Smith",
  "email": "[email protected]",
  "age": 35,
  "isActive": true
}

Accessing Data with Expressions

To access data from previous nodes, use expressions wrapped in double curly braces.

Expression What It Accesses
{{ $json.name }} Direct property from JSON
{{ $json.address.city }} Nested property
{{ $json.tags[0] }} First item in array
{{ $now }} Current date/time

Multiple Items vs. Single Items

An item is a single unit of data. Many nodes can output multiple items at once.

Example:
  • Google Sheets returns 100 rows = 100 items
  • Email trigger receives 5 emails = 5 items
  • API call returns 10 records = 10 items

Each node automatically processes all items it receives.

Building a Multi-Node Workflow

Project: Automated Customer Welcome System

When a customer signs up, automatically add them to CRM, send welcome email, and notify team on Slack.

Workflow Structure

  1. Webhook Trigger - Receives signup data
  2. Set Node - Formats customer data
  3. HTTP Request - Adds customer to CRM
  4. Gmail - Sends welcome email
  5. Slack - Notifies team

Common Node Patterns

Pattern 1: Data Enrichment

Trigger → Get Basic Data → HTTP Request (lookup) → Merge → Store Complete Data

Pattern 2: Conditional Processing

Trigger → IF Node → Branch A (VIP) / Branch B (Standard)

Pattern 3: Batch Processing

Trigger → Get Dataset → Split In Batches → Process Each Batch

Best Practices

Node Design Principles:
  1. Each node should do one thing well
  2. Rename nodes to describe their purpose
  3. Test each node as you add it
  4. Document complex logic with node notes
  5. Reuse patterns across workflows

Troubleshooting

Issue 1: No Data Output

Solution: Check previous node's output. Verify expressions access correct data path.

Issue 2: Expression Not Working

Solution: Use expression editor's autocomplete. Check exact property names.

Issue 3: Node Times Out

Solution: Increase timeout in node options. Check API endpoint status.

Practice Exercises

Exercise 1: Data Transformation

Build a workflow that converts temperatures from Celsius to Fahrenheit.

  • Manual Trigger with sample data
  • Set node to perform calculation
  • Format output with two decimal places
Exercise 2: Multi-Source Collection

Collect data from multiple sources and combine it.

  • Schedule Trigger (daily)
  • Get data from two different APIs
  • Merge results
  • Store in Google Sheets

Key Takeaways

  • Nodes are building blocks categorized as Triggers, Actions, and Logic
  • Data flows left to right through connected nodes in JSON format
  • Expressions allow you to access and manipulate data
  • Nodes process single or multiple items automatically
  • Test each node individually as you build
  • Common patterns solve recurring business problems

Looking Forward

In Chapter 4, we'll dive deeper into expressions and data manipulation. You'll learn advanced techniques for transforming data, working with dates, string operations, and complex data structures.

n8n Textbook | Chapter 3: Understanding Nodes and Data Flow

© 2025 IOLEBA | Dr. Marcus Lee

Originally Published: November 2025