{
  "name": "AI-powered email replies with spam filtering & FAQ lookup using GPT-4o mini & Pinecone",
  "nodes": [
    {
      "id": "d68e1936-eec7-4334-8317-70805c95b0ab",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        140,
        180
      ]
    },
    {
      "id": "0d136348-a945-43c0-bebe-1599f4aef1bd",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        80,
        360
      ]
    },
    {
      "id": "1f6e0331-b1e0-4450-a41a-acff7f0ccae6",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        240,
        360
      ]
    },
    {
      "id": "7af79daa-d3e0-4111-9005-0930debe0c03",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        380,
        360
      ]
    },
    {
      "id": "5b1779a5-1cf5-4660-ab6f-456de5f07137",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -1160,
        400
      ]
    },
    {
      "id": "a8fb6a4f-037f-42d0-b5a6-e14acef1bf8a",
      "name": "get_message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -880,
        400
      ]
    },
    {
      "id": "26dd84f5-99e5-4e53-acde-ebbdf8d889d0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1220,
        160
      ],
      "parameters": {
        "width": 1220,
        "height": 460,
        "content": "## Gmail input\n\nGmail trigger get the full email\nSpam checker is a Openai node with specific system prompt.\nIf the email is from services (google, microsoft, ecc) it considered as spam.\nIn this case t"
      }
    },
    {
      "id": "14915f5c-0375-46b8-90ee-c412a6b0e40c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 540,
        "height": 620,
        "content": "## AI Agent\n\nAI Agent get the message and respond to the email autonomously in base of contest.\nHere we have a vector store too, where you can add your data, like FAQ, product prices and so on"
      }
    },
    {
      "id": "09a0c5ca-6d4f-46ef-aa34-09b565f698f7",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        620
      ],
      "parameters": {
        "width": 540,
        "height": 300,
        "content": "## VECTOR STORE\n"
      }
    },
    {
      "id": "4a56b1ab-39d6-424c-a614-06febe5f5f63",
      "name": "Pinecone Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        200,
        680
      ]
    },
    {
      "id": "435fa9d9-cee9-4aad-a51b-25566a96b2af",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        60,
        800
      ]
    },
    {
      "id": "d0801a3b-d336-4e50-a8da-58ff218c3673",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -280,
        400
      ]
    },
    {
      "id": "ddea4fe7-e458-4949-aba5-57da659ab15c",
      "name": "Spam checker",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -640,
        400
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        []
      ]
    },
    "get_message": {
      "main": [
        [
          {
            "node": "Spam checker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Spam checker": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "get_message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}