{
  "name": "Inbox manager (GPT, Google Calendar & Supabase)",
  "nodes": [
    {
      "id": "7959f62a-c7bd-4c30-ba81-73fa5f120d48",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        500,
        -140
      ]
    },
    {
      "id": "cba3842f-57f3-43a5-a436-868c81712967",
      "name": "Text Classifier",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        780,
        -140
      ]
    },
    {
      "id": "28dbe8df-9fa6-47fa-9891-48a88d703021",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        780,
        40
      ]
    },
    {
      "id": "67aa2083-c8ef-4405-893e-53247b3ab6a2",
      "name": "Sales / Leads",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1220,
        -500
      ]
    },
    {
      "id": "7b27e516-9515-45fe-aa4c-709c3f761b47",
      "name": "Client Comm",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1220,
        -320
      ]
    },
    {
      "id": "7d7f705b-e6ab-4b2a-aafd-0cd9ad4225fb",
      "name": "Reports / Results",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1220,
        -140
      ]
    },
    {
      "id": "6a8339bb-3c7d-49ab-a03d-380d705d884b",
      "name": "Billing / Admin",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1220,
        40
      ]
    },
    {
      "id": "efb203a1-f643-40c2-81d0-da388d9c34bd",
      "name": "Other",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1220,
        220
      ]
    },
    {
      "id": "30468c6d-1b64-4953-a207-3f358b9c4910",
      "name": "Mark as Read3",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1440,
        220
      ]
    },
    {
      "id": "9c319421-1609-4d9b-875e-567ebc64f03d",
      "name": "Structured Output Parser2",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3020,
        -240
      ]
    },
    {
      "id": "9c150470-5d5a-4228-adc6-384ebce2c514",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2480,
        -480
      ],
      "parameters": {
        "width": 1120,
        "height": 940,
        "content": "# Check Knowledge Base + Draft Email"
      }
    },
    {
      "id": "7a1cdf33-7419-42cf-b8eb-05a29bf5512b",
      "name": "get_events",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        2820,
        -740
      ]
    },
    {
      "id": "90fbe187-df56-45a5-b0ee-6fb68b1e0fba",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3060,
        -860
      ]
    },
    {
      "id": "c634a163-41f4-4dba-81d9-d7b56e1252ca",
      "name": "Calendar Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2680,
        -1060
      ]
    },
    {
      "id": "4ae6b1e3-fc83-4bde-a9bc-49a18cf46b32",
      "name": "think_tool",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        2940,
        -800
      ]
    },
    {
      "id": "fc68e100-043b-4fb7-8388-1db3e5c07a9b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2480,
        -1180
      ],
      "parameters": {
        "width": 1120,
        "height": 640,
        "content": "# Check Calendar Availability + Draft Email"
      }
    },
    {
      "id": "fd8404b2-522e-480c-b882-8fc94239e88f",
      "name": "OpenAI Chat Model5",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2540,
        -840
      ]
    },
    {
      "id": "0c5ec3ff-1ad1-4d26-9340-f4ed1ff0846a",
      "name": "OpenAI Chat Model7",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1840,
        -280
      ]
    },
    {
      "id": "cf89e12e-6778-4c2f-8be1-6465a3afa9d7",
      "name": "Calendar or Email",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1840,
        -500
      ]
    },
    {
      "id": "db6386bf-32a6-4e61-ab47-9710011f20c7",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1440,
        -500
      ]
    },
    {
      "id": "0e016ea3-bfa9-4f2b-a096-64a34e936e82",
      "name": "Get Thread",
      "type": "n8n-nodes-base.code",
      "position": [
        1600,
        -500
      ]
    },
    {
      "id": "49dc5b26-b1e0-4969-82d2-eb0c91a631fe",
      "name": "Structured Output Parser6",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2020,
        -280
      ]
    },
    {
      "id": "85623967-3d14-49fe-ba1a-f0cd9b248d21",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        2160,
        -500
      ]
    },
    {
      "id": "1a05e73f-25d4-4689-8c67-78aebf86b2de",
      "name": "Gmail2",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3180,
        -1060
      ]
    },
    {
      "id": "b7176cee-5122-4c95-bf73-6aad17a2f643",
      "name": "Window Buffer Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        2680,
        -140
      ]
    },
    {
      "id": "2053b536-f8c1-4ab1-85ea-b2ec3532c401",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3020,
        80
      ]
    },
    {
      "id": "cec9545a-4f17-455b-be75-a894563424f0",
      "name": "Supabase Vector Store2",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        2660,
        100
      ]
    },
    {
      "id": "8908e09d-a7aa-48d8-a6fe-b85eec59233b",
      "name": "Embeddings OpenAI2",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        2680,
        280
      ]
    },
    {
      "id": "45bf5a88-9986-45dd-a6f5-3d1aa58aa9ee",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2500,
        -180
      ]
    },
    {
      "id": "07f2df75-ce13-425f-9fec-e8bf079975a0",
      "name": "Knowledge Database",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "position": [
        2800,
        -80
      ]
    },
    {
      "id": "a33d5b62-974b-492f-90da-647d657d51ba",
      "name": "Gmail3",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3260,
        -260
      ]
    },
    {
      "id": "acdac639-c864-46b3-8108-4fbbf917b738",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3460,
        -260
      ]
    },
    {
      "id": "f5cc67cf-5494-4779-ba92-b1f38f63314c",
      "name": "Telegram2",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3240,
        -440
      ]
    },
    {
      "id": "90e8a7e7-e944-4225-808e-5f7246a2d3ef",
      "name": "Inbox Bot",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3380,
        -1060
      ]
    },
    {
      "id": "623dd1d3-c4e0-4974-ae5d-c413fdc7f08a",
      "name": "Escalate?",
      "type": "n8n-nodes-base.if",
      "position": [
        3040,
        -400
      ]
    },
    {
      "id": "7551ab07-435c-4245-b1d8-5de3225cd7ba",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        -540
      ],
      "parameters": {
        "width": 1100,
        "height": 940,
        "content": "# Categorize incoming emails\n"
      }
    },
    {
      "id": "9457d233-f70d-4b4b-9fe2-6ca2469c8e21",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1580,
        -600
      ],
      "parameters": {
        "width": 880,
        "height": 540,
        "content": "# New lead? Send to calendar/knowledge agent"
      }
    },
    {
      "id": "149f284f-01ec-4910-9543-59766fc8c51e",
      "name": "Knowledge Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2660,
        -400
      ]
    },
    {
      "id": "07d606ce-4624-4a30-a7c2-3b72fb2994b9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4520,
        -1160
      ],
      "parameters": {
        "width": 860,
        "height": 840,
        "content": "## Example Draft + Telegram Notification\n![](https://i.imgur.com/ghJlqjU.png)\n\n![](https://i.imgur.com/nbIMIAZ.png)\n"
      }
    },
    {
      "id": "44ccb83b-6cdd-448e-b7ca-4a42bd6bc504",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3700,
        -1160
      ],
      "parameters": {
        "width": 800,
        "height": 360,
        "content": "## Example Customer Email\n![](https://i.imgur.com/JaS0BsG.png)"
      }
    },
    {
      "id": "ca2e568b-79af-48b6-8fff-f00daba40c84",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1820,
        60
      ],
      "parameters": {
        "width": 440,
        "height": 240,
        "content": "## Hey, I'm Abdul 👋\n### I build growth systems for consultants & agencies. If you want to work together or need help automating your business, check out my website: \n### **https://www.builtbyabdul.com"
      }
    },
    {
      "id": "606d1ce2-c0e4-4512-87c6-9d26af0ca2fb",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        -760
      ],
      "parameters": {
        "width": 780,
        "height": 1380,
        "content": "# AI Inbox Manager that categorizes emails, books calls, and replies automatically\n## Overview\nTurn your cluttered inbox into a smart, autonomous assistant that categorizes emails, replies to leads, c"
      }
    }
  ],
  "connections": {
    "Gmail": {
      "main": [
        [
          {
            "node": "Get Thread",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Other": {
      "main": [
        [
          {
            "node": "Mark as Read3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail2": {
      "main": [
        [
          {
            "node": "Inbox Bot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail3": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Calendar Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Knowledge Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Escalate?": {
      "main": [
        [
          {
            "node": "Telegram2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Gmail3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Thread": {
      "main": [
        [
          {
            "node": "Calendar or Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_events": {
      "ai_tool": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "think_tool": {
      "ai_tool": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Text Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sales / Leads": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calendar Agent": {
      "main": [
        [
          {
            "node": "Gmail2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Knowledge Agent": {
      "main": [
        [
          {
            "node": "Escalate?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text Classifier": {
      "main": [
        [
          {
            "node": "Sales / Leads",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Client Comm",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reports / Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Billing / Admin",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Other",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calendar or Email": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Text Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI2": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store2",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Knowledge Database": {
      "ai_tool": [
        [
          {
            "node": "Knowledge Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Knowledge Database",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Knowledge Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model5": {
      "ai_languageModel": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model7": {
      "ai_languageModel": [
        [
          {
            "node": "Calendar or Email",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Supabase Vector Store2": {
      "ai_vectorStore": [
        [
          {
            "node": "Knowledge Database",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser2": {
      "ai_outputParser": [
        [
          {
            "node": "Knowledge Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser6": {
      "ai_outputParser": [
        [
          {
            "node": "Calendar or Email",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}