n8n-nodes-neo4j-latest
v1.0.0
Published
n8n community node for Neo4j — vector search, graph DB, AI tool integration. Fixed version with no internal langchain dependency.
Maintainers
Readme
n8n-nodes-neo4j-fixed
A fixed and fully-featured n8n community node for Neo4j — the leading graph database.
This is a clean rewrite of n8n-nodes-neo4j-extended that fixes the logWrapper import error caused by internal @n8n/n8n-nodes-langchain subpath imports. This package uses only the public n8n-workflow API and the official neo4j-driver.
Features
| Feature | Details | |---------|---------| | 🗄️ Graph DB | Execute Cypher, Create/Update/Delete nodes, Create relationships, Get schema | | 🔍 Vector Store | Similarity search, hybrid search, add texts, add documents, delete by ID | | 🤖 AI Tool | Connects to LangChain agents via the Embedding sub-input | | 🚀 Auto-Index | Automatically creates vector indexes when missing | | 🔒 Security | Input validation prevents Cypher injection | | 📋 Dynamic Dropdowns | Lists existing vector indexes |
Installation
In n8n → Settings → Community Nodes → Install:
n8n-nodes-neo4j-fixedOr via npm:
npm install n8n-nodes-neo4j-fixedWhy This Fix Works
The original n8n-nodes-neo4j-extended imported:
import { logWrapper } from '@n8n/n8n-nodes-langchain/dist/utils/logWrapper';This is an internal path that newer versions of @n8n/n8n-nodes-langchain removed from their exports map, causing the load failure.
This package achieves the same AI embedding integration using only the public NodeConnectionType.AiEmbedding and getInputConnectionData() API from n8n-workflow.
Credentials
| Field | Description | Default |
|-------|-------------|---------|
| Connection URI | Neo4j connection string | neo4j://localhost:7687 |
| Username | Database username | neo4j |
| Password | Database password | — |
| Database | Database name | neo4j |
Supports neo4j://, bolt://, neo4j+s://, bolt+s:// protocols.
Operations
Graph Database
- Execute Query — Run any Cypher query with optional parameters
- Create Node — Create a node with label and properties
- Update Node — Update properties of an existing node by match key
- Delete Node — Detach-delete a node by match key
- Create Relationship — Create a relationship between two nodes
- Get Schema — Retrieve labels, relationship types, and property keys
Vector Store
Requires an Embedding model connected to the Embedding sub-input
- Similarity Search — Vector (cosine) or Hybrid (vector + fulltext) search
- Add Texts — Embed and store plain text strings
- Add Documents — Embed and store
{ pageContent, metadata }objects - Delete by ID — Remove vectors by their element ID
Index Management
- List Indexes — Show all vector indexes in the database
- Create Index — Create a vector index with dimension and similarity function
- Delete Index — Drop a vector index
- Get Index Info — Get details about a specific index
Vector Dimensions
Neo4j supports dimensions 1–2048.
| Model | Dimension |
|-------|-----------|
| OpenAI text-embedding-ada-002 | 1536 |
| OpenAI text-embedding-3-small | 1536 |
| sentence-transformers/all-MiniLM-L6-v2 | 384 |
| sentence-transformers/all-mpnet-base-v2 | 768 |
| Cohere Embed v3 | 1024 |
| GigaChat Embeddings | 2048 |
Note: OpenAI
text-embedding-3-large(3072D) exceeds Neo4j's limit. Usetext-embedding-3-smallinstead or reduce dimensions.
Security
- Identifier validation:
^[a-zA-Z_$][a-zA-Z0-9_$]*$ - 255-character limit on all identifier fields
- Parameterized queries for all user-supplied values
- No eval or dynamic code execution
Compatibility
- n8n ≥ 1.0.0
- Neo4j ≥ 4.4 (5.x recommended for full vector support)
- Node.js ≥ 18
License
MIT
