Basic knowledge of n8n: Nodes, triggers, and data flow.

Master the building blocks of n8n—triggers, nodes, connections, expressions, and credentials. Build your first working data process.

Before delving into any AI nodes, you need to understand how n8n works. Every AI process you build in this series—from the email classification tool to the RAG chatbot—runs on the same foundation: triggers, nodes, connections, and expressions. Mastering this will make the AI ​​section in Lesson 3 immediately understandable.

What is n8n? What is its purpose?

n8n connects the applications and systems you've been using.

Each connection is called a node, and each node performs an action. You can combine multiple nodes into an automated workflow.

For example, you could create a workflow where submitting a new form in Typeform triggers a Slack message and stores the data in Google Sheets. Then, you could add logic to only send emails if certain conditions are met.

Images 1 of Basic knowledge of n8n: Nodes, triggers, and data flow.

This approach allows anyone to build automation intuitively, while remaining developer-friendly. You can use JavaScript or Python inside the workflow for custom logic, import npm packages, or connect to any API that doesn't already have Node built-in.

This platform supports over 400 integrations right from the start, from GitHub and AWS to OpenAI and Telegram. This large library of ready-to-use nodes means you can connect most of the tools you use daily without having to write any code.

The open-source nature of n8n is what makes it stand out.

Most automation tools like Zapier are closed systems, hiding their inner workings. With n8n, the source code is public. You can host it on your own server, edit it, and test how everything works.

This is important for both privacy and flexibility.

When you self-host n8n, your data never leaves your environment. This is especially useful for industries like finance, healthcare, and security, where sensitive data must be kept confidential. Teams can build automated processes without sending information through third-party servers.

Being open source also means you're never tied to a single provider. You can add your own nodes, extend the platform, or even contribute back to the community.

Fair source code licensing ensures that while the project remains sustainable for the developers who maintain it, it remains accessible to anyone who wants to use or modify it.

The core concepts of n8n

N8n processes are visual processes. Data enters through a trigger, flows through nodes to transform or route it, and exits through an action (sending an email, updating a database, returning a response). Think of it as a real-world flowchart in action.

There are four key concepts you need to understand:

1. Triggers - The "moment" of your workflow. Several elements are needed to start the process:

  • Enable Webhook - triggers when an external service accesses the URL.
  • Scheduled activation - cron scheduled activation (every hour, every Monday at 9 AM)
  • Application triggers - Gmail Trigger, Slack Trigger, etc. - are triggered when an event occurs within that application.
  • Chat trigger - activates when a user sends a message (essential for AI chatbots)
  • Manual activation - activate when you click "Test workflow" to develop.

2. Nodes - the "what" in your workflow. Each node performs a task:

  • Application nodes - interact with services (Gmail, Slack, Notion, Google Sheets)
  • AI nodes - LLM chains, agents, memory, vector repositories (over 70 types)
  • Logical nodes - IF, Switch, Merge, Split, Loop
  • Transform nodes - Set, Code, Function, Date & Time

3. Connections - Links between nodes. Data flows through them. The output of one node becomes the input of the next node.

4. Expressions - Dynamic values ​​use the syntax {{ }}. Instead of hardcoding "Hello World", you write {{ $json.userName }}to get the actual username from the data being processed.

Quick test : A workflow needs to send a Slack message whenever a new row appears in Google Sheets. Which trigger would you use?

Answer : Google Sheets Trigger - it tracks new rows and triggers when a row is added. Schedule Trigger also works but is less efficient because it polls at intervals instead of reacting to events.

How data flows

Each node receives items, processes them, and forwards them. An "item" is simply a JSON object. If the Gmail Trigger is triggered for 3 new emails, the next node will receive 3 items—and process each one individually.

This is the outline of a simple process:

Gmail Trigger → IF node → Send Slack Message ↓ ↓ (true branch) 3 emails "Is subject = 'urgent'?" → Slack: "Urgent email from {{$json.from}}" ↓ (false branch) Do nothing (or different action)

The IF node splits the flow. Items that match the condition go in one direction; the rest go in the other. This is how all decisions work in n8n—and it's the foundation for AI-powered routing in lesson 3.

Build your first process.

Let's build a simple process to practice these concepts. Open your n8n instance and follow these steps:

Step 1 : Create a new process

Click on "Add workflow" in the upper right corner. Name it "My First Pipeline".

Step 2: Add a manual trigger.

Click the "+" button and search for "Manual Trigger". This allows you to run a process by clicking a button - perfect for testing.

Step 3: Add the Set node

Click the "+" button again to add the "Set" node. This node allows you to manually define the data. Configure it as follows:

  • Add a string field: name = greeting, value =Hello from n8n!
  • Add a numeric field: name = count, value =42

Connect the Manual Trigger to the Set node.

Step 4: Add the IF node

Add the IF node after the Set node. Configure the condition:

  • Value 1:{{ $json.count }}
  • Operation: "Is Greater Than"
  • Value 2:10

Step 5: Check

Click on "Test workflow". Observe the data flow through each node. Click on any node to see its input and output in the right-hand panel.

You've just built a process for generating data, evaluating conditions, and routing results. Every AI workflow in this series follows the same model—the only difference is the AI ​​nodes that generate the data and make decisions.

