Package Information
Documentation
@gladiator1st/n8n-nodes-upstash
An all-in-one n8n Community Node Suite for Upstash Serverless Data & AI — providing native Vector Search (RAG) for AI Agents, Redis Caching & AI Rate-Limiting, and QStash Delayed Webhook Scheduling.
⚡ Superpowers Included
┌─────────────────────────────────────────────────────┐
│ @gladiator1st/n8n-nodes-upstash │
└──────────────────────────┬──────────────────────────┘
│
┌──────────────────────────────┴──────────────────────────────┐
▼ ▼
🧠 Upstash Vector Store ⚡ Upstash
(AI Vector Store Companion) (Consolidated Action Node)
• LangChain RAG for AI Agents • Resource: Vector (Upsert, Query, Fetch, Delete)
• Server-Side Auto-Embeddings • Resource: Redis (KV, TTL, JSON, Rate Limiter)
• SQL-Like Metadata Filters • Resource: QStash (Delayed Webhooks, Cron, Queue)
📦 Nodes in this Package
1. 🧠 Upstash Vector Store (UpstashVectorStore)
Plugs directly into n8n's AI Agent, Question & Answer Chain, and Vector Store Tool nodes:
- Server-Side Auto-Embeddings: Upstash embeds text documents automatically on the server side — no separate embedding model API key needed!
- External Embeddings Support: Optionally connect OpenAI, Cohere, or any n8n Embeddings node.
- Metadata Filters: Filter queries by category, dates, or custom attributes (e.g.
status = "active").
2. ⚡ Upstash (Upstash)
A consolidated action node exposing all three Upstash serverless products via the Resource selector:
Resource: Vector
- Create or Update (Upsert): Auto-embed and insert raw text or float vector arrays with JSON metadata.
- Query Similar: Search nearest vectors or text embeddings with cosine/dot-product similarity.
- Fetch by ID: Batch retrieve stored documents and vectors.
- Delete by ID: Delete vectors by ID.
- Get Info & Reset: Inspect vector count, dimensions, and index metrics or reset namespace.
Resource: Redis
- Get Value & Set Value: Fast Key-Value storage with optional TTL expiration.
- Delete Key(s) & Increment Counter: Delete keys or increment integer counters atomically.
- JSON Get & JSON Set: Read/write structured data using JSONPath (e.g.
$.user.role). - AI Agent Rate Limiter: Atomic sliding-window rate limiting to protect AI agent quotas and prevent runaway loops.
Resource: QStash
- Publish Message (Delayed/Queue): Send HTTP requests with human durations (e.g.
10s,15m,2h,7d). - Reliable Retries: Automatic exponential backoff retries on destination failure.
- Create Cron Schedule: Schedule recurring cron webhooks (e.g.
0 9 * * 1). - List & Delete Schedules / Cancel Messages: Manage active cron schedules and queued messages.
- Publish Message (Delayed/Queue): Send HTTP requests with human durations (e.g.
🚀 Installation
In n8n (Community Nodes)
- In your n8n instance, navigate to Settings ➔ Community Nodes.
- Click Install a community node.
- Enter:
@gladiator1st/n8n-nodes-upstash - Confirm terms and click Install.
⚙️ Credentials & Setup
Upstash offers a generous free tier (10,000 req/day for Redis & Vector, 500 messages/day for QStash) with no credit card required.
- Sign up at upstash.com.
- For Vector: Create a Vector Index ➔ Copy
UPSTASH_VECTOR_REST_URL&UPSTASH_VECTOR_REST_TOKEN. - For Redis: Create a Redis Database ➔ Copy
UPSTASH_REDIS_REST_URL&UPSTASH_REDIS_REST_TOKEN. - For QStash: Go to QStash tab ➔ Copy
QSTASH_TOKEN.
📖 End-to-End Usage Examples
Example 1: AI Customer Support Agent with RAG & Rate Limiting
Build a zero-hallucination customer support chatbot that retrieves company policies from Upstash Vector while enforcing rate limits with Upstash Redis:
┌──────────────────────────────┐
│ When Chat Message Received │
└──────────────┬───────────────┘
│
▼
┌──────────────────────────────┐
│ Upstash (Resource: Redis) │ ➔ Rate Limit: 10 requests / 60s per user
└──────────────┬───────────────┘
│
▼
┌──────────────────────────────┐ ┌────────────────────────────┐
│ AI Agent (Google Gemini/LLM) │ ◄──── │ Vector Store Tool │
└──────────────┬───────────────┘ └─────────────┬──────────────┘
│ │
│ ▼
│ ┌────────────────────────────┐
│ │ Upstash Vector Store │ ➔ Auto-embeds query & retrieves policies
│ └────────────────────────────┘
▼
┌──────────────────────────────┐
│ Upstash (Resource: QStash) │ ➔ Schedules delayed CRM follow-up email in 15 minutes
└──────────────────────────────┘
Step-by-Step Configuration:
- Seed Knowledge: Add an Upstash node (
Resource: Vector,Operation: Create or Update) withVector ID: policy_refund,Input Type: Raw Text, andText Data: All customers are eligible for a 100% refund within 30 days.. Execute once to index the text. - Rate Limiter: Add an Upstash node (
Resource: Redis,Operation: AI Agent Rate Limiter), setRate Limit Identifier: {{ $json.chatInput }},Max Allowed Requests: 10,Window Duration: 60. - AI Agent & Tool: Add an AI Agent node, connect an LLM (e.g. OpenAI / Gemini) and a Vector Store Tool. Connect Upstash Vector Store to the Vector Store Tool.
- Delayed Follow-Up: Add an Upstash node (
Resource: QStash,Operation: Publish Message), setDestination URL: https://api.crm.com/leads, andDelay: 15m. - Chat: Ask "What is your refund policy?" in the chat box. The AI retrieves the exact 30-day refund policy from Upstash and answers accurately!
Example 2: Full Test Suite Workflow (examples/upstash_test_workflow.json)
This package includes a ready-to-run verification workflow covering all three Upstash services.
How to import and run:
- Open n8n and click Add Workflow (or press
Ctrl+O). - Click the
...menu in the top right ➔ Import from File. - Select
examples/upstash_test_workflow.json. - Assign your Upstash credentials to the nodes.
- Click Test workflow to verify Upsert, Semantic Search, Redis KV Caching, Rate Limiting, and QStash Queuing in one click!
📄 License
MIT © Muhammad Qasim