{
  "name": "Automatically classify and label Gmail emails with Google Gemini AI",
  "nodes": [
    {
      "id": "0226578d-4741-42f2-8a7b-c750f75be78d",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "48d0ee27-d4d6-4db4-843c-d9c18b934945",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        220,
        320
      ]
    },
    {
      "id": "d7e8bed4-cadc-41e3-b793-cc8affb177cc",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1420,
        60
      ]
    },
    {
      "id": "3b5cabb7-346f-4b69-b3f4-c61e78e2d8c7",
      "name": "Groq Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        1440,
        180
      ]
    },
    {
      "id": "43984fb2-7a26-4e13-95ee-c29f0d9f2f24",
      "name": "Gmail3",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1780,
        60
      ]
    },
    {
      "id": "c269ec5e-f882-4458-ab52-46b719731309",
      "name": "Classification Agent",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        240,
        0
      ]
    },
    {
      "id": "17be38df-c225-4d19-81ec-e205ff4b9f3c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        260
      ],
      "parameters": {
        "width": 300,
        "height": 80,
        "content": "### 2) Change to your desire LLMs"
      }
    },
    {
      "id": "3e8ac267-c2ac-49cb-ad53-536510faa1a4",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "### 1) Change to your gmail's credential"
      }
    },
    {
      "id": "f5e2c92d-3335-4ed0-915e-f7edeb0b5a92",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        -380
      ],
      "parameters": {
        "width": 340,
        "height": null,
        "content": "### 3) Login to your gmail inbox\n* Create a label with \"+\" icon\n* Change the color of your choice"
      }
    },
    {
      "id": "4a8a7424-f9dd-42b1-b803-5d0dbe076956",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        -160
      ],
      "parameters": {
        "width": 320,
        "height": null,
        "content": "### 4) Agent instruction\n* Input the category name that you just created in gmail.\n* Description = Tell agent about how should it classify your email. Keywords can be useful to let your agent classify"
      }
    },
    {
      "id": "24c7ef4e-7a68-4240-980b-02b994300084",
      "name": "Add Label Promotion",
      "type": "n8n-nodes-base.gmail",
      "position": [
        700,
        200
      ]
    },
    {
      "id": "759f8cbe-4674-49e5-a52b-2acf208ffb22",
      "name": "Add Label (KS Work Related)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        700,
        0
      ]
    },
    {
      "id": "d07fe962-16c0-401a-b194-5ce7e6ad9746",
      "name": "Add Label (High Priority)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        700,
        -200
      ]
    },
    {
      "id": "7d0c9bd5-6150-4afa-9344-8bb3c1a6b01c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        660,
        -320
      ],
      "parameters": {
        "width": 320,
        "height": null,
        "content": "### 5) Add Label Nodes\n* In this option \"Label Names or IDs\" -> Select the category to match with the Classification Agent Node."
      }
    },
    {
      "id": "d57ecacb-a479-4bf7-b9b4-b9e14e30dcd7",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        980,
        60
      ],
      "parameters": {
        "width": 220,
        "height": null,
        "content": "### 6) Add-on\n* You can add more category of your choice!"
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Gmail3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Classification Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Classification Agent": {
      "main": [
        [
          {
            "node": "Add Label (High Priority)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add Label (KS Work Related)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add Label Promotion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Classification Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Add Label (KS Work Related)": {
      "main": [
        []
      ]
    }
  }
}