Sync PostgreSQL data to a Pinecone vector knowledge base using Gemini embeddings
Ready for 3.0What this workflow does
This workflow has 12 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Postgres.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Workflow Configuration (Edit Fields (Set)): sets 20 fields: sourceName, allowedSchemas, allowedTables…
- Discover PostgreSQL Metadata (Postgres): run a query
- Filter Indexable Tables (Code): runs custom JavaScript code
- Fetch Table Rows (Postgres): run a query
- Build Embedding Documents (Code): runs custom JavaScript code
- Prepare Gemini Embedding Batches (Code): runs custom JavaScript code
- Generate Gemini Embeddings (HTTP Request): calls an HTTP API (POST)
- Prepare Pinecone Upsert Batches (Code): runs custom JavaScript code
- Upsert Vectors to Pinecone (HTTP Request): calls an HTTP API (POST)
- Return Sync Summary (Code): runs custom JavaScript code
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 (6)
- Manual Trigger
n8n-nodes-base.manualTrigger - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Postgres
n8n-nodes-base.postgres - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest
From the author
PostgreSQL Auto-Discovery to Pinecone Vector Knowledge Base Turn existing PostgreSQL databases into AI-searchable Pinecone vector knowledge bases without manually defining every table and column. This template discovers your PostgreSQL schema, selects…