Close Menu
Content DistilledContent Distilled
  • Tech
    • Ai Gen
    • N8N
    • MCP
  • Javascript
  • Business Ideas
  • Startup Ideas
  • Tech Opinion
  • Blog

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

Turn Any GitHub Repo Into AI Tutorials in 5 Minutes

July 14, 2025

5 New NotebookLM Features That Will Transform Your Learning

July 13, 2025

Build SaaS Image Generator: React, Convex & OpenAI Tutorial

July 12, 2025
Facebook X (Twitter) Instagram
  • Tech
    • Ai Gen
    • N8N
    • MCP
  • Javascript
  • Business Ideas
  • Startup Ideas
  • Tech Opinion
  • Blog
Facebook X (Twitter) Instagram Pinterest
Content DistilledContent Distilled
  • Tech
    • Ai Gen
    • N8N
    • MCP
  • Javascript
  • Business Ideas
  • Startup Ideas
  • Tech Opinion
  • Blog
Content DistilledContent Distilled
Home»Tech»N8N»n8n Tutorial: Understanding Data Types & Node Execution
N8N

n8n Tutorial: Understanding Data Types & Node Execution

PeterBy PeterMay 8, 2025Updated:June 30, 2025No Comments6 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn Pinterest Email

Based on a tutorial by n8n Official

Building workflows in n8n can be challenging if you don’t understand how data moves between nodes. You might be struggling with why your workflows aren’t behaving as expected or why your data isn’t formatted correctly.

I’ve summarized this comprehensive tutorial to help you grasp the essential data concepts in n8n. Understanding these fundamentals will dramatically improve your ability to build reliable, functional workflows.

Quick Navigation

  • Core Data Concepts: JSON & Lists (00:00-05:00)
  • Items & Node Execution (05:01-08:30)
  • Using Expressions in n8n (08:31-12:45)
  • Practical Example: Working with Expressions (12:46-End)

Core Data Concepts: JSON & Lists (00:00-05:00)

To master n8n, you need to understand two primary data structures: JSON objects and lists. These form the foundation of how data flows through your workflows.

Key Points:

  • JSON objects use curly brackets {} and consist of key-value pairs separated by commas
  • Lists use square brackets [] and contain collections of items separated by commas
  • JSON objects can be embedded (nested) within other JSON objects
  • Lists can contain JSON objects, creating a structured data format

Understanding JSON Objects

JSON objects are written between curly brackets and made up of key-value pairs separated by commas. They’re a common way to store and transmit data in web applications.


{
  "first_name": "Emily",
  "last_name": "Johnson",
  "email": "emily@example.com"
}
    

Embedded JSON Objects

JSON objects can contain other JSON objects, allowing for organized complex data structures:


{
  "first_name": "Emily",
  "last_name": "Johnson",
  "email": "emily@example.com",
  "location": {
    "country": "USA",
    "city": "New York"
  }
}
    

To access data from JSON objects, you use dot notation. For example, $json.first_name would return “Emily”, while $json.location.country would return “USA”.

Working with Lists

Lists are collections of objects enclosed in square brackets and separated by commas. They can contain any type of data, including numbers, strings, and JSON objects.


[
  {
    "first_name": "Emily",
    "last_name": "Johnson",
    "email": "emily@example.com"
  },
  {
    "first_name": "Michael",
    "last_name": "Smith",
    "email": "michael@example.com"
  },
  {
    "first_name": "Sarah",
    "last_name": "Williams",
    "email": "sarah@example.com"
  }
]
    

My Take:

Think of JSON objects as individual records in a database, and lists as tables containing multiple records. This mental model will help you understand how n8n processes your data.

Items & Node Execution (05:01-08:30)

In n8n, data is processed as “items” – each item typically being a JSON object within a list. Understanding how nodes interact with these items is crucial for building effective workflows.

Key Points:

  • Nodes in n8n accept and return “items” (lists of JSON objects)
  • Each node executes once per item in the input data (with some exceptions)
  • Even empty outputs must return a list with an empty JSON object
  • The “Execute once” parameter makes a node run only for the first item

Node Execution & Data Flow

When a node receives input, it processes each item separately. For example, if a “Date & Time” node receives three items with different dates, it will execute three times and format each date individually.


