n8n-nodes-upstash
v1.0.0
Published
A comprehensive n8n community node for Upstash providing Redis, Kafka, QStash, and Vector database operations. Includes 12 resource categories and 80+ operations for serverless data management.
Downloads
38
Maintainers
Readme
n8n-nodes-upstash
[Velocity BPA Licensing Notice]
This n8n node is licensed under the Business Source License 1.1 (BSL 1.1).
Use of this node by for-profit organizations in production environments requires a commercial license from Velocity BPA.
For licensing information, visit https://velobpa.com/licensing or contact [email protected].
A comprehensive n8n community node for Upstash, the serverless data platform providing Redis, Kafka, QStash, and Vector databases. This node enables workflow automation for database management, Redis operations, Kafka messaging, vector search, and task scheduling through Upstash's Management and Data APIs.
Features
- Redis Database Management: Create, configure, and manage Redis databases with support for global multi-region deployments
- Redis Data Operations: Full CRUD operations including strings, lists, sets, hashes, sorted sets, and pub/sub
- Kafka Clusters: Manage Kafka clusters, topics, credentials, and connectors
- QStash Messaging: Publish messages, create schedules, and manage dead letter queues
- Vector Databases: Create indexes, upsert vectors, and perform similarity searches
- Team & Usage: Manage teams, members, and monitor usage statistics
- Webhook Triggers: Receive QStash callbacks with signature verification
Installation
Community Nodes (Recommended)
- Open your n8n instance
- Go to Settings > Community Nodes
- Search for
n8n-nodes-upstash - Click Install
Manual Installation
# Navigate to your n8n installation directory
cd ~/.n8n
# Install the package
npm install n8n-nodes-upstashDevelopment Installation
# Clone the repository
git clone https://github.com/Velocity-BPA/n8n-nodes-upstash.git
cd n8n-nodes-upstash
# Install dependencies
npm install
# Build the project
npm run build
# Create symlink to n8n custom nodes directory
mkdir -p ~/.n8n/custom
ln -s $(pwd) ~/.n8n/custom/n8n-nodes-upstash
# Restart n8n
n8n startCredentials Setup
The Upstash node requires credentials to authenticate with Upstash APIs.
Required Credentials
| Field | Description | Required | |-------|-------------|----------| | Email | Your Upstash account email | Yes | | API Key | API key from Upstash Console | Yes |
Optional Credentials (for Data Operations)
| Field | Description | Required For | |-------|-------------|--------------| | Redis REST URL | Database REST endpoint | Redis data operations | | Redis REST Token | Database REST token | Redis data operations | | QStash Token | QStash API token | QStash operations | | QStash Signing Key | Webhook signature verification | QStash triggers | | Vector REST URL | Vector index REST endpoint | Vector operations | | Vector REST Token | Vector index REST token | Vector operations |
Getting Your Credentials
Management API (Email + API Key):
- Log into Upstash Console
- Navigate to Account settings
- Find "API Keys" section
- Copy your API key (or create a new one)
Redis REST Credentials:
- Select your database in Upstash Console
- Find "REST API" section on database details page
- Copy
UPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKEN
QStash Credentials:
- Go to QStash Console
- Copy your QStash token from the dashboard
- For webhook verification, copy the signing key
Vector Credentials:
- Select your vector index in Upstash Console
- Copy the REST URL and token from the index details
Resources & Operations
Redis Databases (12 operations)
| Operation | Description | |-----------|-------------| | List | List all Redis databases | | Create | Create a new Redis database | | Create Global | Create a multi-region global database | | Get | Get database details | | Delete | Delete a database | | Rename | Rename a database | | Reset Password | Reset database password | | Enable TLS | Enable TLS encryption | | Set Eviction | Enable/disable eviction | | Set Auto Scaling | Enable/disable auto-scaling | | Move to Team | Move database to a team | | Get Stats | Get database statistics |
Redis Data Operations (33 operations)
| Category | Operations | |----------|------------| | Strings | set, get, del, mset, mget, incr, decr, incrby, decrby | | Keys | expire, ttl, exists, keys, scan, type, rename | | Lists | lpush, rpush, lpop, rpop, lrange | | Sets | sadd, smembers, srem | | Hashes | hset, hget, hgetall, hdel | | Sorted Sets | zadd, zrange, zrem | | Pub/Sub | publish | | Custom | executeCommand |
Kafka Clusters (7 operations)
| Operation | Description | |-----------|-------------| | List | List all Kafka clusters | | Create | Create a new Kafka cluster | | Get | Get cluster details | | Delete | Delete a cluster | | Rename | Rename a cluster | | Reset Password | Reset cluster password | | Get Stats | Get cluster statistics |
Kafka Topics (6 operations)
| Operation | Description | |-----------|-------------| | List | List topics in a cluster | | Create | Create a new topic | | Get | Get topic details | | Delete | Delete a topic | | Reconfigure | Update topic configuration | | Get Stats | Get topic statistics |
Kafka Credentials (3 operations)
| Operation | Description | |-----------|-------------| | List | List credentials for a cluster | | Create | Create new credentials | | Delete | Delete credentials |
Kafka Connectors (6 operations)
| Operation | Description | |-----------|-------------| | List | List connectors in a cluster | | Create | Create a new connector | | Get | Get connector details | | Delete | Delete a connector | | Reconfigure | Update connector configuration | | Restart | Restart a connector |
QStash Messages (5 operations)
| Operation | Description | |-----------|-------------| | Publish | Publish a message to a URL | | Publish Batch | Publish multiple messages | | Get | Get message details | | Delete | Delete a scheduled message | | Cancel | Cancel a scheduled message |
QStash Schedules (6 operations)
| Operation | Description | |-----------|-------------| | List | List all schedules | | Create | Create a new schedule | | Get | Get schedule details | | Delete | Delete a schedule | | Pause | Pause a schedule | | Resume | Resume a schedule |
QStash Dead Letter Queue (3 operations)
| Operation | Description | |-----------|-------------| | List | List messages in DLQ | | Delete | Delete message from DLQ | | Retry | Retry message from DLQ |
Vector Indexes (10 operations)
| Operation | Description | |-----------|-------------| | List | List all vector indexes | | Create | Create a new index | | Get | Get index details | | Delete | Delete an index | | Get Stats | Get index statistics | | Upsert | Insert or update vectors | | Query | Query similar vectors | | Delete Vectors | Delete vectors by ID | | Fetch | Fetch vectors by ID | | Reset | Reset (clear) index |
Teams (5 operations)
| Operation | Description | |-----------|-------------| | List | List teams | | Get | Get team details | | List Members | List team members | | Add Member | Add member to team | | Remove Member | Remove member from team |
Usage & Billing (3 operations)
| Operation | Description | |-----------|-------------| | Get Daily Stats | Get daily usage statistics | | Get Monthly Stats | Get monthly usage statistics | | Get Billing | Get billing information |
Trigger Node
The Upstash Trigger node receives QStash webhook callbacks.
Events
| Event | Description | |-------|-------------| | Message Delivered | Triggered when a message is successfully delivered | | Message Failed | Triggered when message delivery fails | | Message DLQ | Triggered when a message is moved to dead letter queue | | All Events | Receive all QStash webhook events |
Configuration
- Add the Upstash Trigger node to your workflow
- Configure your Upstash credentials
- Enable Verify Signature for security
- Copy the webhook URL from n8n
- Configure your QStash messages to callback to this URL
Usage Examples
Create and Use a Redis Database
// 1. Create a Redis database
{
"resource": "redisDatabase",
"operation": "create",
"name": "my-cache",
"region": "us-east-1",
"tls": true
}
// 2. Store data
{
"resource": "redisData",
"operation": "set",
"key": "user:123",
"value": "{\"name\": \"John\", \"email\": \"[email protected]\"}",
"ttl": 3600
}
// 3. Retrieve data
{
"resource": "redisData",
"operation": "get",
"key": "user:123"
}Schedule a Message with QStash
// Create a recurring schedule
{
"resource": "qstashSchedule",
"operation": "create",
"destination": "https://api.example.com/process",
"cron": "0 9 * * *",
"body": "{\"type\": \"daily-report\"}",
"retries": 3
}Vector Similarity Search
// 1. Create an index
{
"resource": "vectorIndex",
"operation": "create",
"indexName": "embeddings",
"dimension": 1536,
"metric": "cosine"
}
// 2. Upsert vectors
{
"resource": "vectorIndex",
"operation": "upsert",
"indexName": "embeddings",
"vectors": [
{
"id": "doc-1",
"vector": [0.1, 0.2, ...],
"metadata": {"title": "Document 1"}
}
]
}
// 3. Query similar vectors
{
"resource": "vectorIndex",
"operation": "query",
"indexName": "embeddings",
"vector": [0.1, 0.2, ...],
"topK": 10,
"includeMetadata": true
}Upstash Concepts
Serverless Architecture
Upstash provides serverless data services with pay-per-request pricing. Databases scale automatically and you only pay for what you use.
Global Databases
Redis databases can be deployed globally with read replicas in multiple regions for low-latency access worldwide.
REST APIs
All Upstash services offer HTTP-based REST APIs, making them accessible from serverless functions and edge computing environments where TCP connections aren't available.
QStash
QStash is a message queue and scheduler service that guarantees at-least-once delivery with automatic retries and dead letter queues.
Regions
Redis Regions
| Region | Location | |--------|----------| | us-east-1 | N. Virginia, USA | | us-west-1 | N. California, USA | | us-west-2 | Oregon, USA | | eu-west-1 | Ireland | | eu-central-1 | Frankfurt, Germany | | ap-southeast-1 | Singapore | | ap-southeast-2 | Sydney, Australia | | ap-northeast-1 | Tokyo, Japan | | sa-east-1 | São Paulo, Brazil |
Kafka Regions
| Region | Location | |--------|----------| | us-east-1 | N. Virginia, USA | | eu-west-1 | Ireland | | ap-southeast-1 | Singapore |
Error Handling
The node handles common Upstash API errors:
| Status Code | Description | Handling | |-------------|-------------|----------| | 400 | Bad Request | Check parameters | | 401 | Unauthorized | Verify credentials | | 404 | Not Found | Resource doesn't exist | | 429 | Too Many Requests | Implement backoff | | 500 | Server Error | Retry operation |
Enable Continue On Fail in n8n to handle errors gracefully in workflows.
Security Best Practices
- Use Environment Variables: Store credentials in environment variables, not in workflows
- Enable TLS: Always enable TLS for Redis databases
- Verify Signatures: Enable webhook signature verification for QStash triggers
- Scope Credentials: Use topic-scoped Kafka credentials with minimal permissions
- Read-Only Tokens: Use read-only Redis tokens when write access isn't needed
Development
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Run linting
npm run lint
# Fix linting issues
npm run lint:fix
# Watch mode for development
npm run devAuthor
Velocity BPA
- Website: velobpa.com
- GitHub: Velocity-BPA
Licensing
This n8n community node is licensed under the Business Source License 1.1.
Free Use
Permitted for personal, educational, research, and internal business use.
Commercial Use
Use of this node within any SaaS, PaaS, hosted platform, managed service, or paid automation offering requires a commercial license.
For licensing inquiries: [email protected]
See LICENSE, COMMERCIAL_LICENSE.md, and LICENSING_FAQ.md for details.
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure your code:
- Passes all tests (
npm test) - Passes linting (
npm run lint) - Includes appropriate documentation
- Follows the existing code style
Support
- Documentation: Upstash Docs
- Issues: GitHub Issues
- n8n Community: n8n Community Forum