Expression: Connect

Expressions are how you reference dynamic data. The syntax is as follows, {{ }}with the following main variables:

For example: If Gmail Trigger outputs this JSON:

{ "from": { "value": [{ "address": "sarah@example.com" }] }, "subject": "Q2 Report", "date": "2026-03-05T10:30:00Z" } 

To get the sender's email address: {{ $json.from.value[0].address }}To get the subject line:{{ $json.subject }}

You don't need to remember the path. Click on the output table of any node, hover over a field, and n8n will show you the expression to copy.

Quick test : You want to include an email subject line in a Slack message. How would you write the expression?

Answer : {{ $json.subject }}- refers to the header field from the current item's JSON data. You can also drag and drop from the output table directly into the Slack node's message field.

Authentication information: Connecting to external services

Most useful workflows require authentication information—API keys, OAuth tokens, or login credentials for external services. n8n manages this information securely:

  1. Go to Settings → Credentials in your n8n version.
  2. Click on Add Credential and select a service (OpenAI, Gmail, Slack, etc.)
  3. Follow the setup instructions - for OAuth services like Gmail, n8n will handle the authentication process.
  4. After saving, select the credentials in any node that requires them.

Important note for this course : Set up your OpenAI credentials now. Go to Settings → Credentials → Add Credential → OpenAI . Paste your API key. You will use this credential in all AI lessons starting from lesson 3.

Never hardcode API keys in expressions or code nodes. Always use the n8n authentication system—it encrypts keys when stored and keeps them separate from the JSON files that output your workflow.

Key points to remember

  • The workflow begins with an agent triggering an event and proceeds through nodes (processes).
  • Data is transmitted as JSON items - each node receives these items, processes them, and forwards them.
  • Expressions ({{ $json.field }})allow you to dynamically reference data between nodes.
  • IF nodes and switches route data based on conditions—the foundation for intelligent workflows.
  • Always use the n8n authentication system for API keys - never hardcode them.
  • Question 1:

    Your workflow needs to function differently based on the email subject line. Which node should you use?

    EXPLAIN:

    The IF node is the decision-making part of n8n. You set a condition (e.g., header contains the word 'urgent'), and items that match the condition go down the 'true' branch while others go down the 'false' branch. The Switch node handles multiple conditions (3+ branches). You could use the Code node, but it's too complex for simple routing.

  • Question 2:

    You need to extract the sender's email address from the output of the Gmail trigger node. What expression syntax does n8n use?

    EXPLAIN:

    n8n uses double curly braces {{ }} with dot notation for expressions. The variable `$json` references the data of the current item. Both dot syntax and square bracket syntax work inside curly braces, but dot syntax (option A) is standard. The key skill is reading the JSON output table to find the correct path.

  • Question 3:

    What is the difference between an activated node and a regular node in n8n?

    EXPLAIN:

    Trigger nodes listen for events (new emails, webhook accesses, scheduled times, chat messages). They are always the first node in a workflow. Regular nodes perform processing—translating data, calling APIs, making decisions. A workflow without trigger nodes can only run manually.

Close
Category

System

Windows XP

Windows Server 2012

Windows 8

Windows 7

Windows 10

Wifi tips

Virus Removal - Spyware

Speed ​​up the computer

Server

Security solution

Mail Server

LAN - WAN

Ghost - Install Win

Fix computer error

Configure Router Switch

Computer wallpaper

Computer security

Mac OS X

Mac OS System software

Mac OS Security

Mac OS Office application

Mac OS Email Management

Mac OS Data - File

Mac hardware

Hardware

USB - Flash Drive

Speaker headset

Printer

PC hardware

Network equipment

Laptop hardware

Computer components

Advice Computer

Game

PC game

Online game

Mobile Game

Pokemon GO

information

Technology story

Technology comments

Quiz technology

New technology

British talent technology

Attack the network

Artificial intelligence

Technology

Smart watches

Raspberry Pi

Linux

Camera

Basic knowledge

Banking services

SEO tips

Science

Strange story

Space Science

Scientific invention

Science Story

Science photo

Science and technology

Medicine

Health Care

Fun science

Environment

Discover science

Discover nature

Archeology

Life

Travel Experience

Tips

Raise up child

Make up

Life skills

Home Care

Entertainment

DIY Handmade

Cuisine

Christmas

Application

Web Email

Website - Blog

Web browser

Support Download - Upload

Software conversion

Social Network

Simulator software

Online payment

Office information

Music Software

Map and Positioning

Installation - Uninstall

Graphic design

Free - Discount

Email reader

Edit video

Edit photo

Compress and Decompress

Chat, Text, Call

Archive - Share

Electric

Water heater

Washing machine

Television

Machine tool

Fridge

Fans

Air conditioning

Program

Unix and Linux

SQL Server

SQL

Python

Programming C

PHP

NodeJS

MongoDB

jQuery

JavaScript

HTTP

HTML

Git

Database

Data structure and algorithm

CSS and CSS3

C ++

C #

AngularJS

Mobile

Wallpapers and Ringtones

Tricks application

Take and process photos

Storage - Sync

Security and Virus Removal

Personalized

Online Social Network

Map

Manage and edit Video

Data

Chat - Call - Text

Browser and Add-on

Basic setup