4️⃣

4. How does n8n handle data?

Understanding JSON and lists is essential to building effective workflows in n8n.

Understanding n8n's data structures: JSON and lists

📊 In the fourth video of the n8n beginner course , we look at how data is transferred between data nodes and the nodes , highlighting the importance of these concepts for creating effective workflows.
🔑 The two main data structures are JSON, which consists of key-value pairs enclosed in curly brackets, and lists, which are collections of objects enclosed in square brackets .
🔄 JSON can be embedded within other JSON, allowing for complex data structures, such as grouping individual location information in this example .
📅 Each node processes the input data one item at a time and is executed once per item, which is very important for building workflows. For example, the Date Formatting node reads and returns a formatted date for each input item .
📈 When working with JSON lists, each JSON corresponds to a row in a table , with keys acting as column headers, making it easier to visualize the data structure.
🛠️ Nodes use expressions to filter and manipulate data, so they can be configured dynamically based on input, such as only allowing items with a certain name to pass through .
💻 This video also shows how to use JavaScript within expressions to modify data types, such as converting the last name to uppercase in a first name field .
🔍 At the end of this session, I encourage viewers to revisit this video and review the explanations of items, lists, and JSON , as familiarizing themselves with these concepts is essential to building effective workflows in n8n.
LiveWiki, the key content on YouTube in 10 seconds! - https://livewiki.com/ko/content/n8n-beginner-course-data-handling
This video explains the types of data used in nodes and how data is passed between nodes.
Describes two main data structures: JSON and lists.
JSON is a data format written in curly brackets and consisting of key-value pairs, while a list is a collection of objects written in square brackets.
JSON can be nested, making it useful for structuring complex data.
An example explanation of JSON and lists.
Explains how to access data using JSON's dot notation.
Lists can contain JSON and can be used in a similar way to table format.
Explaining the correlation between JSON and tables: One JSON corresponds to one row in a table.
In n8n, data is processed in the form of items, and nodes use item lists as input and output.
A node processes each item one by one, executing once for each item.
Example: A node that formats dates and times processes each input entry and returns the formatted result.
Describes how nodes process data.
It may also return an empty JSON while running, as illustrated by an example of reading data from a Google Sheet.
Describes the process of using a filter node to select only items that satisfy a condition.
When setting a filter, you can use expressions to filter based on specific conditions.
How to use expressions: You can use specific key values in JSON data as filter conditions.
As an example, how to filter only items with the name "Emily" in the first item.
You can use JavaScript functions or methods in expressions, combine multiple expressions, or add plain text.
Example: How to send a message to Slack that combines a name and email.
A practical example of using expressions in n8n.
Shows how to set up a node that combines the first and last name to create a full name.
Added example of a JavaScript function that converts the last name to uppercase.
To conclude the video, he teases that in the next video, he will be building an actual workflow.
It is important to review and understand the concepts of data structures, items, JSON, and lists.