Synchronize MySQL database schemas to Pinecone with OpenAI embeddings
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
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
What it does
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 prevents duplicate vectors and automatically handles schema changes by detecting differences and re-indexing only when required. How it works - The workflow starts with a manual trigger and loads global configuration values. - All database tables are discovered and processed one by one inside a loop. - For each table, a normalized schema representation is generated, and a deterministic hash is calculated. - A metadata table is checked to determine whether a vector already exists for the table. - If a vector exists, the stored schema hash is compared with the current hash to detect schema changes. - When a schema change is detected, the existing vector and metadata are deleted. - The updated table schema is embedded as a single vector (without chunking) and upserted into the vector database. - Vector identifiers and schema hashes are persisted for future executions. Setup steps - Set the MySQL database name using mysqldatabasename. - Configure the Pinecone index name using pineconeindex. - Set the vector namespace using vectornamespace. - Configure the Pinecone index host using vectorindexhost. - Add your Pinecone API key using pineconeapikey. - Select the embedding model using embeddingmodel. - Configure text processing options: - chunksize - chunkoverlap - Set the metadata table identifier using dataTableId. - Save and run the workflow manually to perform the initial schema synchronization. Limitations - This workflow indexes database table schemas only. Table data (rows) are not embedded or indexed. - Each table is stored as a single vector. Very large or highly complex schemas may approach model token limits depending on the selected embedding model. - Schema changes are detected using a hash-based comparison. Non-structural changes that do not affect the schema representation will not trigger re-indexing.