🏠 Home / Hub

n8n 01 — Intro & Setup

Welcome to the n8n automation course. This lesson covers what n8n is, how to set it up, and the core concepts you need before building your first workflow.

1. What is n8n?

n8n (pronounced "n-eight-n") is an open-source, node-based workflow automation platform. It lets you connect apps, services, and APIs through a visual drag-and-drop editor — no code required for simple flows, but full JavaScript power when you need it.

2. Use Cases

n8n excels when you want code-level flexibility without building a full microservice. It sits between Zapier (simpler) and custom code (more work).

3. Setup Options

Option A — n8n Cloud (easiest)

Visit n8n.io, sign up, get a hosted instance instantly. Free trial available.

Option B — Local via npm

npm install n8n -g
n8n
# Opens at http://localhost:5678

Option C — Docker (recommended for self-hosting)

docker run -it --rm \
  --name n8n \
  -p 5678:5678 \
  -v ~/.n8n:/home/node/.n8n \
  n8nio/n8n

Option D — Docker Compose (production)

version: '3.8'
services:
  n8n:
    image: n8nio/n8n
    ports:
      - "5678:5678"
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_DATABASE=n8n
      - N8N_ENCRYPTION_KEY=your-secret-key
    volumes:
      - n8n_data:/home/node/.n8n
  postgres:
    image: postgres:15
    environment:
      - POSTGRES_DB=n8n
      - POSTGRES_PASSWORD=secret
Use Docker Compose with Postgres for production. The SQLite default is fine for testing only.

4. Main UI Concepts

After adding a node, click it to open its parameters panel on the right. All configuration happens there. Use the expression editor (lightning bolt icon) to reference dynamic data.

5. Core Concepts

ConceptDescriptionExample
WorkflowA chain of connected nodes automating a task"New lead → CRM → Email"
TriggerThe starting node — what kicks off the workflowWebhook, Schedule, App Event
NodeA single step: action, transformation, or decisionHTTP Request, IF, Set, Gmail
ItemA single data object flowing through the workflow{ json: { name: "Alice" } }
CredentialStored, encrypted authentication for a serviceGoogle OAuth, Slack token
ExecutionOne complete run of a workflowRun at 09:00, status: success

6. First Workflow: Manual → Set → IF → HTTP

  1. Manual Trigger — Add via "+" → search "Manual Trigger". Runs by clicking a button.
  2. Set Node — Adds/transforms fields. Set name = "Alice" and score = 85.
  3. IF Node — Condition: score >= 70. True branch passes, False takes a different path.
  4. HTTP Request Node — On the True branch, GET https://httpbin.org/get.
Manual Trigger
   └─► Set { name: "Alice", score: 85 }
         └─► IF score >= 70
               ├─ TRUE  ─► HTTP GET https://httpbin.org/get
               └─ FALSE ─► (end or another node)
Click "Execute Workflow" (play button) to run. Click any node after execution to inspect what data it received and output.

7. Canvas Tips

📌 Study Checklist