// Input to Date & Time node
[
  { "date": "2025-05-08" },
  { "date": "2024-12-25" },
  { "date": "2025-01-01" }
]

// Output after formatting to MM/DD/YYYY
[
  { "date": "2025-05-08", "formattedDate": "05/08/2025" },
  { "date": "2024-12-25", "formattedDate": "12/25/2024" },
  { "date": "2025-01-01", "formattedDate": "01/01/2025" }
]
    

Example Workflow Execution

Let’s examine a simple workflow that reads data from Google Sheets and filters it:

  1. Execute Workflow node returns an empty JSON object in a list [{}]
  2. Google Sheets node executes once and returns three items (three rows from the sheet)
  3. Filter node checks each item against conditions and returns only matching items

My Take:

Visualizing the data flow between nodes will help you troubleshoot workflow issues. Remember that most operations in n8n happen on an item-by-item basis, which explains why some nodes produce unexpected results when you’re not considering this behavior.

Using Expressions in n8n (08:31-12:45)

Expressions allow you to dynamically access and manipulate data in your workflows. They’re enclosed in double curly brackets {{ }} and can reference values from previous nodes.

Key Points:

  • Expressions are enclosed in double curly brackets {{ }}
  • You can drag keys from the table/JSON view to create expressions
  • Expressions reference item values using $json.keyName syntax
  • You can use JavaScript functions within expressions
  • Expressions can combine multiple values and plain text

Creating Expressions

The n8n interface lets you build expressions by dragging keys from the output panel. This creates a reference to that specific data field for each processed item.

Example: Filtering Data with Expressions

If you want to filter items where the first name equals “Emily”, you’d create an expression like:


{{ $json.first_name }} == "Emily"
    

Combining Expressions with Text

Expressions can combine dynamic data with static text. For example, sending a Slack message with personalized content:


{{ $json.first_name }} {{ $json.last_name }} ({{ $json.email }}) just signed up to Acme!
    

This would produce messages like “Emily Johnson (emily@example.com) just signed up to Acme!” for each item in your input data.

My Take:

Expressions are where n8n becomes truly powerful. Take time to practice creating different expressions and see how they evaluate with your data. The ability to combine JavaScript functions with your workflow data opens up endless possibilities.

Practical Example: Working with Expressions (12:46-End)

The tutorial concludes with a practical demonstration of using expressions in the n8n interface with the “Edit Fields” node.

Key Points:

  • The Edit Fields node allows adding or modifying data fields
  • You can create expressions by dragging values from previous nodes
  • JavaScript functions can transform data within expressions
  • Expressions are evaluated individually for each item

Creating a “Full Name” Field

In this example, the tutorial demonstrates creating a new field called “full_name” that combines the first and last name fields:


{{ $json.first_name }} {{ $json.last_name }}
    

Using JavaScript in Expressions

To transform data, you can incorporate JavaScript methods. For example, converting the last name to uppercase:


{{ $json.first_name }} {{ $json.last_name.toUpperCase() }}
    

For example, “Paul Harris” would become “Paul HARRIS” after applying this expression.

My Take:

The Edit Fields node is one of the most useful nodes in n8n for data manipulation. By understanding how to use expressions effectively, you can transform, combine, and restructure your data to fit any downstream requirements.

This article summarizes the excellent tutorial created by n8n Official. If you found this summary helpful, please support the creator by watching the full video and subscribing to their channel.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Peter
  • Website

Related Posts

How to Create Zalo Chatbot with N8N – Complete Tutorial

July 10, 2025

Complete Guide: Installing n8n Automation Platform on Ubuntu VPS

June 30, 2025

Create AI Chatbots Without Code: N8N, Loom & Vercel Guide

May 27, 2025

Deploy Self-Hosted Content Apps with Coolify & Strapi on Vultr

May 24, 2025
Add A Comment
Leave A Reply Cancel Reply

Editors Picks
Top Reviews
Advertisement
Content Distilled
Facebook Instagram Pinterest YouTube
  • Home
  • Tech
  • Buy Now
© 2025 Contentdistilled.com Contentdistilled.

Type above and press Enter to search. Press Esc to cancel.