Match Medical Symptoms to Products with OpenAI, Qdrant & Google Sheets RAG

Go to Workflow
92 views
Built by Zain Ali Zain Ali
Created on June 05, 2026

Description

๐Ÿง  RAG AI Medical Agent โ€“ n8n Workflow

๐Ÿ‘ฅ Whoโ€™s it for
This workflow is perfect for:
Healthcare ecommerce businesses** that want to automate product recommendations.
Founders or developers** building an AI assistant using retrieval-augmented generation (RAG) with product data.
Anyone** wanting to combine OpenAI, Qdrant vector search, and Google Sheets to power intelligent medical queries.

โš™๏ธ How it works / What it does

This RAG-based workflow allows users to ask medical questions related to hair or scalp issues (e.g., hair loss, thinning). It:

Retrieves product info from a Google Sheet.
Converts product data into text embeddings using OpenAI.
Stores those embeddings in a Qdrant vector database.
On chat message trigger, performs a vector similarity search to match user symptoms with relevant products.
Uses an AI agent to respond with top 3 matching products from your catalog.

๐Ÿ› ๏ธ How to set up

Step 1: ๐Ÿ—‚ Get your data
Make sure your Google Sheet contains the following columns:
Product Name
Symptoms Involved
Product Description
ForeverBetty Product Page Link
Category (optional but recommended)

Step 2: ๐Ÿ” Connect your accounts
Add your Google Sheets OAuth2 credentials in the "Get all products" node.
Add your OpenAI API key in the embedding nodes.
Add your Qdrant credentials in the vector store nodes.

Step 3: ๐Ÿง  Populate the Vector DB
Click โ€œExecute workflowโ€ manually.
This pulls data from the Google Sheet.
Each row is:
Formatted properly into a vector-friendly string.
Converted into an embedding using OpenAI.
Stored into Qdrant.

Step 4: ๐Ÿ’ฌ Enable Chat Interface
Use the ChatTrigger to receive user queries.
The agent searches Qdrant for relevant vectors.
Replies with product suggestions via LangChain's LLM agent.

๐Ÿ“‹ Requirements

๐Ÿง  n8n
๐Ÿ“„ A Google Sheet with product data.
๐Ÿ” Google Sheets OAuth2 credentials.
๐Ÿง  OpenAI API key (for embeddings + chat LLM).
๐Ÿ—ƒ๏ธ Qdrant Vector DB instance (Cloud or self-hosted).
๐Ÿงฉ How to customize it

๐Ÿ”„ Change the data structure
Update the "Set Data Properly in vector database" node to modify what fields are embedded.
Example:
---
Product: {{ $json['Product Name '] }}
Use-case: {{ $json['Symptoms Involved'] }}
Link: {{ $json['ForeverBetty Product Page Link '] }}

Nodes Used (8)

AI Agent
@n8n/n8n-nodes-langchain.agent
Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter
Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader
Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi
Google Sheets
n8n-nodes-base.googleSheets
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Qdrant Vector Store
@n8n/n8n-nodes-langchain.vectorStoreQdrant
Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow