This starter repository helps you build custom integrations for [n8n](https://n8n.io). It includes example nodes, credentials, the node linter, and all the tooling you need to get started.
> **New to building n8n nodes?** The fastest way to get started is with `npm create @n8n/node`. This command scaffolds a complete node package for you using the [@n8n/node-cli](https://www.npmjs.com/package/@n8n/node-cli).
**To create a new node package from scratch:**
```bash
npm create @n8n/node
```
**Already using this starter? Start developing with:**
```bash
npm run dev
```
This starts n8n with your nodes loaded and hot reload enabled.
## What's Included
This starter repository includes two example nodes to learn from:
- **[Example Node](nodes/Example/)** - A simple starter node that shows the basic structure with a custom `execute` method
- **[GitHub Issues Node](nodes/GithubIssues/)** - A complete, production-ready example built using the **declarative style**:
- Two authentication methods (OAuth2 and Personal Access Token)
- List search functionality for dynamic dropdowns
- Proper error handling and typing
- Ideal for HTTP API-based integrations
> [!TIP]
> The declarative/low-code style (used in GitHub Issues) is the recommended approach for building nodes that interact with HTTP APIs. It significantly reduces boilerplate code and handles requests automatically.
Browse these examples to understand both approaches, then modify them or create your own.
## Finding Inspiration
Looking for more examples? Check out these resources:
- **[npm Community Nodes](https://www.npmjs.com/search?q=keywords:n8n-community-node-package)** - Browse thousands of community-built nodes on npm using the `n8n-community-node-package` tag
- **[n8n Built-in Nodes](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/nodes)** - Study the source code of n8n's official nodes for production-ready patterns and best practices
- **[n8n Credentials](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/credentials)** - See how authentication is implemented for various services
These are excellent resources to understand how to structure your nodes, handle different API patterns, and implement advanced features.
> The `@n8n/node-cli` is included as a dev dependency and will be installed automatically when you run `npm install`. The CLI includes n8n for local development, so you don't need to install n8n globally.
## Getting Started with this Starter
Follow these steps to create your own n8n community node package:
### 1. Create Your Repository
[Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template, then clone it:
| `npm run dev` | Start n8n with your node and watch for changes (runs `n8n-node dev`) |
| `npm run build` | Compile TypeScript to JavaScript for production (runs `n8n-node build`) |
| `npm run build:watch` | Build in watch mode (auto-rebuild on changes) |
| `npm run lint` | Check your code for errors and style issues (runs `n8n-node lint`) |
| `npm run lint:fix` | Automatically fix linting issues when possible (runs `n8n-node lint --fix`) |
| `npm run release` | Create a new release (runs `n8n-node release`) |
> [!TIP]
> These scripts use the [@n8n/node-cli](https://www.npmjs.com/package/@n8n/node-cli) under the hood. You can also run CLI commands directly, e.g., `npx n8n-node dev`.
## Troubleshooting
### My node doesn't appear in n8n
1. Make sure you ran `npm install` to install dependencies
2. Check that your node is listed in `package.json` under `n8n.nodes`
3. Restart the dev server with `npm run dev`
4. Check the console for any error messages
### Linting errors
Run `npm run lint:fix` to automatically fix most common issues. For remaining errors, check the [n8n node development guidelines](https://docs.n8n.io/integrations/creating-nodes/).
- **[n8n Creator Portal](https://creators.n8n.io/nodes)** - Submit your node for verification
- **[Submit Community Nodes Guide](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/)** - Verification requirements and process
## Contributing
Have suggestions for improving this starter? [Open an issue](https://github.com/n8n-io/n8n-nodes-starter/issues) or submit a pull request!