{
  "name": "goldsmith rag app",
  "nodes": [
    {
      "parameters": {
        "public": true,
        "mode": "webhook",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "id": "4ae94cd3-518c-4f27-ac0c-7f6e61e4a750",
      "name": "When chat message received",
      "webhookId": "854c829c-2ce6-426f-89e2-ed44d33182f3"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "=## Role:\nYou are a friendly assistant for a goldsmith named **Gold Digger**.\n\n## Task:\nYou answer questions about the business.\n\n## Details:\nYou have access to various tools, which you use correctly.\n\n## Tools:\n- **goldsmith_q**  \n  Use this tool to answer questions with knowledge about the company.\n\n- **sheets**  \n  Use this tool to store contact information such as name, email, interestet in and phone number.\n\nAfter a customer asks about opening hours, products, location, or business information, ask them for their name, email, specific interests and phone number.\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.7,
      "position": [
        220,
        0
      ],
      "id": "83bf64ba-afc4-4713-9a2c-dbad50010b03",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o",
          "mode": "list",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        60,
        180
      ],
      "id": "b5c94e7d-6eb2-4249-8f25-95b010f61aae",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "mto8GpgTDXNCXksO",
          "name": "YT Test"
        }
      }
    },
    {
      "parameters": {
        "contextWindowLength": 12
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        180,
        180
      ],
      "id": "58d586e3-acb7-410b-8ee0-35582e381109",
      "name": "Window Buffer Memory"
    },
    {
      "parameters": {
        "name": "goldsmith_q",
        "description": "gives answers relatet to the company golddigger"
      },
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "typeVersion": 1,
      "position": [
        320,
        180
      ],
      "id": "f420164b-8625-426a-8504-2697191641d7",
      "name": "goldsmith_q"
    },
    {
      "parameters": {
        "pineconeIndex": {
          "__rl": true,
          "value": "goldsmith",
          "mode": "list",
          "cachedResultName": "goldsmith"
        },
        "options": {
          "pineconeNamespace": "Q&A"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "typeVersion": 1,
      "position": [
        240,
        340
      ],
      "id": "37fa2fca-167a-4682-ae12-bd1ce76d7f3c",
      "name": "Pinecone Vector Store",
      "credentials": {
        "pineconeApi": {
          "id": "aPWUpNX7BdyhgYmE",
          "name": "PineconeApi account 2"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o",
          "mode": "list",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        540,
        340
      ],
      "id": "d5302599-15f1-4df0-a89f-51456304c847",
      "name": "OpenAI Chat Model1",
      "credentials": {
        "openAiApi": {
          "id": "mto8GpgTDXNCXksO",
          "name": "YT Test"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        220,
        480
      ],
      "id": "989bb4c3-4a54-4482-aa19-5cf07a9071ab",
      "name": "Embeddings OpenAI",
      "credentials": {
        "openAiApi": {
          "id": "mto8GpgTDXNCXksO",
          "name": "YT Test"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1DAiF0d7ggLEV7jeVpyI11I70yWAoBKu1Y4ynVihSjtQ",
          "mode": "list",
          "cachedResultName": "Golddigger Leads",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DAiF0d7ggLEV7jeVpyI11I70yWAoBKu1Y4ynVihSjtQ/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Tabellenblatt1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DAiF0d7ggLEV7jeVpyI11I70yWAoBKu1Y4ynVihSjtQ/edit#gid=0"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Name', ``, 'string') }}",
            "Phone": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Phone', ``, 'string') }}",
            "Email": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Email', ``, 'string') }}",
            "Interestet in": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Interestet_in', ``, 'string') }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Name",
              "displayName": "Name",
              "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": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Interestet in",
              "displayName": "Interestet in",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.5,
      "position": [
        660,
        180
      ],
      "id": "f107c249-30a2-4983-a5d2-cbaab9054250",
      "name": "Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "bqJNeeTP15452iPi",
          "name": "Google Sheets account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Window Buffer Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "goldsmith_q": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store": {
      "ai_vectorStore": [
        [
          {
            "node": "goldsmith_q",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "goldsmith_q",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c5c2b60b-2873-4af6-92ff-5501f4b795c7",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "89d6b5241e3d0c6b62682a09a72213abeeffd34a6110f442c15fc0b560f12919"
  },
  "id": "UtshbTRxDjbhUJom",
  "tags": []
}