AutomationFlowsAI & RAG › RAG Faq Indexation

RAG Faq Indexation

rag_faq_indexation. Uses vectorStorePinecone, googleDrive, documentDefaultDataLoader, embeddingsOpenAi. Event-driven trigger; 8 nodes.

Event trigger★★★★☆ complexityAI-powered8 nodesPinecone Vector StoreGoogle DriveDocument Default Data LoaderOpenAI Embeddings
AI & RAG Trigger: Event Nodes: 8 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Documentdefaultdataloader → OpenAI Embeddings recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "rag_faq_indexation",
  "nodes": [
    {
      "parameters": {},
      "id": "5c675ea4-caae-4e44-8d9a-a5b8b3b791df",
      "name": "Manual Trigger - INDEXATION",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -384,
        560
      ]
    },
    {
      "parameters": {
        "language": "pythonNative",
        "pythonCode": "import json\nfrom datetime import datetime\n\n# Transformer chaque Q&A en format pour Pinecone\nresult = []\nfor index, item in enumerate(_items[0]['json']['data']):\n    question = item.get('question', '')\n    answer = item.get('answer', '')\n    \n    result.append({\n        'json': {\n            'pageContent': f'Question: {question}\\n\\nR\u00e9ponse: {answer}',\n            'metadata': {\n                'id': f'faq_{index}',\n                'question': question,\n                'answer': answer,\n                'indexed_at': datetime.utcnow().isoformat() + 'Z'\n            }\n        }\n    })\n\nreturn result"
      },
      "id": "bb9851fc-9a6f-40a8-8e57-1800562be495",
      "name": "Formater pour Pinecone",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        272,
        560
      ]
    },
    {
      "parameters": {
        "mode": "insert",
        "pineconeIndex": {
          "__rl": true,
          "value": "rag-tagheuer",
          "mode": "list",
          "cachedResultName": "rag-tagheuer"
        },
        "options": {}
      },
      "id": "73ad2d07-3c77-4725-8cc2-15cb0954a5f3",
      "name": "Ins\u00e9rer dans Pinecone",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "typeVersion": 1,
      "position": [
        496,
        560
      ],
      "credentials": {
        "pineconeApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "result",
              "name": "result",
              "value": "={{ `Indexation termin\u00e9e: ${$input.all().length} documents ins\u00e9r\u00e9s dans Pinecone` }}",
              "type": "string"
            },
            {
              "id": "index_name",
              "name": "index_name",
              "value": "faq-tagheuer",
              "type": "string"
            },
            {
              "id": "namespace",
              "name": "namespace",
              "value": "connected",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "8ab0f5cb-a3a9-49b2-8595-8150461e19c2",
      "name": "R\u00e9sultat indexation",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.3,
      "position": [
        848,
        560
      ]
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "1DSAxdAnx4lRJYwbHNWpeGbeXxsHtJHTl",
          "mode": "list",
          "cachedResultName": "faq.json",
          "cachedResultUrl": "https://drive.google.com/file/d/1DSAxdAnx4lRJYwbHNWpeGbeXxsHtJHTl/view?usp=drivesdk"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -176,
        560
      ],
      "id": "4723e421-b876-4b55-9fc4-308d90c0c455",
      "name": "Download file",
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "fromJson",
        "options": {}
      },
      "type": "n8n-nodes-base.extractFromFile",
      "typeVersion": 1.1,
      "position": [
        16,
        560
      ],
      "id": "a79614ca-1eb0-4f69-8106-1998f9cb9f7f",
      "name": "Extract from File"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        688,
        768
      ],
      "id": "eba6b9ee-a910-48a3-b5bd-03742823cd08",
      "name": "Default Data Loader"
    },
    {
      "parameters": {
        "model": "text-embedding-3-small",
        "options": {}
      },
      "id": "486426ac-aafb-4728-a222-aae8f88cb8ab",
      "name": "OpenAI Embeddings (Indexation)",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1,
      "position": [
        496,
        768
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Formater pour Pinecone": {
      "main": [
        [
          {
            "node": "Ins\u00e9rer dans Pinecone",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ins\u00e9rer dans Pinecone": {
      "main": [
        [
          {
            "node": "R\u00e9sultat indexation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger - INDEXATION": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Formater pour Pinecone",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Ins\u00e9rer dans Pinecone",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Embeddings (Indexation)": {
      "ai_embedding": [
        [
          {
            "node": "Ins\u00e9rer dans Pinecone",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "c4a5369a-52b8-4d2e-a296-8d3f62e563cb",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "wzqzhTh4f9d04Plz",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

rag_faq_indexation. Uses vectorStorePinecone, googleDrive, documentDefaultDataLoader, embeddingsOpenAi. Event-driven trigger; 8 nodes.

Source: https://github.com/akira-dev/n8n-workflows/blob/main/workflows/rag_faq_indexation.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This advanced n8n workflow automates the full lead enrichment, qualification, and personalized outreach process tailored specifically for the B2B real estate sector. Integrating top platforms like Api

N8N Nodes Fillout, OpenAI Chat, Pinecone Vector Store +11
AI & RAG

This n8n template automatically classifies incoming emails (Sales, Support, Internal, Finance, Promotions) and routes them to a dedicated OpenAI LLM Agent for processing. Depending on the category, th

OpenAI, Gmail, Text Classifier +16
AI & RAG

Automate Outreach Prospect automates finding, enriching, and messaging potential partners (like restaurants, malls, and bars) using Apify Google Maps scraping, Perplexity enrichment, OpenAI LLMs, Goog

@Devlikeapro/N8N Nodes Waha, Google Drive Trigger, @Apify/N8N Nodes Apify +14
AI & RAG

This workflow automates the early-stage job application process using AI.

Pinecone Vector Store, Document Default Data Loader, Google Drive +9
AI & RAG

This workflow builds a WhatsApp business assistant that uses OpenAI to classify incoming messages and route them to FAQ answers via Pinecone RAG, order placement and inventory updates in Google Sheets

WhatsApp Trigger, OpenAI, Agent +12