Ingestion de documents

Avancé

Ceci est unMiscellaneous, AI RAG, Multimodal AIworkflow d'automatisation du domainecontenant 28 nœuds.Utilise principalement des nœuds comme If, Form, Crypto, Switch, FormTrigger. Automatisation de l'ingestion de documents et du système RAG via Google Drive, Sheets et OpenAI

Prérequis
  • Informations d'identification Google Drive API
  • Informations d'identification Google Sheets API
  • Clé API OpenAI
  • Clé API Pinecone
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "E7mxB80W3c9Uweby",
  "meta": {
    "instanceId": "25cc25b200fc96ccf1fc82139ce77c996ff26ff830eec6163a8c6327ac3cf81f",
    "templateCredsSetupCompleted": true
  },
  "name": "IngestionDocs",
  "tags": [],
  "nodes": [
    {
      "id": "659f0ec6-ad2a-40c5-a34d-2e0b6458983f",
      "name": "Pinecone Stockage vectoriel",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        -1296,
        -880
      ],
      "parameters": {
        "mode": "insert",
        "options": {
          "pineconeNamespace": "={{ $('Loop Over Items').item.json.name }}"
        },
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "n8n-nodes",
          "cachedResultName": "n8n-nodes"
        }
      },
      "credentials": {
        "pineconeApi": {
          "id": "yfFfaoW2yv9fSOxK",
          "name": "PineconeApi account-Mohamed"
        }
      },
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "ee09bd49-c94e-49e4-8804-6e2bfb9c800e",
      "name": "Incorporations OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        -1440,
        -288
      ],
      "parameters": {
        "model": "=text-embedding-3-large",
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "K08FC4h7qYhGg8LO",
          "name": "OpenAi account-mohamed"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b9fe4362-9e36-49ac-ac65-229d87be4684",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        -1248,
        -352
      ],
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "file_id",
                "value": "={{ $('Loop Over Items').item.json.id }}"
              },
              {
                "name": "file_name",
                "value": "={{ $('Loop Over Items').item.json.name }}"
              }
            ]
          },
          "splitPages": true
        },
        "dataType": "binary"
      },
      "typeVersion": 1
    },
    {
      "id": "5215d6e4-d0c3-4fb4-b990-27bffaed58ab",
      "name": "Recursive Character Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        -1232,
        -176
      ],
      "parameters": {
        "options": {},
        "chunkOverlap": 10
      },
      "typeVersion": 1
    },
    {
      "id": "6f1fa97d-ae85-467e-a580-4a466a100dd1",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1776,
        -944
      ],
      "parameters": {
        "width": 596,
        "height": 256,
        "content": "## Generate the knowledge base\n"
      },
      "typeVersion": 1
    },
    {
      "id": "c64062de-4e0f-4c4a-b4c8-655c58599e5c",
      "name": "Rechercher fichiers et dossiers",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -3184,
        -880
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "list",
            "value": "1vQo4Er5h-4KEZoYCmHX-J4S9TRK5zpj-",
            "cachedResultUrl": "https://drive.google.com/drive/folders/1vQo4Er5h-4KEZoYCmHX-J4S9TRK5zpj-",
            "cachedResultName": "manuals"
          }
        },
        "options": {
          "fields": [
            "mimeType",
            "id",
            "name"
          ]
        },
        "resource": "fileFolder",
        "returnAll": true
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "SNZRUZHTrIWHcYnV",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "5efcafb7-c507-4a90-af5e-a6bc568704c6",
      "name": "Download file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -2480,
        -848
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "SNZRUZHTrIWHcYnV",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3,
      "alwaysOutputData": false
    },
    {
      "id": "aa951e91-0d95-4546-8050-f41bbb65ebbc",
      "name": "createHash",
      "type": "n8n-nodes-base.crypto",
      "position": [
        -2304,
        -864
      ],
      "parameters": {
        "type": "SHA256",
        "binaryData": true,
        "dataPropertyName": "hash"
      },
      "typeVersion": 1
    },
    {
      "id": "5de17e85-6fd2-4411-91d7-82e645dd637c",
      "name": "searchRecordManger",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2080,
        -880
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json.id }}",
              "lookupColumn": "Id"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HxJuA-ph6qvFmLzccKpM1XJeJHzELmvQzqJeqiRaC0U/edit#gid=0",
          "cachedResultName": "dataBase"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1HxJuA-ph6qvFmLzccKpM1XJeJHzELmvQzqJeqiRaC0U",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HxJuA-ph6qvFmLzccKpM1XJeJHzELmvQzqJeqiRaC0U/edit?usp=drivesdk",
          "cachedResultName": "recordManger"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "nZaANha3gFxGGxCB",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": true
    },
    {
      "id": "b6a4b15e-b0ac-490b-af1a-06d68d5c9929",
      "name": "Commutateur",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1984,
        -656
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "New Document",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "ff4d1294-192a-4f71-9983-53f0036c7d1c",
                    "operator": {
                      "type": "object",
                      "operation": "empty",
                      "singleValue": true
                    },
                    "leftValue": "={{ $('searchRecordManger').item.json }}",
                    "rightValue": ""
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Already processed",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "314d1d08-928b-42e3-839d-7948004d4229",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $('searchRecordManger').item.json.hashId }}",
                    "rightValue": "={{ $('createHash').item.json.hash }}"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Updated Document",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "68f55445-fe7e-4fa6-94af-081f2cae339e",
                    "operator": {
                      "type": "string",
                      "operation": "notEquals"
                    },
                    "leftValue": "={{ $('searchRecordManger').item.json.hashId }}",
                    "rightValue": "={{ $('createHash').item.json.hash }}"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "2e4f30bb-fcc1-4510-90b3-ac35d619ee2f",
      "name": "Boucler sur les éléments",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -2944,
        -896
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "d213ec9a-3b8d-4a84-b90e-eb9fa9310795",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3040,
        -960
      ],
      "parameters": {
        "width": 976,
        "height": 560,
        "content": "## Record Manger\n"
      },
      "typeVersion": 1
    },
    {
      "id": "f82520c5-8a45-455d-a2ac-faddc4a285b0",
      "name": "Add to Record Manger",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1712,
        -896
      ],
      "parameters": {
        "columns": {
          "value": {
            "Id": "={{ $('Loop Over Items').item.json.id }}",
            "name": "={{ $('Loop Over Items').item.json.name }}",
            "hashId": "={{ $('createHash').item.json.hash }}"
          },
          "schema": [
            {
              "id": "Id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "hashId",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "hashId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HxJuA-ph6qvFmLzccKpM1XJeJHzELmvQzqJeqiRaC0U/edit#gid=0",
          "cachedResultName": "dataBase"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1HxJuA-ph6qvFmLzccKpM1XJeJHzELmvQzqJeqiRaC0U",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HxJuA-ph6qvFmLzccKpM1XJeJHzELmvQzqJeqiRaC0U/edit?usp=drivesdk",
          "cachedResultName": "recordManger"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "nZaANha3gFxGGxCB",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "bcbb5938-630a-4a4e-aac1-ca88e09c2cc4",
      "name": "Pinecone Stockage vectoriel1",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        -1296,
        -560
      ],
      "parameters": {
        "mode": "insert",
        "options": {
          "clearNamespace": true,
          "pineconeNamespace": "={{ $('Loop Over Items').item.json.name }}"
        },
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "n8n-nodes",
          "cachedResultName": "n8n-nodes"
        }
      },
      "credentials": {
        "pineconeApi": {
          "id": "yfFfaoW2yv9fSOxK",
          "name": "PineconeApi account-Mohamed"
        }
      },
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "f82f9e5b-14bd-47bd-ab53-af6ba278ec71",
      "name": "Update the RecordManger",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1696,
        -576
      ],
      "parameters": {
        "columns": {
          "value": {
            "Id": "{{ $('Loop Over Items').item.json.id }}",
            "hashId": "{{ $('createHash').item.json.hash }}"
          },
          "schema": [
            {
              "id": "Id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "hashId",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "hashId",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HxJuA-ph6qvFmLzccKpM1XJeJHzELmvQzqJeqiRaC0U/edit#gid=0",
          "cachedResultName": "dataBase"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1HxJuA-ph6qvFmLzccKpM1XJeJHzELmvQzqJeqiRaC0U",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1HxJuA-ph6qvFmLzccKpM1XJeJHzELmvQzqJeqiRaC0U/edit?usp=drivesdk",
          "cachedResultName": "recordManger"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "nZaANha3gFxGGxCB",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a2d06bb3-fca2-474a-ae87-f86d0b81a140",
      "name": "Note adhésive3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1776,
        -640
      ],
      "parameters": {
        "width": 596,
        "height": 256,
        "content": "## Update the knowledge base\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d75115f8-e851-497e-8c74-99bbdd5c67cc",
      "name": "Download file1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1504,
        -880
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Loop Over Items').item.json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "SNZRUZHTrIWHcYnV",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "97fe85f4-cc36-4282-8482-b6c2c8d21377",
      "name": "Download file2",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1488,
        -560
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Loop Over Items').item.json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "SNZRUZHTrIWHcYnV",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "4c136bf8-ce5e-426e-803e-822dcd48ad0d",
      "name": "create",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -3504,
        -1024
      ],
      "parameters": {
        "event": "fileCreated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": "1vQo4Er5h-4KEZoYCmHX-J4S9TRK5zpj-",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1vQo4Er5h-4KEZoYCmHX-J4S9TRK5zpj-",
          "cachedResultName": "manuals"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "SNZRUZHTrIWHcYnV",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "afdb2eeb-1bbc-4e4e-b88c-b6b6edce4e3b",
      "name": "update",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -3488,
        -752
      ],
      "parameters": {
        "event": "fileUpdated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": "1vQo4Er5h-4KEZoYCmHX-J4S9TRK5zpj-",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1vQo4Er5h-4KEZoYCmHX-J4S9TRK5zpj-",
          "cachedResultName": "manuals"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "SNZRUZHTrIWHcYnV",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "53021a9d-b61e-4682-94d5-863b67a9c8cb",
      "name": "nonDownloadableFile",
      "type": "n8n-nodes-base.if",
      "position": [
        -2736,
        -832
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "49a912d3-7bc7-434a-93d0-52e66c9e1024",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.mimeType }}",
              "rightValue": "application/vnd.google-apps.folder"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "86d2c9f9-315b-47c7-a30e-1b48b331e446",
      "name": "Agent IA",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2528,
        80
      ],
      "parameters": {
        "text": "=question:{{ $json.Question }}",
        "options": {
          "systemMessage": "=You are a helpful Manual assistant designed to answer employee questions based on Knowledge base.\n\nRetrieve relevant information from the provided internal documents and provide a concise, accurate, and informative answer to the employee's question.\n\nUse the tool called \"Knowledge base\" to retrieve any information from the manuals documents.\n\nIf the answer cannot be found in the provided documents, respond with \"I cannot find the answer in the available resources.\"\n\nyou must a extract the correct page number.\n\noutput should be in HTML format with simple formatting."
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "f2a633af-f626-442a-b074-fd81a5ae5355",
      "name": "Modèle de chat OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -2720,
        384
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "K08FC4h7qYhGg8LO",
          "name": "OpenAi account-mohamed"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5322950e-63d1-43cd-868b-5fee9c5eb324",
      "name": "Form",
      "type": "n8n-nodes-base.form",
      "position": [
        -2032,
        80
      ],
      "webhookId": "213ef64f-84bc-46b5-b139-b7143427fb39",
      "parameters": {
        "options": {
          "customCss": ".container {\n  max-width: 800px; /* wider for readability */\n  margin: 20px auto;\n  padding: 0 16px;\n  font-family: var(--font-family);\n}\n\n.card {\n  background: var(--color-card-bg);\n  border: 1px solid var(--color-card-border);\n  border-radius: var(--card-border-radius);\n  padding: var(--card-padding);\n  margin-bottom: var(--card-margin-bottom);\n  box-shadow: var(--box-shadow-card);\n  text-align: left;\n  line-height: 1.6;\n}\n\n.card .header h1 {\n  font-size: var(--font-size-header);\n  font-weight: var(--font-weight-bold);\n  margin-bottom: 12px;\n  color: var(--color-header);\n  border-bottom: 2px solid var(--color-focus-border);\n  padding-bottom: 6px;\n}\n\n.card .header h2 {\n  font-size: var(--font-size-html-h2);\n  margin: 1em 0 0.5em;\n  color: var(--color-header);\n  font-weight: var(--font-weight-bold);\n}\n\n.card .header p {\n  margin: 0.5em 0 1em;\n  font-size: var(--font-size-paragraph);\n  color: var(--color-html-text);\n}\n\n.card .header ul {\n  margin: 0.5em 0 1em 20px;\n  padding-left: 16px;\n}\n\n.card .header ul li {\n  margin-bottom: 6px;\n  line-height: 1.5;\n  color: var(--color-html-text);\n}\n\n.card .header b {\n  color: var(--color-header);\n}\n\n.card .header a {\n  color: var(--color-html-link);\n  text-decoration: none;\n  transition: color 0.2s ease;\n}\n.card .header a:hover {\n  color: #ff3a2a;\n  text-decoration: underline;\n}\n\n/* Responsive improvements */\n@media (max-width: 600px) {\n  .container {\n    max-width: 100%;\n    padding: 0 12px;\n  }\n  .card {\n    padding: 16px;\n  }\n  .card .header h1 {\n    font-size: 18px;\n  }\n  .card .header h2 {\n    font-size: 16px;\n  }\n}\n"
        },
        "operation": "completion",
        "completionTitle": "Result",
        "completionMessage": "={{ $json.output }}"
      },
      "typeVersion": 1
    },
    {
      "id": "bf604a8c-ebbf-4941-9617-45e97f72a1a5",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -3040,
        96
      ],
      "webhookId": "c38dfae8-3e42-4c9f-9592-167895f92802",
      "parameters": {
        "options": {
          "customCss": ":root {\n\t--font-family: 'Open Sans', sans-serif;\n\t--font-weight-normal: 400;\n\t--font-weight-bold: 600;\n\t--font-size-body: 12px;\n\t--font-size-label: 14px;\n\t--font-size-test-notice: 12px;\n\t--font-size-input: 14px;\n\t--font-size-header: 20px;\n\t--font-size-paragraph: 14px;\n\t--font-size-link: 12px;\n\t--font-size-error: 12px;\n\t--font-size-html-h1: 28px;\n\t--font-size-html-h2: 20px;\n\t--font-size-html-h3: 16px;\n\t--font-size-html-h4: 14px;\n\t--font-size-html-h5: 12px;\n\t--font-size-html-h6: 10px;\n\t--font-size-subheader: 14px;\n\n\t/* Colors */\n\t--color-background: #fbfcfe;\n\t--color-test-notice-text: #e6a23d;\n\t--color-test-notice-bg: #fefaf6;\n\t--color-test-notice-border: #f6dcb7;\n\t--color-card-bg: #ffffff;\n\t--color-card-border: #dbdfe7;\n\t--color-card-shadow: rgba(99, 77, 255, 0.06);\n\t--color-link: #7e8186;\n\t--color-header: #525356;\n\t--color-label: #555555;\n\t--color-input-border: #dbdfe7;\n\t--color-input-text: #71747A;\n\t--color-focus-border: rgb(90, 76, 194);\n\t--color-submit-btn-bg: #ff6d5a;\n\t--color-submit-btn-text: #ffffff;\n\t--color-error: #ea1f30;\n\t--color-required: #ff6d5a;\n\t--color-clear-button-bg: #7e8186;\n\t--color-html-text: #555;\n\t--color-html-link: #ff6d5a;\n\t--color-header-subtext: #7e8186;\n\n\t/* Border Radii */\n\t--border-radius-card: 8px;\n\t--border-radius-input: 6px;\n\t--border-radius-clear-btn: 50%;\n\t--card-border-radius: 8px;\n\n\t/* Spacing */\n\t--padding-container-top: 24px;\n\t--padding-card: 24px;\n\t--padding-test-notice-vertical: 12px;\n\t--padding-test-notice-horizontal: 24px;\n\t--margin-bottom-card: 16px;\n\t--padding-form-input: 12px;\n\t--card-padding: 24px;\n\t--card-margin-bottom: 16px;\n\n\t/* Dimensions */\n\t--container-width: 448px;\n\t--submit-btn-height: 48px;\n\t--checkbox-size: 18px;\n\n\t/* Others */\n\t--box-shadow-card: 0px 4px 16px 0px var(--color-card-shadow);\n\t--opacity-placeholder: 0.5;\n}",
          "appendAttribution": false
        },
        "formTitle": "Ask Knowledge base",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Question",
              "requiredField": true
            }
          ]
        },
        "responseMode": "lastNode"
      },
      "typeVersion": 2.2
    },
    {
      "id": "22fee510-de3c-4e27-8f2e-29a2ca83beb3",
      "name": "Incorporations OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        -2448,
        576
      ],
      "parameters": {
        "model": "text-embedding-3-large",
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "K08FC4h7qYhGg8LO",
          "name": "OpenAi account-mohamed"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1e2d81fc-f70d-4f4a-879e-12e5cab1b54d",
      "name": "Pinecone Stockage vectoriel2",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        -2384,
        368
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "options": {
          "pineconeNamespace": "pinecorn-namespce"
        },
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "n8n-nodes",
          "cachedResultName": "n8n-nodes"
        },
        "toolDescription": "call this to get the information from knowledgeable "
      },
      "credentials": {
        "pineconeApi": {
          "id": "yfFfaoW2yv9fSOxK",
          "name": "PineconeApi account-Mohamed"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "6c49249f-d5db-451c-bdf2-8b2f813c674c",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3184,
        -64
      ],
      "parameters": {
        "width": 1488,
        "height": 800,
        "content": "## Ask Knowledge base"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "be0d8396-d94a-4e53-8c33-a2afca50bb99",
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "f82520c5-8a45-455d-a2ac-faddc4a285b0",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "f82f9e5b-14bd-47bd-ab53-af6ba278ec71",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4c136bf8-ce5e-426e-803e-822dcd48ad0d": {
      "main": [
        [
          {
            "node": "Search files and folders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "afdb2eeb-1bbc-4e4e-b88c-b6b6edce4e3b": {
      "main": [
        [
          {
            "node": "Search files and folders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "5322950e-63d1-43cd-868b-5fee9c5eb324",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "aa951e91-0d95-4546-8050-f41bbb65ebbc": {
      "main": [
        [
          {
            "node": "5de17e85-6fd2-4411-91d7-82e645dd637c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5efcafb7-c507-4a90-af5e-a6bc568704c6": {
      "main": [
        [
          {
            "node": "aa951e91-0d95-4546-8050-f41bbb65ebbc",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "d75115f8-e851-497e-8c74-99bbdd5c67cc": {
      "main": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "97fe85f4-cc36-4282-8482-b6c2c8d21377": {
      "main": [
        [
          {
            "node": "Pinecone Vector Store1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "53021a9d-b61e-4682-94d5-863b67a9c8cb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          },
          {
            "node": "Pinecone Vector Store1",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI1": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store2",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "bf604a8c-ebbf-4941-9617-45e97f72a1a5": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5de17e85-6fd2-4411-91d7-82e645dd637c": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b9fe4362-9e36-49ac-ac65-229d87be4684": {
      "ai_document": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_document",
            "index": 0
          },
          {
            "node": "Pinecone Vector Store1",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "53021a9d-b61e-4682-94d5-863b67a9c8cb": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "5efcafb7-c507-4a90-af5e-a6bc568704c6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f82520c5-8a45-455d-a2ac-faddc4a285b0": {
      "main": [
        [
          {
            "node": "d75115f8-e851-497e-8c74-99bbdd5c67cc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store": {
      "main": [
        []
      ]
    },
    "Pinecone Vector Store2": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "f82f9e5b-14bd-47bd-ab53-af6ba278ec71": {
      "main": [
        [
          {
            "node": "97fe85f4-cc36-4282-8482-b6c2c8d21377",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search files and folders": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5215d6e4-d0c3-4fb4-b990-27bffaed58ab": {
      "ai_textSplitter": [
        [
          {
            "node": "b9fe4362-9e36-49ac-ac65-229d87be4684",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Avancé - Divers, RAG IA, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds28
Catégorie3
Types de nœuds16
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur
Mohamed Abdelwahab

Mohamed Abdelwahab

@mohelwah

I’m an AI Automation Engineer with 5+ years of experience designing and implementing intelligent, scalable automation systems. I specialize in streamlining operations, reducing manual tasks, and building AI-powered solutions using Python, Node.js, and no-code/low-code platforms n8n. Whether you need to integrate complex APIs, build automated workflows, or deploy AI chatbots, I can deliver robust solutions tailored to your business needs. https://www.upwork.com/freelancers/~01bf6d0d89522ab95d

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34