Example starter module for custom n8n nodes.
https://github.com/n8n-io/n8n-nodes-starter.git
This starter repository helps you build custom integrations for n8n. It includes example nodes, credentials, the node linter, and all the tooling you need to get started.
[!TIP]
New to building n8n nodes? The fastest way to get started is withnpm create @n8n/node. This command scaffolds a complete node package for you using the @n8n/node-cli.
To create a new node package from scratch:
npm create @n8n/node
Already using this starter? Start developing with:
npm run dev
This starts n8n with your nodes loaded and hot reload enabled.
This starter repository includes two example nodes to learn from:
execute method[!TIP]
The declarative/low-code style (used in GitHub Issues) is the recommended approach for building nodes that interact with HTTP APIs. It significantly reduces boilerplate code and handles requests automatically.
Browse these examples to understand both approaches, then modify them or create your own.
Looking for more examples? Check out these resources:
n8n-community-node-package tagBefore you begin, install the following on your development machine:
[!NOTE]
The@n8n/node-cliis included as a dev dependency and will be installed automatically when you runnpm install. The CLI includes n8n for local development, so you don't need to install n8n globally.
Follow these steps to create your own n8n community node package:
Generate a new repository from this template, then clone it:
git clone https://github.com/<your-organization>/<your-repo-name>.git
cd <your-repo-name>
npm install
This installs all required dependencies including the @n8n/node-cli.
Browse the example nodes in nodes/ and credentials/ to understand the structure:
Edit the example nodes to fit your use case, or create new node files by copying the structure from nodes/Example/.
[!TIP]
If you want to scaffold a completely new node package, usenpm create @n8n/nodeto start fresh with the CLI's interactive generator.
Update package.json with your details:
name - Your package name (must start with n8n-nodes-)author - Your name and emailrepository - Your repository URLdescription - What your node doesn8n.nodes array.
Start n8n with your node loaded:
npm run dev
This command runs n8n-node dev which:
[!NOTE]
Learn more about CLI commands in the @n8n/node-cli documentation.
Check for errors:
npm run lint
Auto-fix issues when possible:
npm run lint:fix
When ready to publish:
npm run build
This compiles your TypeScript code to the dist/ folder.
Before publishing:
Publish your package to make it available to the n8n community:
npm publish
Learn more about publishing to npm.
Get your node verified for n8n Cloud:
This starter includes several npm scripts to streamline development:
| Script | Description |
|---|---|
npm run dev | Start n8n with your node and watch for changes (runs n8n-node dev) |
npm run build | Compile TypeScript to JavaScript for production (runs n8n-node build) |
npm run build:watch | Build in watch mode (auto-rebuild on changes) |
npm run lint | Check your code for errors and style issues (runs n8n-node lint) |
npm run lint:fix | Automatically fix linting issues when possible (runs n8n-node lint --fix) |
npm run release | Create a new release (runs n8n-node release) |
[!TIP]
These scripts use the @n8n/node-cli under the hood. You can also run CLI commands directly, e.g.,npx n8n-node dev.
npm install to install dependenciespackage.json under n8n.nodesnpm run devRun npm run lint:fix to automatically fix most common issues. For remaining errors, check the n8n node development guidelines.
Make sure you're using Node.js v22 or higher and have run npm install to get all type definitions.
Have suggestions for improving this starter? Open an issue or submit a pull request!