{
  "name": "Generate & send spare parts price quotes with Gmail, Sheets and Gemini AI",
  "nodes": [
    {
      "id": "a2278b8f-037c-4c94-a1cc-d5ab7df7351d",
      "name": "Welcome & Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2500,
        -600
      ],
      "parameters": {
        "width": 400,
        "height": 580,
        "content": "# 🚀 Automated Quote Generator Workflow\n\n## Overview\nThis workflow automatically:\n1. **Monitors Gmail** for spare parts requests\n2. **Identifies** requests using keyword detection\n3. **Generates** prof"
      }
    },
    {
      "id": "52c6ee3a-5a2f-48b8-8f44-26e58ffed046",
      "name": "Google Sheets Structure",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2060,
        0
      ],
      "parameters": {
        "width": 400,
        "height": 600,
        "content": "## 📊 Required Google Sheets Structure\n\n### Sheet 1: CRM Data\n**Columns Required:**\n- `Email` - Customer email addresses\n- `ProjectCode` - Project codes\n- `CustomerName` - Customer names\n- Other custom"
      }
    },
    {
      "id": "6100cf53-becc-46d5-b71b-40949c36db03",
      "name": "Configuration Steps",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2060,
        -600
      ],
      "parameters": {
        "width": 400,
        "height": 580,
        "content": "## ⚙️ Configuration Steps\n\n### 1. Gmail OAuth2\n- Go to Google Cloud Console\n- Create OAuth2 credentials\n- Add Gmail API scopes\n- Configure in n8n Credentials\n\n### 2. Google Sheets OAuth2\n- Use same Go"
      }
    },
    {
      "id": "8c96701c-e2b6-4fcb-ba7d-1713f2a20581",
      "name": "Keyword Detection Info",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        -500
      ],
      "parameters": {
        "width": 320,
        "height": 580,
        "content": "## 🔍 Keyword Detection\n\nThis node checks for spare parts keywords:\n- **Turkish:** \"yedek parça\"\n- **German:** \"Ersatzteile\", \"Ersatzteil\"\n- **English:** \"spare parts\"\n\nAdd more keywords as needed for "
      }
    },
    {
      "id": "529c5508-ecac-458c-aaa4-4ca2a168ab69",
      "name": "Email Reply Flow",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -500
      ],
      "parameters": {
        "width": 480,
        "height": 520,
        "content": "## 📧 Email Reply Flow\n\n1. **Gmail node** sends the HTML quote as a reply\n2. **Gmail2 node** marks the original email as read\n\nThis ensures clean inbox management and tracking."
      }
    },
    {
      "id": "9548c3df-9a99-432e-a7eb-caf2ffa7ef87",
      "name": "IMPORTANT: Replace Sheet IDs",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -840,
        320
      ],
      "parameters": {
        "width": 600,
        "height": 280,
        "content": "## 📋 Replace These IDs\n\n**CRM Sheet ID:**\n`YOUR_CRM_SHEET_ID_HERE`\n\n**BoM Sheet ID:**\n`YOUR_BOM_SHEET_ID_HERE`\n\n**Price Sheet ID:**\n`YOUR_PRICE_SHEET_ID_HERE`\n\nFind your Sheet ID in the URL:\n`docs.goo"
      }
    },
    {
      "id": "b8baf40e-d608-4bea-9545-98a8e864812f",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1560,
        -100
      ]
    },
    {
      "id": "0aae0d92-b5eb-4dee-be35-4af1f80a9d67",
      "name": "Gmail - Get Latest Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -1360,
        -100
      ]
    },
    {
      "id": "37e455aa-3869-43de-848d-ef118537b75c",
      "name": "Check Spare Parts Keywords",
      "type": "n8n-nodes-base.if",
      "position": [
        -1060,
        -100
      ]
    },
    {
      "id": "23f8304b-b324-476b-a95b-f94d3bd2a862",
      "name": "AI Agent - Quote Generator",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -780,
        -240
      ]
    },
    {
      "id": "42c482fc-bfea-460a-aec1-acb8784521ec",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -820,
        0
      ]
    },
    {
      "id": "90ce437d-148b-4357-a60b-216386bf895f",
      "name": "CRM - Customer Data",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        -600,
        140
      ]
    },
    {
      "id": "2ec1332d-ab34-481c-b142-16d6843495a2",
      "name": "BoM - Bill of Materials",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        -480,
        140
      ]
    },
    {
      "id": "91609c5b-55a1-4a9c-bb48-f1a239dd5d0d",
      "name": "Price - Pricing Data",
      "type": "n8n-nodes-base.googleSheetsTool",
      "position": [
        -360,
        140
      ]
    },
    {
      "id": "a934e309-59d7-4c10-a522-6ef1daea4c08",
      "name": "Calculator Tool",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "position": [
        -720,
        160
      ]
    },
    {
      "id": "a5c22593-8079-4254-b1e3-a977412140b8",
      "name": "Gmail - Send Reply",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -100,
        -240
      ]
    },
    {
      "id": "4033dcb4-31d7-403f-9f45-8adf6eeac8ac",
      "name": "Gmail - Mark as Read",
      "type": "n8n-nodes-base.gmail",
      "position": [
        120,
        -240
      ]
    }
  ],
  "connections": {
    "Calculator Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent - Quote Generator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Gmail - Get Latest Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Send Reply": {
      "main": [
        [
          {
            "node": "Gmail - Mark as Read",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CRM - Customer Data": {
      "ai_tool": [
        [
          {
            "node": "AI Agent - Quote Generator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Price - Pricing Data": {
      "ai_tool": [
        [
          {
            "node": "AI Agent - Quote Generator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "BoM - Bill of Materials": {
      "ai_tool": [
        [
          {
            "node": "AI Agent - Quote Generator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Get Latest Email": {
      "main": [
        [
          {
            "node": "Check Spare Parts Keywords",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent - Quote Generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent - Quote Generator": {
      "main": [
        [
          {
            "node": "Gmail - Send Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Spare Parts Keywords": {
      "main": [
        [
          {
            "node": "AI Agent - Quote Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}