Synchronize MySQL database schemas to Pinecone with OpenAI embeddings
Ready for 3.0What this workflow does
This AI workflow has 17 nodes and runs manually, when you click “Execute workflow”. Along the way it connects MySQL, Embeddings OpenAI and Pinecone Vector Store.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Load Global Configuration (Edit Fields (Set)): sets or maps fields
- Fetch All Database Tables (MySQL): run a query
- Loop Over executable queries (Loop Over Items (Split in Batches)): loops over the items in batches
- Set Table Schema Context (Edit Fields (Set)): sets or maps fields
- Fetch Table Schema Definition (MySQL): run a query
- Generate Schema Hash (Code): runs custom JavaScript code
- Check Existing Vector Metadata (Data table): get
- Vector Exists? (If): checks a condition and branches into true / false
- Insert Schema Vector to Pinecone (Pinecone Vector Store): stores documents in the Pinecone vector store, with embeddings: Generate Schema Embeddings; document loader: Prepare Schema Document
- Schema Changed? (If): checks a condition and branches into true / false
…plus 3 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (12)
- Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - MySQL
n8n-nodes-base.mySql - Code
n8n-nodes-base.code - Data table
n8n-nodes-base.dataTable - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Pinecone Vector Store
@n8n/n8n-nodes-langchain.vectorStorePinecone - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches
From the author
This workflow synchronizes MySQL database table schemas with a vector database in a controlled, idempotent manner. Each database table is indexed as a single vector to preserve complete schema context for AI-based retrieval and reasoning. The workflow…