| .devcontainer | ||
| .vscode | ||
| credentials | ||
| nodes | ||
| .editorconfig | ||
| .eslintrc.js | ||
| .eslintrc.prepublish.js | ||
| .gitignore | ||
| .npmignore | ||
| .prettierrc.js | ||
| CODE_OF_CONDUCT.md | ||
| gulpfile.js | ||
| index.js | ||
| LICENSE.md | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| README_TEMPLATE.md | ||
| start-n8n-with-custom-node.sh | ||
| tsconfig.json | ||
n8n-nodes-starter
This repo is a template to start building your own custom integrations for n8n.
It contains instructions for how to develop your own custom nodes, as well as publishing them so others in the n8n community can use them.
For a comprehensive guide on creating your nodes, see this page in the documentation.
Getting started
First, you'll need to make your own copy of this repo:
- Generate a new repository from this template repository.
- Install git, if you don't have it already
- Clone this repo to your local machine:
git clone https://github.com/<your organization>/<your-repo-name>.git
Second, you'll need to prepare your environment to develop on the nodes in this repository. This means:
- Installing
npm - Building the nodes in this repository
- Getting a running n8n instance
- Linking your nodes into the running n8n instance
You can do this in one of two ways:
Option 1: Use the devcontainer (recommended)
This repo has a VSCode devcontainer spec with all the tooling you need to work on your custom nodes in a Docker container sandbox.
To use:
- Install Docker and start it
- Install VSCode
- Install the VSCode Dev Containers extension
- Open your local clone of this repository
- Choose "Reopen in Container" when the popup appears saying, "Folder contains a Dev Container configuration file. Reopen folder to develop in a container?"
- Wait for the container to build and open
- Visit localhost:5678 to open the n8n instance running inside the devcontainer
- In a workflow, for "Example Node" to ensure that the nodes in this repo are being picked up properly
Option 2: Bring your own environment
You can also bring your own environment.
To start, you'll need to follow this guide for setting up your local n8n development environment.
Then you'll need to link your node into your running n8n instance using these steps.
After restarting n8n, you should be able to search for "Example Node" to ensure that the nodes in this repo are being picked up properly.
Development
Development means modifying the examples in /nodes and /credentials, and restarting the n8n server to pick up the changes (n8n doesn't have live reload).
NOTE: you can use npm run lint to check for linting errors, and npm run lintfix to try and automatically fix errors.
Devcontainer
- Make your changes
- Quit the terminal process in VSCode running the n8n server
- Run
start-n8n-with-custom-node.sh - Repeat
Your own environment
- Make your changes
- Quit the n8n process (however you started it)
- Restart it
- Repeat
Publishing
When you're ready to share your nodes with the community, do the following:
- Update the following fields in
package.jsonto match your details:namedescriptionversiondescriptionrepositoryhomepageauthor.nameauthor.email
- Replace this README with documentation for your node. Use the README_TEMPLATE to get started.
- Update the LICENSE file to contain your own name at the top.
- Publish your package to npm.
