Nodes & Integrations
Relevant source files
The following files were used as context for generating this wiki page: - [AGENTS.md](https://github.com/internalasuransi/n8n/blob/HEAD/AGENTS.md) - [CONTRIBUTING.md](https://github.com/internalasuransi/n8n/blob/HEAD/CONTRIBUTING.md) - [packages/nodes-base/AGENTS.md](https://github.com/internalasuransi/n8n/blob/HEAD/packages/nodes-base/AGENTS.md) - [packages/node-dev/README.md](https://github.com/internalasuransi/n8n/blob/HEAD/packages/node-dev/README.md) - [packages/@n8n/create-node/README.md](https://github.com/internalasuransi/n8n/blob/HEAD/packages/%40n8n/create-node/README.md) - [packages/frontend/editor-ui/src/features/workflows/templates/utils/samples/tutorial/api_fundamentals.json](https://github.com/internalasuransi/n8n/blob/HEAD/packages/frontend/editor-ui/src/features/workflows/templates/utils/samples/tutorial/api_fundamentals.json) - [packages/nodes-base/nodes/Webhook/Webhook.node.json](https://github.com/internalasuransi/n8n/blob/HEAD/packages/nodes-base/nodes/Webhook/Webhook.node.json) - [packages/@n8n/ai-workflow-builder.ee/src/tools/best-practices/data-analysis.ts](https://github.com/internalasuransi/n8n/blob/HEAD/packages/%40n8n/ai-workflow-builder.ee/src/tools/best-practices/data-analysis.ts) - [packages/@n8n/ai-workflow-builder.ee/src/tools/best-practices/triage.ts](https://github.com/internalasuransi/n8n/blob/HEAD/packages/%40n8n/ai-workflow-builder.ee/src/tools/best-practices/triage.ts) - [packages/@n8n/ai-workflow-builder.ee/src/tools/best-practices/notification.ts](https://github.com/internalasuransi/n8n/blob/HEAD/packages/%40n8n/ai-workflow-builder.ee/src/tools/best-practices/notification.ts) - [packages/@n8n/ai-workflow-builder.ee/src/tools/best-practices/data-transformation.ts](https://github.com/internalasuransi/n8n/blob/HEAD/packages/%40n8n/ai-workflow-builder.ee/src/tools/best-practices/data-transformation.ts)Nodes are the fundamental building blocks of n8n, representing the individual steps and logic within a workflow. They can be triggers that start a workflow, integrations with third-party services, or core helper functions for data manipulation and flow control. The extensible node-based architecture allows for a vast range of automation possibilities.
The majority of built-in nodes are located in the packages/nodes-base directory. n8n also provides a powerful set of tools for creating and sharing custom community nodes, enabling developers to extend the platform's capabilities to any API or service.
Sources: AGENTS.md, CONTRIBUTING.md
Node Architecture
Every node is a class that implements the INodeType interface. This interface defines the node's behavior, its appearance in the editor, and its execution logic. The two most critical components are the node's description and its execution method.
Sources: packages/node-dev/README.md:31-35, packages/nodes-base/AGENTS.md:3-6
The INodeType Interface
The INodeType interface is the contract that all nodes must adhere to. It includes properties for metadata and methods for execution.
This diagram shows the core components of the INodeType interface.
Node Description
The description property, of type INodeTypeDescription, contains all the metadata that n8n uses to display and manage the node in the UI. This includes its name, icon, input/output configuration, and the user-configurable parameters.
A node's metadata is also defined in a .node.json file, which includes categories, documentation links, and aliases for discoverability.
Example Webhook.node.json:
{
"node": "n8n-nodes-base.webhook",
"nodeVersion": "1.0",
"codexVersion": "1.0",
"categories": ["Development", "Core Nodes"],
"resources": {
"primaryDocumentation": [
{
"url": "https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/"
}
]
},
"alias": ["HTTP", "API", "Build", "WH"],
"subcategories": {
"Core Nodes": ["Helpers"]
}
}
Sources: packages/nodes-base/nodes/Webhook/Webhook.node.json, packages/node-dev/README.md:108-123
Node Properties
Node properties define the fields that users can configure in the editor UI. They are defined as an array in the INodeTypeDescription. Each property object has several attributes to control its appearance and behavior.
| Attribute | Description | Type |
|---|---|---|
displayName | The user-facing label for the property in the UI. | string |
name | The internal name used to access the property's value (camelCase). | string |
type | The data type of the property (e.g., string, number, options, collection). | string |
default | The default value for the property. | any |
description | A descriptive text shown to the user in the UI. | string |
placeholder | Placeholder text for input fields. | string |
required | Whether the property must have a value. | boolean |
displayOptions | Defines logic to conditionally show or hide the property based on other values. | object |
options | An array of options for options, collection, or fixedCollection types. | object[] |
typeOptions | Additional options for a specific type, like loadOptionsMethod for dynamic options. | object |
Sources: packages/node-dev/README.md:125-137
Node Types and Execution
The type of a node is determined by the primary execution method it implements. A node must implement exactly one of these methods to define its core logic.
This diagram illustrates the decision process for choosing which execution method to implement based on the desired node behavior.
Regular Nodes
Regular nodes perform actions during a workflow execution. They implement the execute method, which is called once per execution run. This is the most common type of node, used for data transformation, API calls, and logic.
Sources: packages/node-dev/README.md:73-86
Trigger Nodes
Trigger nodes start a workflow. They can be event-driven or scheduled.
- Webhook Triggers: These nodes listen for incoming HTTP requests at a specific URL. They implement the
webhookmethod to handle the request andwebhookMethodsto manage the webhook lifecycle (create, delete) on external services if needed. - Polling Triggers: These nodes periodically check an external service for new data. They implement the
pollmethod and must havepolling: trueset in their description. - Generic Triggers: For other types of triggers that don't fit the webhook or polling model (e.g., connecting to a message queue), the
triggermethod is implemented.
Sources: packages/nodes-base/AGENTS.md:13-20, packages/node-dev/README.md:88-99
Core Node Usage Patterns
n8n provides a rich set of built-in nodes for various tasks. Best practice documents recommend specific nodes and patterns for common use cases like data analysis, triage, and notifications.
The following diagram shows a simple API interaction workflow, demonstrating how different core nodes work together.
This workflow illustrates a client (HTTP Request) making a request to a server (Webhook), which then uses an IF node to make a decision and a Set node to prepare the final response.
Key Node Categories and Examples
| Category | Node Name | Node Identifier | Purpose |
|---|---|---|---|
| Triggers | Webhook | n8n-nodes-base.webhook | Capture incoming items for triage via HTTP requests. |
| Schedule | n8n-nodes-base.scheduleTrigger | Trigger workflows on a time-based interval (e.g., Cron). | |
| Data | HTTP Request | n8n-nodes-base.httpRequest | Fetch datasets from URLs or REST APIs. |
| GraphQL | n8n-nodes-base.graphql | Query GraphQL APIs. | |
| Spreadsheet File | n8n-nodes-base.spreadsheetFile | Parse CSV/Excel files into JSON items. | |
| MongoDb | n8n-nodes-base.mongoDb | Query and manipulate data in a MongoDB database. | |
| Transformation | Edit Fields (Set) | n8n-nodes-base.set | Create, modify, rename, or convert fields. |
| Merge | n8n-nodes-base.merge | Combine data from multiple streams by key or index. | |
| Split In Batches | n8n-nodes-base.splitInBatches | Process large datasets in chunks to prevent memory overload. | |
| HTML | n8n-nodes-base.html | Generate formatted reports with tables and styling. | |
| Logic & Flow | IF | n8n-nodes-base.if | Branch workflow based on binary conditions. |
| Switch | n8n-nodes-base.switch | Multi-way branching based on a field's value. | |
| Communication | Slack | n8n-nodes-base.slack | Send notifications and messages to Slack channels or users. |
| Send Email | n8n-nodes-base.emailSend | Send emails via SMTP. |
Sources: packages/@n8n/ai-workflow-builder.ee/src/tools/best-practices/data-analysis.ts, packages/@n8n/ai-workflow-builder.ee/src/tools/best-practices/triage.ts, packages/@n8n/ai-workflow-builder.ee/src/tools/best-practices/notification.ts, packages/nodes-base/nodes/Webhook/Webhook.node.json, packages/nodes-base/nodes/Merge/Merge.node.json, packages/nodes-base/nodes/Slack/Slack.node.json, packages/nodes-base/nodes/MongoDb/MongoDb.node.json, packages/nodes-base/nodes/GraphQL/GraphQL.node.json, packages/nodes-base/nodes/HtmlExtract/HtmlExtract.node.json
Node Development
n8n provides command-line tools to scaffold, build, and test custom nodes, simplifying the development process.
Development Workflow
The typical workflow for creating a new node involves scaffolding, development with hot-reload, building, and publishing.
This flowchart outlines the steps for creating and publishing a new n8n node.
Sources: packages/@n8n/create-node/README.md
Scaffolding with @n8n/create-node
The recommended way to create a new community node is with the @n8n/create-node package. It provides an interactive CLI to generate a new node project with best practices built-in.
# Start the interactive scaffolding process
npm create @n8n/node@latest
This command generates a project with the following structure, including pre-configured scripts for development, building, and linting.
my-awesome-api-node/
├── src/
│ ├── nodes/
│ │ └── MyAwesomeApi/
│ │ ├── MyAwesomeApi.node.ts # Main node logic
│ │ └── MyAwesomeApi.node.json # Node metadata
│ └── credentials/
│ └── MyAwesomeApiAuth.credentials.ts
├── package.json
├── tsconfig.json
└── README.md
Sources: packages/@n8n/create-node/README.md
Legacy Development with n8n-node-dev
For development within the main n8n repository, the n8n-node-dev tool is used. It provides commands to create new node skeletons and to build and watch files, copying them to the correct directory for testing.
n8n-node-dev new: Creates a new basic node or credential file.n8n-node-dev build: Builds and copies node files to~/.n8n/custom/. The--watchflag enables automatic rebuilding on file changes.
Sources: packages/node-dev/README.md:18-28
Conclusion
Nodes are the heart of n8n's functionality and extensibility. They are defined by a clear INodeType interface, with their behavior determined by the specific execution method they implement. The system supports regular action nodes, various trigger types, and a distinction between declarative and programmatic logic. With a rich library of core nodes and robust development tools like @n8n/create-node, developers can both leverage existing integrations and easily create new ones, making the platform adaptable to any automation challenge.