Lesson 3 of 6·10 min read

Workflow Fundamentals

An n8n workflow consists of nodes connected by connections. Each node performs a specific action — fetch data, transform, send, or branch. In this lesson, you'll learn the core concepts.

Nodes — The Building Blocks

Nodes are the basic units of every workflow. There are three main categories:

Trigger Nodes

Start the workflow. Without a trigger, nothing happens.

TriggerDescriptionUse Case
WebhookReceive HTTP requestAPI endpoint, Slack command
ScheduleTime-based (Cron)Daily report, hourly monitoring
Email TriggerReceive new emailInbox automation
Kafka/RabbitMQMessage queue eventEvent-driven architecture

Action Nodes

Perform the actual work:

  • HTTP Request: Call any API
  • Database nodes: Query PostgreSQL, MySQL, MongoDB
  • App nodes: Slack, Google Sheets, HubSpot, Jira, etc.
  • Code node: Execute JavaScript or Python
  • AI nodes: LLM calls, embeddings, text classification

Logic Nodes (Flow Control)

Control the workflow flow:

  • IF: Conditional branching
  • Switch: Multiple branching
  • Merge: Combine data
  • Loop Over Items: Iterate over lists
  • Wait: Time delay or wait for event

Connections and Data Flow

Nodes are connected by connections. Data flows as items — JSON objects passed from node to node:

[
  { "json": { "name": "Max Mueller", "email": "max@company.com", "score": 85 } },
  { "json": { "name": "Anna Schmidt", "email": "anna@company.com", "score": 42 } }
]

Each node receives items, processes them, and outputs new items.

Expressions — Dynamic Values

Expressions allow access to data from previous nodes:

{{ $json.name }}                    → Current item value
{{ $('HTTP Request').item.json.id }} → Value from a specific node
{{ $now.toISO() }}                  → Current timestamp
{{ $json.score > 70 ? 'Good' : 'Bad' }} → Conditional logic

Error Handling

Robust workflows need error handling. n8n offers three approaches:

1. Error Trigger Workflow

A separate workflow triggered on errors in other workflows — ideal for centralized alerting (Slack, email).

2. Retry on Fail

Nodes can automatically retry on failure:

  • Retry Count: Number of attempts (e.g., 3)
  • Wait Between: Wait time between attempts (e.g., 5 seconds)

3. Continue on Fail

The workflow continues even if a node fails. The error is passed as output and can be handled in the next node.

Execution Modes

ModeDescriptionUse
ManualExecute workflow by clickDevelopment, testing
ActiveWorkflow responds to triggersProduction
QueueExecutions distributed to workersHigh load, scaling

Practical tip: Enable error handling from the start. Create a central error workflow that reports failures to Slack or via email. This way, you'll know immediately when a production workflow fails.