This repo contains example nodes to help you get started building your own custom integrations for n8n. It includes the node linter and other dependencies.
To make your custom node available to the community, you must create it as an npm package, and submit it to the npm registry.
You need the following installed on your development machine:
- git
- Node.js and npm. Minimum version Node 16. You can find instructions on how to install both using nvm (Node Version Manager) for Linux, Mac, and WSL here. For Windows users, refer to Microsoft's guide to Install NodeJS on Windows.
- Install n8n with:
npm install n8n@0.218.0 -g - Recommended: follow n8n's guide to set up your development environment.
- Run
git clone https://github.com/ScaleMote/flow.gitto clone the repository to your machine. - Run
npm installto install the project dependencies. - Run
(npm ci) -and (npm build)to build the project. Note that for Windows users is necessary to delete thenpm run cleanof thebuildscript. - Run
npm linkin the project root. This will link our local project to the global context of NPM. We can check that if we runnpm list -gwe should see our project in the list. - Run
npm list -gto see where the global dependencies are installed. For most of the cases should be inC:\Users\YOUR_WINDOWS_USER_NAME\AppData\Roaming\npm, but it may vary in every machine. - Navigate to
GLOBAL_DEPENDENCIES_FOLDER/node_modules/n8nand runnpm link n8n-nodes-stellarto link the project. The name passed tonpm linkshould be the same as the defined in thenameproperty of the project'spackage.jsonfile. - If you want to use
postgresas your database, create a.envfile in the project root copying to contents of the.env.distfile.DB_TYPEmust be set topostgresdb. Then you must rundocker-compose upto run the Postgres local database. - Run
n8n startto start the n8n server with the custom nodes.
These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the documentation.
- Generate a new repository from this template repository.
- Clone your new repo:
git clone https://github.com/<your organization>/<your-repo-name>.git - Run
npm ito install dependencies. - Open the project in your editor.
- Browse the examples in
/nodesand/credentials. Modify the examples, or replace them with your own nodes. - Update the
package.jsonto match your details. - Run
npm run lintto check for errors ornpm run lintfixto automatically fix errors when possible. - Test your node locally. Refer to Run your node locally for guidance.
- Replace this README with documentation for your node. Use the README_TEMPLATE to get started.
- Update the LICENSE file to use your details.
- Publish your package to npm.
Refer to our documentation on creating nodes for detailed information on building your own nodes.
