Description
n8n-nodes-nextlead
Community node for n8n that integrates NextLead CRM.
- npm: n8n-nodes-nextlead
- GitHub: CREACH-Agency/nextlead-n8n
—
Features
| Resource | Operations |
|—|—|
| Contact | Create, Update, Delete, Find, Add Note |
| Structure | Create, Update, Delete, List |
| Sale | Create, Update, Delete |
| Action | Create, Update, Delete |
| Group | Create, Update, Delete, List |
| List | Create, Update, Delete |
| Identify | Identify visitor |
| Trigger | Poll for new/updated contacts and events |
—
Architecture
nodes/NextLead/
├── NextLead.node.ts # Main node — resource router
├── NextLeadTrigger.node.ts # Polling trigger node
├── core/
│ ├── BaseNextLeadNode.ts # Abstract base class shared by both nodes
│ ├── NextLeadApiService.ts # HTTP client wrapping the NextLead REST API
│ ├── NextLeadErrorHandler.ts
│ ├── ResourceManager.ts # Dispatches operations to the right resource
│ ├── interfaces/
│ │ └── IResourceStrategy.ts # Strategy interface for each resource
│ └── types/
│ ├── NextLeadTypes.ts # ResourceType / OperationType enums
│ ├── shared/ApiTypes.ts
│ └── api/ # Typed API response shapes
├── resources/
│ ├── ContactResource.ts # Implements IResourceStrategy for contacts
│ ├── StructureResource.ts
│ ├── SaleResource.ts
│ ├── ActionResource.ts
│ ├── GroupResource.ts
│ ├── ListResource.ts
│ ├── IdentifyResource.ts
│ └── /
│ └── Fields.ts # n8n field definitions per resource
└── utils/
├── NodeExecuteUtils.ts
├── OperationHandlerUtils.ts
├── ResponseUtils.ts
└── FieldDefinitionUtils.tscredentials/
└── NextLeadApi.credentials.ts # API key + domain credential
dist/ # Compiled output (git-ignored, generated by build)
Key design decisions
ContactResource, SaleResource, …) implements IResourceStrategy. ResourceManager picks the right one at runtime based on the resource parameter.helpers.requestWithAuthentication, so auth headers are injected automatically from the stored credential.—
Local development
Prerequisites
npm install -g pnpm)Install dependencies
pnpm install
Build
pnpm run build
Compiled files are output to dist/. The build runs tsc then copies SVG icons via Gulp.
Watch mode (rebuild on save)
pnpm run dev
Lint
pnpm run lint # check
pnpm run lintfix # auto-fix
Format
pnpm run format
Test locally in n8n
Link the package into a local n8n install so changes are reflected immediately:
In this repo
npm linkIn your n8n directory
npm link n8n-nodes-nextlead
Then restart n8n. The NextLead nodes will appear in the node picker.
—
Publishing to npm
> See in package.json).
n8n community node requirements
n8n-nodes-keywords must include "n8n-community-node-package"After publishing, submit the node to the n8n community by opening an issue on github.com/n8n-io/n8n or posting on community.n8n.io.
—
Setup for end users
1. In n8n, go to Settings > Community Nodes and install n8n-nodes-nextlead.
2. Create a NextLead API credential:
– API Key: found in NextLead under Settings > Automation > API Key
– Domain: your NextLead instance URL
3. Add a NextLead node to your workflow and select a resource + operation.
—
Resources
—
License
MIT — see LICENSE.md