{
  "name": "Smart email classifier & auto-responder with AI",
  "nodes": [
    {
      "id": "195a93cf-a96f-48f6-8859-5676f808583a",
      "name": "Sentiment Analysis",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        -360,
        -1680
      ]
    },
    {
      "id": "b723c3e9-10f8-463d-bd22-c79dda0c26b0",
      "name": "Azure OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        -940,
        -1300
      ]
    },
    {
      "id": "005bc73d-89e4-4fa1-b2f1-bd4c03953e7b",
      "name": "Spam",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -580,
        -1980
      ]
    },
    {
      "id": "574d56fd-bad6-4e94-94bd-a50ce782d239",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -380,
        -1980
      ]
    },
    {
      "id": "f33087a3-0624-4046-b8dd-59c52e136553",
      "name": "Important",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -80,
        -1980
      ]
    },
    {
      "id": "5eac42f2-4c6f-4d56-96be-884bff586aa3",
      "name": "Promotion",
      "type": "n8n-nodes-base.gmail",
      "position": [
        280,
        -1680
      ]
    },
    {
      "id": "ebffdbd3-158d-4ac0-b3d5-576888de850a",
      "name": "Notification",
      "type": "n8n-nodes-base.gmail",
      "position": [
        100,
        -1680
      ]
    },
    {
      "id": "c731ca19-0f80-425c-abe7-daa72921d4b0",
      "name": "Personal",
      "type": "n8n-nodes-base.gmail",
      "position": [
        480,
        -1680
      ]
    },
    {
      "id": "6aea58ec-7e76-4ac1-a8ad-bbd89b90c148",
      "name": "Call request",
      "type": "n8n-nodes-base.gmail",
      "position": [
        840,
        -1680
      ]
    },
    {
      "id": "803ccc0b-a092-4dea-b4ae-26fe986dc514",
      "name": "Needs Reply",
      "type": "n8n-nodes-base.gmail",
      "position": [
        660,
        -1680
      ]
    },
    {
      "id": "517bec35-ebfd-4fc3-8446-553b4987d726",
      "name": "important?",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        -960,
        -1960
      ]
    },
    {
      "id": "b3ed6d90-08fd-4c30-8655-9cd1207ce13f",
      "name": "Draft Reply",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -580,
        -1420
      ]
    },
    {
      "id": "39976e80-aeb5-416a-af06-76797ce83eda",
      "name": "$INPUTS$",
      "type": "n8n-nodes-base.set",
      "position": [
        -600,
        -1680
      ]
    },
    {
      "id": "0fee173a-4031-4b7e-a05a-da99a279f611",
      "name": "Draft",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        -360,
        -1200
      ]
    },
    {
      "id": "a263b61f-871d-4e86-bb8e-eb98f1f5260d",
      "name": "Get emails",
      "type": "n8n-nodes-base.gmailTool",
      "position": [
        -460,
        -1240
      ]
    },
    {
      "id": "dfe8bf62-8f16-4cba-85eb-440557283451",
      "name": "needs reply?",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        240,
        -1980
      ]
    },
    {
      "id": "710da104-10b8-4cdb-95a8-c7969898e605",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        720,
        -1960
      ]
    },
    {
      "id": "c9b6b19c-2de6-4766-90b7-2e47a168c4f9",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        700,
        -1300
      ]
    },
    {
      "id": "a0554154-1ca0-450f-b429-75b6a3b479de",
      "name": "Google Calendar",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        -560,
        -1200
      ]
    },
    {
      "id": "83a94679-424f-4378-8be8-2bfdfb9e28f1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        -2040
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "efb81140-83a8-475c-a8f2-b69d7a2d9bbb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -2040
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "12d1089a-091d-40e3-b12b-17d2152c6af9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -1760
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "772f089a-3a63-4195-98b0-ecb79ff65ea1",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        -1760
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "dc549de3-19d4-4b1f-b20b-d25fef6402e0",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -1760
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "82b70e0c-edd2-4abd-80d6-e3b2c8a4300c",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -940,
        -1680
      ]
    },
    {
      "id": "4268c088-d0a6-4342-affa-140c2fabb8cb",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        -1460
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "0501ba81-480d-4cea-9fa6-0552ab86adca",
      "name": "json schema",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -380,
        -1440
      ]
    },
    {
      "id": "e8e84173-60dc-4567-a4c9-e555f28ed1dd",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        -2320
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "8fcb7dbd-b117-4245-b09c-b6941d03e9cf",
      "name": "Write draft",
      "type": "n8n-nodes-base.gmail",
      "position": [
        100,
        -1300
      ]
    },
    {
      "id": "d2863b87-b083-4c2e-a3cb-e9cd2bec14d1",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        -1460
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "0ad8c055-c00d-45fd-a3cd-e087c7417f8f",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -2320
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "2d7acb3a-21b2-4373-805f-c975916e2084",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        260,
        -2320
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Spam": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Draft": {
      "ai_tool": [
        [
          {
            "node": "Draft Reply",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Gmail": {
      "main": [
        []
      ]
    },
    "$INPUTS$": {
      "main": [
        [
          {
            "node": "Sentiment Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Personal": {
      "main": [
        [
          {
            "node": "Draft Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Important": {
      "main": [
        [
          {
            "node": "needs reply?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Promotion": {
      "main": [
        [
          {
            "node": "important?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get emails": {
      "ai_tool": [
        [
          {
            "node": "Draft Reply",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "important?": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Important",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Draft Reply": {
      "main": [
        [
          {
            "node": "Write draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Needs Reply": {
      "main": [
        [
          {
            "node": "Draft Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write draft": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "json schema": {
      "ai_outputParser": [
        [
          {
            "node": "Draft Reply",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Call request": {
      "main": [
        [
          {
            "node": "Draft Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notification": {
      "main": [
        [
          {
            "node": "important?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "needs reply?": {
      "main": [
        [
          {
            "node": "Draft Reply",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "$INPUTS$",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Calendar": {
      "ai_tool": [
        [
          {
            "node": "Draft Reply",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Sentiment Analysis": {
      "main": [
        [
          {
            "node": "Spam",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Important",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Promotion",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notification",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Personal",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Call request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Needs Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Sentiment Analysis",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "important?",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Draft Reply",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "needs reply?",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}