Back to Integrations
integrationMongoDB node
integrationRedis node

MongoDB and Redis integration

Save yourself the work of writing custom integrations for MongoDB and Redis and use n8n instead. Build adaptable and scalable Development, and Data & Storage workflows that work with your technology stack. All within a building experience you will love.

How to connect MongoDB and Redis

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

MongoDB and Redis integration: Create a new workflow and add the first step

Step 2: Add and configure MongoDB and Redis nodes

You can find MongoDB and Redis in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure MongoDB and Redis nodes one by one: input data on the left, parameters in the middle, and output data on the right.

MongoDB and Redis integration: Add and configure MongoDB and Redis nodes

Step 3: Connect MongoDB and Redis

A connection establishes a link between MongoDB and Redis (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

MongoDB and Redis integration: Connect MongoDB and Redis

Step 4: Customize and extend your MongoDB and Redis integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect MongoDB and Redis with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

MongoDB and Redis integration: Customize and extend your MongoDB and Redis integration

Step 5: Test and activate your MongoDB and Redis workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from MongoDB to Redis or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

MongoDB and Redis integration: Test and activate your MongoDB and Redis workflow

Predictive health monitoring & alert system with GPT-4o-mini

How It Works
The system collects real-time wearable health data, normalizes it, and uses AI to analyze trends and risk scores. It detects anomalies by comparing with historical patterns and automatically triggers alerts and follow-up actions when thresholds are exceeded.

Setup Steps
Configure Webhook Endpoint - Set up webhook to receive data from wearable devices
Connect Database - Initialize storage for health metrics and historical data
Set Normalization Rules - Define data standardization parameters for different devices
Configure AI Model - Set up health score calculation and risk prediction algorithms
Define Thresholds - Establish alert triggers for critical health metrics
Connect Notification Channels - Configure email and Slack integrations
Set Up Reporting - Create automated report templates and schedules
Test Workflow - Run end-to-end tests with sample health data

Workflow Template
Webhook → Store Database → Normalize Data → Calculate Health Score → Analyze Metrics → Compare Previous → Check Threshold → Generate Reports/Alerts → Email/Slack → Schedule Follow-up

Workflow Steps
Ingest real-time wearable data via webhook, store and standardize it, and use GPT-4 for trend analysis and risk scoring. Monitor metrics against thresholds, trigger SMS, email, or Slack alerts, generate reports, and schedule follow-ups.

Setup Instructions
Configure webhook, database, GPT-4 API, notifications, calendar integration, and customize alert thresholds.

Prerequisites
Wearable API, patient database, GPT-4 key, email SMTP, optional Slack/Twilio, calendar integration.

Use Cases
Monitor glucose for diabetics, track elderly vitals/fall risk, assess corporate wellness, and post-surgery recovery alerts.

Customization
Adjust risk algorithms, add metrics, integrate telemedicine.

Benefits
Early intervention reduces readmissions and automates 80% of monitoring tasks.

Nodes used in this workflow

Popular MongoDB and Redis workflows

+6

Predictive Health Monitoring & Alert System with GPT-4o-mini

How It Works The system collects real-time wearable health data, normalizes it, and uses AI to analyze trends and risk scores. It detects anomalies by comparing with historical patterns and automatically triggers alerts and follow-up actions when thresholds are exceeded. Setup Steps Configure Webhook Endpoint - Set up webhook to receive data from wearable devices Connect Database - Initialize storage for health metrics and historical data Set Normalization Rules - Define data standardization parameters for different devices Configure AI Model - Set up health score calculation and risk prediction algorithms Define Thresholds - Establish alert triggers for critical health metrics Connect Notification Channels - Configure email and Slack integrations Set Up Reporting - Create automated report templates and schedules Test Workflow - Run end-to-end tests with sample health data Workflow Template Webhook → Store Database → Normalize Data → Calculate Health Score → Analyze Metrics → Compare Previous → Check Threshold → Generate Reports/Alerts → Email/Slack → Schedule Follow-up Workflow Steps Ingest real-time wearable data via webhook, store and standardize it, and use GPT-4 for trend analysis and risk scoring. Monitor metrics against thresholds, trigger SMS, email, or Slack alerts, generate reports, and schedule follow-ups. Setup Instructions Configure webhook, database, GPT-4 API, notifications, calendar integration, and customize alert thresholds. Prerequisites Wearable API, patient database, GPT-4 key, email SMTP, optional Slack/Twilio, calendar integration. Use Cases Monitor glucose for diabetics, track elderly vitals/fall risk, assess corporate wellness, and post-surgery recovery alerts. Customization Adjust risk algorithms, add metrics, integrate telemedicine. Benefits Early intervention reduces readmissions and automates 80% of monitoring tasks.
+8

Build a WhatsApp AI shopping bot with virtual try-on using Gemini and GPT

Build a WhatsApp AI shopping bot with virtual try-on using Gemini 📌 Overview This workflow fully automates your T-shirt store's WhatsApp shopping experience using GPT for intent detection, MongoDB Atlas for vector-based product search, Redis for session management, and Google Gemini for AI-powered virtual try-on. It automatically handles customer messages, finds relevant products, processes orders, and generates realistic try-on images — all inside WhatsApp, with no app or website required. Customers can search for T-shirts, place orders, and virtually try on items in a single conversation. Redis ensures fast product caching and session tracking. MongoDB Atlas stores the product catalog and orders. Google Sheets logs every order automatically. Gemini generates realistic try-on images from customer selfies. This workflow eliminates manual order handling, improves customer experience, and gives store owners full visibility into orders and product searches. ⚙️ How it works This workflow runs automatically when a customer sends a WhatsApp message. 🔍 Product search 💬 Receives the customer message via WhatsApp Business API 🧠 GPT classifies the intent as product search, recommendation, or general query ⚡ Checks Redis cache for existing results (TTL: 1 hour) 🔎 On a cache miss, runs MongoDB Atlas vector search using OpenAI embeddings 🛍️ Sends matching products as interactive WhatsApp cards with Order Now and Virtual Try-On buttons 🛒 Order flow 👆 Triggered when the customer taps the Order Now button 📦 AI agent fetches product details from MongoDB 🗃️ Creates a new order document in MongoDB 📊 Logs the order to Google Sheets automatically ✅ Sends an order confirmation message to the customer via WhatsApp 👗 Virtual try-on flow 👆 Triggered when the customer taps the Virtual Try-On button 💾 Stores the product ID in Redis (TTL: 10 minutes) 📸 Prompts the customer to send a clear front-facing selfie 🔍 Gemini validates that exactly one real person is in the photo 🖼️ Merges the product image and selfie and generates a realistic try-on image 📩 Sends the try-on result back to the customer via WhatsApp 🗑️ Clears the Redis context after delivery 🛠 Setup steps Import this workflow into n8n Connect your WhatsApp Business Cloud API credentials Connect your OpenAI API credentials (for embeddings and GPT model) Connect your Google Gemini API credentials Connect your MongoDB Atlas credentials and create a vector index named ShopingBot on the product collection Connect your Redis credentials Connect your Google Drive service account credentials Connect your Google Sheets service account credentials Import your product catalog with embeddings into the MongoDB product collection Activate the workflow The workflow will run automatically when customers send WhatsApp messages. 🚀 Features 🧠 AI-powered shopping 🤖 Automatically classifies customer intent using GPT 🔎 Semantic product search using OpenAI embeddings and MongoDB Atlas vector search ⚡ Redis caching for ultra-fast repeated search results (TTL: 1 hour) 💬 Interactive WhatsApp product cards with Order Now and Virtual Try-On buttons 🔄 Sliding window session memory (last 20 messages per user) 🛒 Order management 📦 Fully automated order creation saved to MongoDB 📊 Automatic order logging to Google Sheets 🤖 AI agent handles the complete order flow without manual input ✅ Instant order confirmation sent to the customer via WhatsApp 👗 Virtual try-on ✨ AI-powered try-on image generation using Google Gemini 📷 Selfie validation ensures exactly one real person is in the photo 🖼️ Product and selfie images resized and merged before generation 📩 Try-on result delivered directly in the WhatsApp conversation 🗑️ Redis TTL automatically clears try-on context after delivery 🔐 Security and reliability 🛡️ Advanced message validation with spam and XSS protection ❌ Unsupported message types rejected with friendly error messages 🔁 Retry logic on critical HTTP request nodes 📦 Modular workflow architecture for easy customisation and scaling 📋 Requirements You need the following accounts and credentials: 🔧 n8n 📱 WhatsApp Business Cloud API 🤖 OpenAI API (embeddings and GPT model) ✨ Google Gemini API 🍃 MongoDB Atlas (with vector index named ShoppingBot on the product collection) ⚡ Redis server 📁 Google Drive (service account) 📊 Google Sheets (service account) 🎯 Benefits 🚀 Fully automated WhatsApp shopping experience 🙌 No manual order handling required 👗 Customers can try on products before buying ⚡ Fast product search with Redis caching 📊 All orders automatically tracked in Google Sheets 💼 Reduces support workload for store owners 🕐 Works 24/7 without human intervention 👨‍💻 Author BytezTech Pvt Ltd

Build your own MongoDB and Redis integration

Create custom MongoDB and Redis workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

MongoDB supported actions

Create
Drop
List
Update
Aggregate
Aggregate documents
Delete
Delete documents
Find
Find documents
Find And Replace
Find and replace documents
Find And Update
Find and update documents
Insert
Insert documents
Update
Update documents

Redis supported actions

Delete
Delete a key from Redis
Get
Get the value of a key from Redis
Increment
Atomically increments a key by 1. Creates the key if it does not exist.
Info
Returns generic information about the Redis instance
Keys
Returns all the keys matching a pattern
List Length
Returns the length of a list
Pop
Pop data from a redis list
Publish
Publish message to redis channel
Push
Push data to a redis list
Set
Set the value of a key in redis

FAQs

  • Can MongoDB connect with Redis?

  • Can I use MongoDB’s API with n8n?

  • Can I use Redis’s API with n8n?

  • Is n8n secure for integrating MongoDB and Redis?

  • How to get started with MongoDB and Redis integration in n8n.io?

Need help setting up your MongoDB and Redis integration?

Discover our latest community's recommendations and join the discussions about MongoDB and Redis integration.
João Textor

Looking to integrate MongoDB and Redis in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate MongoDB with Redis

Build complex workflows, really fast

Build complex workflows, really fast

Handle branching, merging and iteration easily.
Pause your workflow to wait for external events.

Code when you need it, UI when you don't

Simple debugging

Your data is displayed alongside your settings, making edge cases easy to track down.

Use templates to get started fast

Use 1000+ workflow templates available from our core team and our community.

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon