Skip to content

n8nhackers/n8n-nodes-starter

 
 

Repository files navigation

Banner image

n8n-nodes-starter

This repo contains example nodes to help you get started building your own custom integrations for n8n and n8n hackers.

If you want to learn step by step how to build your own community nodes, join our course at n8n hackers.

Prerequisites

You need the following installed on your development machine:

  • git
  • Node.js and npm. Minimum version Node 20. 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. Depending on your n8n version, one node version or another will be required to start n8n:
     # n8n 1.105.3 requires lts/iron
     # There is a .nvmrc file that sets the minimum version for n8n using nvm.
     # Run the next command to install the required version to start
     nvm use
    
  • Install n8n with:
    npm install n8n -g
    
  • Recommended: follow n8n's guide to set up your development environment.

Using this starter

These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the documentation.

  1. Generate a new repository from this template repository.
  2. Clone your new repo:
    git clone https://github.com/<your organization>/<your-repo-name>.git
    
  3. Run npm i to install dependencies.
  4. Open the project in your editor.
  5. Browse the examples in /nodes and /credentials. Modify the examples, or replace them with your own nodes.
  6. Update the package.json to match your details.
  7. Run npm run lint to check for errors or npm run lintfix to automatically fix errors when possible.
  8. Test your node locally. Refer to Run your node locally for guidance, or follow the next steps:
# Build a compiled version. Always.
npm run build

# Link built version in the system. First time execution.
npm link

# Create custom directory in .n8n if required. First time execution.
mkdir -p ~/.n8n/custom/

# Go to custom directory. First time execution.
cd ~/.n8n/custom/

# Link current community node in the directory. 
# It will be installed under ~/.n8n/custom/node_modules
# First time execution.
npm link n8n-nodes-starter

# Check existing link. First time execution.
npm -g ls
#output sample:
# ├── n8n-nodes-starter@0.1.0 -> ./../../../../../Documents/companies/n8nhackers/n8n-nodes-starter

# Start n8n to test your community node. Always.
n8n start
  1. Replace this README with documentation for your node. Use the README_TEMPLATE to get started.
  2. Update the LICENSE file to use your details.
  3. Publish your package to npm.
# Push changes to repository
git commit -a -m "Change X"
git push

# Login with npm
npm login

# Publish the version
npm publish

Publication

To make your custom node available to the community, you must create it as an npm package, and submit it to the npm registry.

If you would like your node to be available on n8n cloud you can also submit your node for verification.

TL;DR

You can also use the next ready-to-use samples for your n8n (self-hosted version):

More information

Refer to our documentation on creating nodes for detailed information on building your own nodes.

Version history

Here you can find the list of changes applied to this node:

  • 0.0.1: Initial version

Issues

If you have any issues, please let us know on GitHub.

About

Special thanks to N8n nodemation workflow automation by Jan Oberhauser.

This node was forked and adapted by n8nhackers.com and Miquel Colomer. For productive use and consulting on this, contact us please.

License

MIT

About

Example starter module for custom n8n nodes.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 66.7%
  • JavaScript 33.3%