custom-node-template
v0.2.4
Published
Custom n8n nodes for Tarun's project
Maintainers
Keywords
Readme
Custom Node Template
This repository contains custom nodes for n8n based on the n8n-nodes-starter template. It includes example nodes that you can modify or replace with your own custom nodes.
Prerequisites
You need the following installed on your development machine:
- git
- Node.js (minimum version 18)
- npm or pnpm package manager
- A local n8n server installation
Getting Started
Clone this repository:
git clone https://github.com/your-username/custom-node-template.gitInstall dependencies:
cd custom-node-template npm installBrowse the examples in
/nodesand/credentials. Modify the examples, or replace them with your own nodes.Update the
package.jsonto match your details.Build the custom nodes:
npm run buildLink the custom nodes to your local n8n server using the provided script:
./scripts/link-to-local-server.sh /path/to/your/local-n8n-serverStart your n8n server and you should see the custom nodes available.
Scripts
This repository includes the following utility scripts in the scripts directory:
link-to-local-server.sh
Links the custom nodes to a local n8n server installation.
Usage:
./scripts/link-to-local-server.sh [path-to-local-n8n-server]Parameters:
path-to-local-n8n-server: Optional. Path to the local n8n server directory. If not provided, the script will try to use a default path.
What it does:
- Builds the custom nodes package
- Updates the n8n server's
.envfile to include the full path to the custom nodes in theN8N_CUSTOM_EXTENSIONSvariable - Ensures community nodes are enabled
No symlinks are created - the approach relies solely on the environment variable configuration.
unlink-from-local-server.sh
Removes the custom nodes from a local n8n server installation.
Usage:
./scripts/unlink-from-local-server.sh [path-to-local-n8n-server]Parameters:
path-to-local-n8n-server: Optional. Path to the local n8n server directory. If not provided, the script will try to use a default path.
What it does:
- Removes any symlinks that might have been created in previous versions
- Updates the n8n server's
.envfile to remove the custom nodes from theN8N_CUSTOM_EXTENSIONSvariable - Provides guidance on fully removing the nodes from the n8n server
Development Workflow
- Modify or create nodes in the
nodesdirectory. - Run
npm run buildto compile your changes. - Use the link-to-local-server script to update your local n8n server.
- Restart your n8n server to see the changes.
- When you're done with development or want to remove the nodes, use the unlink-from-local-server script.
Troubleshooting
If your custom nodes aren't appearing in n8n:
- Ensure the
N8N_CUSTOM_EXTENSIONSpath in the server's.envfile is correct - Verify that
N8N_COMMUNITY_NODES_ENABLED=trueis set in the server's.envfile - Make sure you've built the nodes with
npm run build - Restart the n8n server after any changes
