{
  "name": "rag assingment 2nd step",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "88b5f849-2060-40d3-807b-cae0cadd00da",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -176,
        -16
      ],
      "id": "3fb7966b-6822-4b4f-b026-18718fcb4b5f",
      "name": "Webhook",
      "webhookId": "88b5f849-2060-40d3-807b-cae0cadd00da"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $('Webhook').item.json.body.query }}",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3,
      "position": [
        288,
        0
      ],
      "id": "c9baa0b1-3e90-427c-8225-e90c9759e645",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolDescription": "Vector index for retrieving the most relevant context from my stored knowledge data to generate accurate query responses.\n",
        "pineconeIndex": {
          "__rl": true,
          "value": "ragagentassingment",
          "mode": "list",
          "cachedResultName": "ragagentassingment"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "typeVersion": 1.3,
      "position": [
        352,
        208
      ],
      "id": "0eafb0df-e0a6-4eb2-9fa1-a51a40eb0d89",
      "name": "Pinecone Vector Store",
      "credentials": {
        "pineconeApi": {
          "id": "baP0D0SAQuv2glU9",
          "name": "PineconeApi account"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        416,
        352
      ],
      "id": "634130e2-e906-4b5b-a018-394e5a6533cd",
      "name": "Embeddings OpenAI",
      "credentials": {
        "openAiApi": {
          "id": "HkDRRpCsGg0lfiqp",
          "name": "n8n free OpenAI API credits"
        }
      }
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        208,
        256
      ],
      "id": "19d43227-683f-49bc-b357-665b8c84c26f",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "jsCode": "return {\n  json: {\n    // Session ID generate\n    sessionId: $json.email || \"session_\" + Math.floor(Math.random() * 1000000),\n    \n    // Form data pass through\n    name: $json.name,\n    email: $json.email,\n    phone: $json.phone,\n    query: $json.query\n  }\n};\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        80,
        0
      ],
      "id": "b9a02e92-0881-4391-bf2b-22d89c318fad",
      "name": "Code in JavaScript"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        48,
        256
      ],
      "id": "3ca6d11c-175e-40d6-a156-7bc04ea1f5ac",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "id": "HCQhacli5wTEbIhu",
          "name": "Google Gemini(PaLM) Api account"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "={{ $('Webhook').item.json.body.email }}",
        "subject": "=subject for  {{ $('Webhook').item.json.body.query }}",
        "emailType": "text",
        "message": "={{ $json.output }}",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        608,
        0
      ],
      "id": "e1c4c4c6-64ae-4ee2-ac95-aedc413e31a4",
      "name": "Send a message",
      "webhookId": "7ee8cfca-76b3-4092-83e4-49e23fb655e9",
      "credentials": {
        "gmailOAuth2": {
          "id": "R8TgzWpWsfgFa2Sw",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "199TgtOs_Rrbm85DPssqIyQBzHiytjhf0jQKiFtnlY4w",
          "mode": "list",
          "cachedResultName": "rag assignment",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/199TgtOs_Rrbm85DPssqIyQBzHiytjhf0jQKiFtnlY4w/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/199TgtOs_Rrbm85DPssqIyQBzHiytjhf0jQKiFtnlY4w/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "email": "={{ $('Webhook').item.json.body.email }}",
            "name": "={{ $('Webhook').item.json.body.name }}",
            "Phone": "={{ $('Webhook').item.json.body.phone }}",
            "Query": "={{ $('Webhook').item.json.body.query }}",
            "answer": "={{ $('AI Agent').item.json.output }}",
            "Session ID": "={{ $('Code in JavaScript').item.json.sessionId }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "displayName": "email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "displayName": "Phone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Query",
              "displayName": "Query",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Session ID",
              "displayName": "Session ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "answer",
              "displayName": "answer",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        784,
        0
      ],
      "id": "2ed724f5-c01b-491e-bc44-8c37005e08eb",
      "name": "Append row in sheet",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "f9BRGOktAvZZEryX",
          "name": "Google Sheets account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send a message": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "bd04b871-b8dc-4e5e-a5c1-2638d66d95b9",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "a19c52f92398ea0db5a67599816461654cd402b9687cb160ef09d67f99f3c2a7"
  },
  "id": "PjXhJ8IuJQdoTny5",
  "tags": []
}































{

  "name": "rag agent assignment 1s step",
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "value": "1Jvax6zgep3lTBGVDoLS1_Zgu_kuxxkYv",
          "mode": "list",
          "cachedResultName": "my project",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1Jvax6zgep3lTBGVDoLS1_Zgu_kuxxkYv"
        },
        "event": "fileCreated",
        "options": {}
      },
      "type": "n8n-nodes-base.googleDriveTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "9b65da3f-9497-41cc-9bd5-68585abdd765",
      "name": "Google Drive Trigger",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "NC7iyBr0Otwhx1tn",
          "name": "Google Drive account"
        }
      }
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "={{ $json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        208,
        0
      ],
      "id": "37e6a0f5-456f-43b5-80c8-fd24c1f07b1f",
      "name": "Download file",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "NC7iyBr0Otwhx1tn",
          "name": "Google Drive account"
        }
      }
    },
    {
      "parameters": {
        "mode": "insert",
        "pineconeIndex": {
          "__rl": true,
          "value": "ragagentassingment",
          "mode": "list",
          "cachedResultName": "ragagentassingment"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "typeVersion": 1.3,
      "position": [
        416,
        0
      ],
      "id": "dab92a87-7254-4dcb-bff0-a70247b6851a",
      "name": "Pinecone Vector Store",
      "credentials": {
        "pineconeApi": {
          "id": "baP0D0SAQuv2glU9",
          "name": "PineconeApi account"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        432,
        160
      ],
      "id": "e2342dc6-bc38-4ff8-b6fb-3981132cea80",
      "name": "Embeddings OpenAI",
      "credentials": {
        "openAiApi": {
          "id": "HkDRRpCsGg0lfiqp",
          "name": "n8n free OpenAI API credits"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "typeVersion": 1.1,
      "position": [
        560,
        208
      ],
      "id": "8822ae6b-ba6a-47dc-ae21-88d0c7577b68",
      "name": "Default Data Loader"
    }
  ],
  "pinData": {},
  "connections": {
    "Google Drive Trigger": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1368b819-9a7d-45ed-be41-21a42afaf986",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "a19c52f92398ea0db5a67599816461654cd402b9687cb160ef09d67f99f3c2a7"
  },
  "id": "zNFNPcinHp0LFXuK",
  "tags": []
}







Comments

Popular posts from this blog

server not responce

privacy policy