{
  "name": "AI-powered Gmail customer support with OpenRouter & Pinecone knowledge base",
  "nodes": [
    {
      "id": "c21b53e9-1422-4be5-b8aa-e6c9fe2f2ed4",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -48,
        240
      ]
    },
    {
      "id": "4ac4150d-8d4c-4d19-a4e9-9b4ad2bf6805",
      "name": "Text Classifier",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        160,
        240
      ]
    },
    {
      "id": "a141facb-644c-4d19-8fdc-44a17d9ee330",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        272,
        656
      ]
    },
    {
      "id": "b6e7d92c-fe48-4790-bb13-11242097a67e",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        608,
        416
      ]
    },
    {
      "id": "a279b9cc-00ff-4a81-b98e-139b77d960f0",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        560,
        32
      ]
    },
    {
      "id": "2f763a56-7c2d-4317-9df2-cb38d2176b9f",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        560,
        224
      ]
    },
    {
      "id": "f8d50a89-7a5c-4088-861c-ce238e42e908",
      "name": "knowledgeBase",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        864,
        272
      ]
    },
    {
      "id": "5c4edd48-ac92-4a2a-8261-40ecbe322df6",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        960,
        432
      ]
    },
    {
      "id": "e3b08b15-3e88-407c-91bb-1bef981acf48",
      "name": "Reply to a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1072,
        32
      ]
    },
    {
      "id": "93fe6d9e-3c6b-4980-a003-35cb603e7099",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -48
      ],
      "parameters": {
        "width": 400,
        "height": 592,
        "content": "## Gmail Trigger \n- How it Works: Listens for new incoming Gmail messages in real time.\n- Value: Automatically pulls new customer emails into the workflow without manual checking.\n- Credentials: Conne"
      }
    },
    {
      "id": "af395655-6228-4838-8aee-2bcba241dca0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        -48
      ],
      "parameters": {
        "width": 288,
        "height": 592,
        "content": "## Text Classifier\n- How it Works: Uses AI to classify emails into Customer Support or Other.\n- Value: Ensures only relevant customer support emails get a response.\n- Credentials: None required (uses "
      }
    },
    {
      "id": "3048d5d3-b301-4a79-a3ac-39bd57f99e10",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        560
      ],
      "parameters": {
        "width": 704,
        "height": 256,
        "content": "## OpenRouter Chat Model \n- How it Works: Provides AI-powered text generation for classification and responses.\n- Value: Enhances classification and helps prepare structured input for the agent.\n- Cre"
      }
    },
    {
      "id": "473c68ec-f0b0-4a2a-86ca-1abc25fa01e9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        -208
      ],
      "parameters": {
        "width": 464,
        "height": 208,
        "content": "## AI Agent \n- How it Works: Acts as a virtual support agent. It takes customer emails, retrieves policy/FAQ info, and drafts a helpful reply.\n- Value: Saves time by providing accurate, personalized, "
      }
    },
    {
      "id": "8ea803ef-4f38-4611-928e-fb3ddd833f45",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1152,
        272
      ],
      "parameters": {
        "width": 288,
        "height": 320,
        "content": "## KnowledgeBase \n- How it Works: Stores and retrieves your Database information.\n- Value: Ensures responses are consistent and based on verified knowledge.\n- Credentials: Connect your Pinecone API cr"
      }
    },
    {
      "id": "540a4355-c133-488b-b5c3-8b53a9417379",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        608
      ],
      "parameters": {
        "width": 560,
        "height": 208,
        "content": "## Embeddings (OpenAI)\n- How it Works: Converts FAQ text into embeddings so the AI can search and retrieve relevant information.\n- Value: Improves accuracy of answers by grounding responses in real da"
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Reply to a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Text Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "knowledgeBase": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Text Classifier": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "knowledgeBase",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Text Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}