packages/@n8n/create-node/README.md
A powerful scaffolding tool to quickly create custom n8n community nodes with best practices built-in.
Create a new n8n node in seconds:
npm create @n8n/node@latest # or pnpm/yarn/...
Follow the interactive prompts to configure your node, or specify options directly:
npm create @n8n/node my-awesome-node --template declarative/custom
npm create @n8n/node [NAME] [OPTIONS]
| Flag | Description |
|---|---|
-f, --force | Overwrite destination folder if it already exists |
--skip-install | Skip automatic dependency installation |
--template <template> | Specify which template to use |
declarative/custom - Start with a minimal declarative node structuredeclarative/github-issues - GitHub Issues integration exampleprogrammatic/example - Full programmatic node with advanced featuresThe CLI will guide you through setting up your node:
$ npm create @n8n/node
ā @n8n/create-node
ā
ā What is your node called?
ā my-awesome-api-node
ā
ā What kind of node are you building?
ā HTTP API
ā
ā What template do you want to use?
ā Start from scratch
ā
ā What's the base URL of the API?
ā https://api.example.com/v1
ā
ā What type of authentication does your API use?
ā API Key
ā
ā Files copied ā
ā
ā Dependencies installed ā
ā
ā Next Steps āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā®
ā ā
ā cd ./my-awesome-api-node && npm run dev ā
ā ā
ā š Documentation: https://docs.n8n.io/integrations/creating-nodes/ ā
ā š¬ Community: https://community.n8n.io ā
ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāÆ
ā
ā Created ./my-awesome-api-node āØ
cd ./my-awesome-api-node
npm run dev
This command:
http://localhost:5678~/.n8n-node-cli/.n8n/custom for developmenthttp://localhost:5678Your generated project comes with these convenient npm scripts:
npm run dev
# Runs: n8n-node dev
npm run build
# Runs: n8n-node build
npm run lint
# Runs: n8n-node lint
npm run lint:fix
# Runs: n8n-node lint --fix
npm run release
# Runs: n8n-node release
npm run build
Generates:
npm run lint
Validates:
npx n8n-node cloud-support
Manage n8n Cloud publication eligibility. In strict mode, your node must use the default ESLint config and pass all community node rules to be eligible for n8n Cloud publication.
Fix issues automatically:
npm run lint:fix
npm run release
Runs release-it to handle the complete release process:
Your generated project includes:
my-awesome-api-node/
āāā src/
ā āāā nodes/
ā ā āāā MyAwesomeApi/
ā ā āāā MyAwesomeApi.node.ts # Main node logic
ā ā āāā MyAwesomeApi.node.json # Node metadata
ā āāā credentials/
ā āāā MyAwesomeApiAuth.credentials.ts
āāā package.json
āāā tsconfig.json
āāā README.md
The CLI expects your project to follow this structure for proper building and development.
The CLI reads configuration from your package.json:
{
"name": "n8n-nodes-my-awesome-node",
"n8n": {
"n8nNodesApiVersion": 1,
"nodes": [
"dist/nodes/MyAwesomeApi/MyAwesomeApi.node.js"
],
"credentials": [
"dist/credentials/MyAwesomeApiAuth.credentials.js"
]
}
}
Choose the right template for your use case:
| Template | Best For | Features |
|---|---|---|
| Declarative | REST APIs, simple integrations | JSON-based configuration, automatic UI generation |
| Programmatic | Complex logic, custom operations | Full TypeScript control, advanced error handling |
Node not appearing in n8n:
# Clear n8n node cli cache and restart
rm -rf ~/.n8n-node-cli/.n8n/custom
npm run dev
TypeScript errors:
# Reinstall dependencies
rm -rf node_modules npm-lock.yaml
npm install
Build failures:
# Check for linting issues first
npm run lint --fix
npm run build
Development server issues:
# Clear cache and restart development server
rm -rf ~/.n8n-node-cli/.n8n/custom
npm run dev
If you prefer to use your own n8n installation:
npm run dev --external-n8n
Specify a custom location for n8n user data:
npm run dev --custom-user-folder /path/to/custom/folder
Found a bug or want to contribute? Check out the n8n repository and join our community!
Happy node building! š