{
  "name": "Upload Brochures to Pinecone (Manual Trigger)",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        384
      ],
      "id": "a877aa7e-ec36-416a-9562-7bb26a5182f1",
      "name": "When clicking 'Execute workflow'"
    },
    {
      "parameters": {
        "resource": "fileFolder",
        "filter": {
          "folderId": {
            "__rl": true,
            "value": "1tBBELUsZGzrlK4jXNp_EAt7owmRYEwOL",
            "mode": "list",
            "cachedResultName": "brochures",
            "cachedResultUrl": "https://drive.google.com/drive/folders/1tBBELUsZGzrlK4jXNp_EAt7owmRYEwOL"
          }
        },
        "options": {
          "fields": [
            "id",
            "name",
            "mimeType"
          ]
        }
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        224,
        384
      ],
      "id": "1b1dd686-b04b-43df-8f43-6d1d3672119f",
      "name": "List Brochures in Folder",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        448,
        384
      ],
      "id": "4d5eb993-a242-435d-8f2a-76c10c29e652",
      "name": "Download Each Brochure",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "insert",
        "pineconeIndex": {
          "__rl": true,
          "value": "course-brochures",
          "mode": "list",
          "cachedResultName": "course-brochures"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "typeVersion": 1.3,
      "position": [
        704,
        352
      ],
      "id": "e735369d-f8b8-48a9-9e2b-50f50b48881b",
      "name": "Pinecone Vector Store (Insert)",
      "credentials": {
        "pineconeApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "dataType": "binary",
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "source",
                "value": "={{ $('Download Each Brochure').item.json.name }}"
              },
              {
                "name": "file_id",
                "value": "={{ $('Download Each Brochure').item.json.id }}"
              }
            ]
          }
        },
        "textSplittingMode": "custom"
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        848,
        576
      ],
      "id": "ef565223-ee07-4e3e-96e0-8e4d1c1d1ad9",
      "name": "Default Data Loader"
    },
    {
      "parameters": {
        "content": "## Manual ingestion \u2192 Pinecone (whole-brochure chunks)\n\n1. Upload the 20 brochures to a Google Drive folder.\n2. Set the folder ID in **List Brochures in Folder**.\n3. Pick your Google Drive, Pinecone & Gemini credentials.\n4. In Pinecone, create an index named `course-brochures` with **dimension 3072** (Gemini `gemini-embedding-001` embeddings) and metric **cosine**.\n5. **If re-ingesting: delete all existing records/namespaces in the index first** to avoid duplicates and leftovers.\n6. Click **Execute workflow**. Each brochure is embedded as ONE vector into the DEFAULT namespace \u2192 20 records; the CX agent retrieves from the default namespace too (no namespace set on either side).",
        "height": 300,
        "width": 380,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "ce3fa488-6de4-4ea2-89ad-7b9ab6ebf0c5",
      "name": "Sticky Note"
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
      "typeVersion": 1,
      "position": [
        624,
        560
      ],
      "id": "ca853f09-2e33-4c00-b2cd-617264118707",
      "name": "Embeddings Google Gemini",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "chunkSize": 4000,
        "chunkOverlap": 0,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "typeVersion": 1,
      "position": [
        908,
        776
      ],
      "id": "f3a1c2d4-5e6b-4a7c-8d9e-0f1a2b3c4d5e",
      "name": "Whole-Brochure Splitter"
    }
  ],
  "connections": {
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "List Brochures in Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List Brochures in Folder": {
      "main": [
        [
          {
            "node": "Download Each Brochure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Each Brochure": {
      "main": [
        [
          {
            "node": "Pinecone Vector Store (Insert)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Pinecone Vector Store (Insert)",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Google Gemini": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store (Insert)",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Whole-Brochure Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "ec85d140-ac10-4c9c-af49-3823fe5baf9e",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodeGroups": [],
  "id": "Zc9GwbM4XLxsIrP4",
  "tags": [
    {
      "name": "RAG Ingestion",
      "id": "Hc40RYGjq5G8o6P7",
      "updatedAt": "2026-07-02T12:28:31.028Z",
      "createdAt": "2026-07-02T12:28:31.028Z"
    }
  ]
}