Scaling n8n
Relevant source files
The following files were used as context for generating this wiki page:
- packages/nodes-base/nodes/Start/Start.node.json
- packages/nodes-base/nodes/HttpRequest/HttpRequest.node.json
- packages/nodes-base/nodes/Webhook/Webhook.node.json
- packages/nodes-base/nodes/Function/Function.node.json
- packages/nodes-base/nodes/Set/Set.node.json
- packages/nodes-base/nodes/If/If.node.json
- packages/nodes-base/nodes/Merge/Merge.node.json
- packages/nodes-base/nodes/Cron/Cron.node.json
- packages/nodes-base/nodes/NoOp/NoOp.node.json
- packages/frontend/editor-ui/src/constants.ts
- packages/nodes-base/nodes/CompareDatasets/CompareDatasets.node.json
- packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.json
Core Nodes are the fundamental building blocks for creating workflows in n8n. They provide essential, general-purpose functionality that underpins almost every automation. These nodes are not tied to a specific third-party service but instead offer capabilities for controlling execution flow, manipulating data, and interacting with web services.
These nodes are defined within the n8n-nodes-base package and are grouped under the Core Nodes category in the node creator. They are organized into logical subcategories such as Flow, Data Transformation, and Helpers, which reflect their primary purpose within a workflow.
Sources: packages/frontend/editor-ui/src/constants.ts:311, packages/nodes-base/nodes/Start/Start.node.json:4, packages/nodes-base/nodes/If/If.node.json:20
Core Node Categories
The following diagram illustrates the primary subcategories of Core Nodes, which help organize their functionality.
This categorization is derived from the subcategories property defined in each node's JSON configuration file.
Sources: packages/nodes-base/nodes/If/If.node.json:21, packages/nodes-base/nodes/Set/Set.node.json:80, packages/nodes-base/nodes/HttpRequest/HttpRequest.node.json:96
Flow Control Nodes
Flow Control nodes are used to direct the execution path of a workflow. They manage how and when other nodes are executed, enabling conditional logic, branching, merging, and scheduling.
The diagram below shows a typical workflow pattern using Flow Control nodes. A Cron node triggers the workflow on a schedule, an If node splits the execution based on a condition, and a Merge node rejoins the execution paths.
This demonstrates how to create dynamic and conditional workflows.
Key Flow Control Nodes
| Node Name | Node Type ID | Primary Function | Aliases |
|---|---|---|---|
| If | n8n-nodes-base.if | Implements binary conditional logic, routing data to a true or false output. | Router, Filter, Condition, Logic, Boolean, Branch |
| Merge | n8n-nodes-base.merge | Joins data from two or more separate execution branches into a single stream. | Join, Concatenate, Wait |
| Cron | n8n-nodes-base.cron | Triggers a workflow at specific times or intervals using cron syntax. | Time, Scheduler, Polling, Interval |
| Start | n8n-nodes-base.start | The default starting point for any new workflow. It executes only once when a workflow is started manually. | |
| Compare Datasets | n8n-nodes-base.compareDatasets | Compares two datasets to find matching or non-matching items, useful for data synchronization tasks. | Join, Compare, Dataset, Split, Sync |
Sources: packages/nodes-base/nodes/If/If.node.json, packages/nodes-base/nodes/Merge/Merge.node.json, packages/nodes-base/nodes/Cron/Cron.node.json, packages/nodes-base/nodes/Start/Start.node.json, packages/nodes-base/nodes/CompareDatasets/CompareDatasets.node.json
Data Transformation Nodes
These nodes are designed to modify, reformat, or create new data within a workflow. They are essential for preparing data for subsequent nodes or for generating the final desired output.
Key Data Transformation Nodes
| Node Name | Node Type ID | Primary Function | Aliases |
|---|---|---|---|
| Set | n8n-nodes-base.set | Sets or modifies values on items. It can be used to add new fields, change existing ones, or keep only a subset of fields. | Set, JS, JSON, Filter, Transform, Map |
| Function | n8n-nodes-base.function | Executes custom JavaScript code to perform complex data manipulations, allowing for iteration and custom logic beyond what other nodes offer. | Code, Javascript, Custom Code, Script |
| HTML Extract | n8n-nodes-base.htmlExtract | Extracts data from HTML using CSS selectors. Useful for web scraping. |
Sources: packages/nodes-base/nodes/Set/Set.node.json, packages/nodes-base/nodes/Function/Function.node.json, packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.json
The Function node is particularly powerful, as described in its configuration:
The Function node allows you to execute JavaScript in your workflow. Unlike the Function Item node, this node does not operate on incoming node data per-item. Instead, you must iterate over multiple items of incoming data yourself. This can be useful if you're performing data transformation where you want to manipulate the number of items being outputted by the node (i.e. 1 item is inputted in with nested object, 10 items are outputted without any nested objects)
Source: packages/nodes-base/nodes/Function/Function.node.json:5-5
Helper and Utility Nodes
Helper nodes provide essential, generic functionality that is frequently required in workflows, such as making API calls or performing no action at all.
Key Helper Nodes
| Node Name | Node Type ID | Primary Function | Aliases |
|---|---|---|---|
| HTTP Request | n8n-nodes-base.httpRequest | Makes HTTP requests to any URL, allowing interaction with any REST API. | API, Request, URL, Build, cURL |
| Webhook | n8n-nodes-base.webhook | Creates a unique URL to receive data from external services, acting as a trigger. | HTTP, API, Build, WH |
| NoOp | n8n-nodes-base.noOp | "No Operation". This node does nothing and simply passes data through. It's useful for organizing workflows or as a placeholder. | nothing |
Sources: packages/nodes-base/nodes/HttpRequest/HttpRequest.node.json, packages/nodes-base/nodes/Webhook/Webhook.node.json, packages/nodes-base/nodes/NoOp/NoOp.node.json
Node Definition Example
The behavior and metadata of each node are defined in a .node.json file. This file specifies the node's name, categories, documentation links, and other UI-related properties. Below is a snippet from the HttpRequest.node.json file.
{
"node": "n8n-nodes-base.httpRequest",
"nodeVersion": "1.0",
"codexVersion": "1.0",
"categories": ["Development", "Core Nodes"],
"resources": {
"primaryDocumentation": [
{
"url": "https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/"
}
]
},
"alias": ["API", "Request", "URL", "Build", "cURL"],
"subcategories": {
"Core Nodes": ["Helpers"]
}
}
Source: packages/nodes-base/nodes/HttpRequest/HttpRequest.node.json:1-21
Summary
Core Nodes are the indispensable toolkit for any n8n user. They provide the foundational logic for workflow execution, data handling, and basic connectivity. By combining Flow Control, Data Transformation, and Helper nodes, developers can construct sophisticated and robust automations tailored to any need, forming the backbone of the n8n platform.