n8n community node for Cloudflare Vectorize vector database integration, featuring vector operations (insert/upsert/query), index management, metadata filtering, namespace support, and full AI Agent compatibility for semantic search and RAG implementation
npm install n8n-nodes-cloudflare-vectorizeA comprehensive n8n community node for Cloudflare Vectorize, enabling vector database operations for semantic search, embeddings management, and RAG (Retrieval-Augmented Generation) applications.


- 🚀 Complete Vector Operations: Insert, upsert, query, delete vectors
- 🔍 Advanced Search: Semantic similarity search with configurable parameters
- 📊 Index Management: Create, configure, and manage vector indexes
- 🏷️ Metadata Support: Rich metadata filtering and indexing
- 🎯 AI Agent Ready: Optimized for use with n8n AI Agent and MCP Trigger
- 📝 Namespace Support: Organize vectors with namespace segmentation
- ⚡ Batch Operations: Efficient bulk vector processing
- 🛠️ Developer Friendly: Full TypeScript support with comprehensive types
1. Go to Settings > Community Nodes in your n8n instance
2. Click Install a community node
3. Enter: n8n-nodes-cloudflare-vectorize
4. Click Install
``bashIn your n8n installation directory
npm install n8n-nodes-cloudflare-vectorize
Quick Start
$3
1. Create a Cloudflare account
2. Create a vector index using Wrangler CLI:
`bash
npx wrangler vectorize create my-index --dimensions=1536 --metric=cosine
`
3. Get your Account ID from the Cloudflare dashboard
4. Create an API token with Vectorize permissions$3
1. Add new credentials: Cloudflare Vectorize API
2. Enter your:
- Account ID: Found in your Cloudflare dashboard
- API Token: Created with Vectorize read/write permissions
- API Endpoint: Leave default unless using custom endpoint
$3
Add the Cloudflare Vectorize node to your workflow and select from these resources:
- Index: Manage vector indexes
- Vector: Insert, query, and manage vectors
- Metadata: Configure metadata indexes for filtering
- Utility: List vectors and get index information
Usage Examples
$3
`json
{
"resource": "vector",
"operation": "insert",
"indexName": "my-embeddings",
"vectors": [
{
"id": "doc1",
"values": [0.1, 0.2, 0.3, ...],
"metadata": {
"title": "Document 1",
"category": "tech"
}
}
]
}
`$3
`json
{
"resource": "vector",
"operation": "query",
"indexName": "my-embeddings",
"queryVector": [0.1, 0.2, 0.3, ...],
"topK": 5,
"returnValues": true,
"returnMetadata": "all"
}
`$3
`json
{
"resource": "index",
"operation": "create",
"indexName": "new-index",
"dimensions": 1536,
"metric": "cosine",
"description": "Embeddings for documents"
}
`AI Agent Integration
This node is optimized for use with n8n's AI Agent and MCP Trigger:
`json
{
"tool": "cloudflare-vectorize",
"operation": "query-similar-vectors",
"parameters": {
"query": "Find documents about machine learning",
"index": "knowledge-base",
"limit": 3
}
}
`Operations Reference
$3
| Operation | Description |
|-----------|-------------|
|
create | Create a new vector index |
| list | List all available indexes |
| delete | Delete an index |
| get | Get index details |
| info | Get index statistics |$3
| Operation | Description |
|-----------|-------------|
|
insert | Insert new vectors (fails if ID exists) |
| upsert | Insert or update vectors |
| query | Search vectors by similarity |
| queryById | Query using existing vector |
| getByIds | Retrieve specific vectors |
| deleteByIds | Delete vectors by ID |$3
| Operation | Description |
|-----------|-------------|
|
createIndex | Enable metadata filtering |
| deleteIndex | Remove metadata index |
| listIndexes | List metadata indexes |$3
| Operation | Description |
|-----------|-------------|
|
listVectors | List all vector IDs |
| describe | Get index configuration |Configuration
$3
Vectors can be provided as:
- Array of numbers:
[1.0, 2.0, 3.0]
- Float32Array or Float64Array
- n8n expressions: {{ $json.embedding }}$3
- cosine: Cosine similarity (recommended for most use cases)
- euclidean: Euclidean distance
- dot-product: Dot product similarity
$3
Create metadata indexes to enable filtering:
`json
{
"resource": "metadata",
"operation": "createIndex",
"indexName": "my-index",
"propertyName": "category",
"type": "string"
}
`Then use in queries:
`json
{
"resource": "vector",
"operation": "query",
"filter": {
"category": "technology"
}
}
`Error Handling
The node provides detailed error messages for common issues:
- Authentication errors: Check API token permissions
- Index not found: Verify index name and existence
- Dimension mismatches: Ensure vector dimensions match index
- Rate limiting: Automatic retry with exponential backoff
- Network errors: Configurable retry logic
Limits
Cloudflare Vectorize has the following limits:
- Vectors per request: Up to 1,000 for inserts/upserts
- Query topK: Up to 100 (20 with returnValues/returnMetadata)
- Metadata indexes: Up to 10 per index
- Vector dimensions: Up to 1536
- Namespace length: Up to 64 characters
- Metadata size: Up to 10KB per vector
Development
$3
`bash
git clone https://github.com/jezweb/n8n-nodes-cloudflare-vectorize.git
cd n8n-nodes-cloudflare-vectorize
npm install
npm run build
`$3
`bash
Link to local n8n
npm link
cd ~/.n8n/custom
npm link n8n-nodes-cloudflare-vectorizeRestart n8n
``Contributions are welcome! Please read our contributing guidelines and submit issues and pull requests on GitHub.
MIT License - see LICENSE file for details.
- 📖 Cloudflare Vectorize Documentation
- 🐛 Report Issues
- 💬 n8n Community
- 📧 Email Support
- n8n-nodes-cloudflare-d1 - Cloudflare D1 database integration
- Cloudflare Vectorize - Official documentation
- n8n - Workflow automation platform