Contributing to n8n
Relevant source files
The following files were used as context for generating this wiki page:
- packages/nodes-base/nodes/Github/Github.node.json
- packages/nodes-base/nodes/Webhook/Webhook.node.json
- packages/nodes-base/nodes/Function/Function.node.json
- packages/nodes-base/nodes/Cron/Cron.node.json
- packages/nodes-base/nodes/HttpRequest/HttpRequest.node.json
- packages/nodes-base/nodes/Merge/Merge.node.json
- packages/nodes-base/nodes/If/If.node.json
- packages/nodes-base/nodes/Slack/Slack.node.json
- packages/nodes-base/nodes/Github/GithubTrigger.node.json
A significant part of contributing to the n8n ecosystem involves creating and enhancing nodes. Each node is defined by a .node.json manifest file that describes its metadata, categorization, and associated documentation. These JSON files are crucial as they dictate how a node is presented and discovered within the n8n user interface, and what resources are available to the user.
This document outlines the structure and key components of the .node.json file, which serves as the blueprint for integrating a new or updated node into n8n. Understanding this structure is essential for any developer looking to contribute nodes that are consistent, discoverable, and well-documented within the platform.
Node Definition Anatomy
The .node.json file is a structured manifest containing several key properties that define a node's identity and behavior within the n8n framework.
This diagram illustrates the primary components of a typical .node.json file.
Core Properties
The following table details the main properties found at the root of a node's JSON definition.
| Property | Description | Example | Source File |
|---|---|---|---|
node | A unique identifier for the node within the n8n instance. | "n8n-nodes-base.github" | Github.node.json:2 |
nodeVersion | The version of the node definition. | "1.0" | Github.node.json:3 |
codexVersion | The version of the Codex system the node is compatible with. | "1.0" | Github.node.json:4 |
details | A descriptive text explaining the node's purpose and functionality. | "The Function node allows you to execute JavaScript..." | Function.node.json:6 |
categories | An array of strings that determine where the node appears in the n8n UI. | ["Development", "Core Nodes"] | Webhook.node.json:5 |
alias | An array of alternative names or keywords to help users find the node. | ["API", "Request", "URL", "Build", "cURL"] | HttpRequest.node.json:101 |
subcategories | An object that provides more granular categorization within a main category. | {"Core Nodes": ["Flow", "Data Transformation"]} | Merge.node.json:29 |
resources | An object containing links to documentation and other helpful materials. | {...} | Github.node.json:6-37 |
Example: Function.node.json
This code snippet shows a complete definition for the Function node, illustrating how these properties are combined.
{
"node": "n8n-nodes-base.function",
"nodeVersion": "1.0",
"codexVersion": "1.0",
"details": "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)",
"categories": ["Development", "Core Nodes"],
"resources": {
"primaryDocumentation": [
{
"url": "https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/"
}
],
"generic": [
...
]
},
"alias": ["Code", "Javascript", "Custom Code", "Script", "cpde"],
"subcategories": {
"Core Nodes": ["Data Transformation"]
}
}
Sources: packages/nodes-base/nodes/Function/Function.node.json:2-93
Node Categorization
Nodes are organized in the n8n UI using categories and subcategories. This system helps users discover nodes by function. A contribution should place a new node in the most logical categories.
The following diagram shows how different nodes are grouped.
Sources: packages/nodes-base/nodes/Github/Github.node.json:5, packages/nodes-base/nodes/Webhook/Webhook.node.json:5, packages/nodes-base/nodes/Function/Function.node.json:7, packages/nodes-base/nodes/HttpRequest/HttpRequest.node.json:5, packages/nodes-base/nodes/Slack/Slack.node.json:5, packages/nodes-base/nodes/Merge/Merge.node.json:5, packages/nodes-base/nodes/If/If.node.json:7
Subcategories provide a second level of organization. For example, the Merge node is in the Core Nodes category, but further refined into Flow and Data Transformation subcategories.
Sources: packages/nodes-base/nodes/Merge/Merge.node.json:28-30
Resources and Documentation
The resources object is critical for user support. It connects users with official documentation, credential setup guides, and community tutorials. Contributing high-quality resources is a valuable way to improve n8n.
Resource Types
| Resource Key | Description |
|---|---|
credentialDocumentation | An array of objects, each with a url pointing to a guide on how to set up credentials for the node's service. |
primaryDocumentation | An array of objects, each with a url pointing to the main documentation page for the node. |
generic | An array of objects, each with a label, icon, and url, linking to blog posts, tutorials, or use-case examples. |
Sources: packages/nodes-base/nodes/Github/Github.node.json:7-36, packages/nodes-base/nodes/Github/GithubTrigger.node.json:7-27
Example: GitHub Node Resources
The Github.node.json file provides a clear example of a well-documented node, including links for credentials, primary docs, and several generic blog posts demonstrating its usage.
"resources": {
"credentialDocumentation": [
{
"url": "https://docs.n8n.io/integrations/builtin/credentials/github/"
}
],
"primaryDocumentation": [
{
"url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.github/"
}
],
"generic": [
{
"label": "How to automatically manage contributions to open-source projects",
"icon": "🏷️",
"url": "https://n8n.io/blog/automation-for-maintainers-of-open-source-projects/"
},
...
]
}
Sources: packages/nodes-base/nodes/Github/Github.node.json:6-37
This structure ensures that users can easily find help directly from the node's information panel in the UI.
Summary
Contributing to n8n by adding or enhancing nodes is governed by the .node.json manifest file. This file is the single source of truth for a node's metadata, its position in the UI, and its associated documentation. By adhering to the structure outlined here, developers can ensure their contributions integrate seamlessly into the n8n platform, providing a consistent and helpful experience for all users. Key areas for contribution include defining clear node properties, selecting appropriate categories, and providing comprehensive links in the resources section.