{
  "name": "Automate email triage & meeting scheduling with Gmail, GPT-4 & Google Calendar",
  "nodes": [
    {
      "id": "3fae9082-b21d-4251-92e1-2361d9803ec8",
      "name": "Function Node: Parse Email Content",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        32
      ]
    },
    {
      "id": "116f79fd-ce8d-4b66-bd3d-7083bfe5570a",
      "name": "Message a model",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1104,
        -144
      ]
    },
    {
      "id": "e2927aab-b7a2-4897-896a-915933150257",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -96,
        -96
      ]
    },
    {
      "id": "494647f1-82f4-485d-990b-d70a3a4e5393",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        1584,
        0
      ]
    },
    {
      "id": "aa514acf-6fa0-4460-843f-f1fa67a16541",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1424,
        16
      ]
    },
    {
      "id": "33d04a4a-fdd8-41fd-a9f8-bf5a1f1a45e0",
      "name": "Get row(s) in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        240,
        -224
      ]
    },
    {
      "id": "d639f63f-a53d-47be-b11c-a372cf2a4b8e",
      "name": "Merge (Allowed)",
      "type": "n8n-nodes-base.merge",
      "position": [
        496,
        -160
      ]
    },
    {
      "id": "501cead7-0f59-49f0-b15e-ba81be8c0862",
      "name": "Create an event",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        1872,
        -176
      ]
    },
    {
      "id": "899ee580-3458-4196-8f18-3bf4896a3ade",
      "name": "Personalize AI Reply",
      "type": "n8n-nodes-base.code",
      "position": [
        2128,
        -112
      ]
    },
    {
      "id": "fbe4b687-adda-4403-bdb4-0b542d7a901f",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1872,
        560
      ]
    },
    {
      "id": "bc8533fd-78f5-4f10-885a-f129125fbfe3",
      "name": "Send AI Reminder Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2576,
        560
      ]
    },
    {
      "id": "bb8ef98d-1e84-4745-8cd6-d4f07a911e9b",
      "name": "AI Reminder Generator",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2080,
        560
      ]
    },
    {
      "id": "f30a301c-3f3c-4e90-83c8-2b337753f32f",
      "name": "Personalize Greeting",
      "type": "n8n-nodes-base.code",
      "position": [
        2416,
        560
      ]
    },
    {
      "id": "06db529f-f27c-44db-9c88-2c95433f7b2a",
      "name": "Send a text message (New Meeting)",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2160,
        -352
      ]
    },
    {
      "id": "73e5ebe7-8a37-439e-a00b-576cf3a90699",
      "name": "Send AI Reply (schedule_meeting)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2320,
        -112
      ]
    },
    {
      "id": "4eff830f-78cf-4f82-86c2-6c291cce77b1",
      "name": "Send AI Reply (auto_reply)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2224,
        224
      ]
    },
    {
      "id": "b6e28f76-f30e-46d7-9e75-58e79c5b7178",
      "name": "Personalize Auto Reply",
      "type": "n8n-nodes-base.code",
      "position": [
        2048,
        224
      ]
    },
    {
      "id": "d6d97fa3-49d6-445f-9791-300d23e587c2",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        688,
        -160
      ]
    },
    {
      "id": "adc3deb0-8604-4c26-8a4e-fb6f24ec0dd3",
      "name": "Send a text message (meet accepted)",
      "type": "n8n-nodes-base.telegram",
      "position": [
        912,
        -272
      ]
    },
    {
      "id": "07a341c6-3166-4a6d-baba-2bfa619d9070",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        -416
      ],
      "parameters": {
        "width": 320,
        "height": 736,
        "content": "## AI-Powered Inbound Email Assistant with Smart Classification & Auto-Response\n\nThis workflow acts as your personal email assistant. It reads incoming emails, checks if the sender is on your \"whiteli"
      }
    },
    {
      "id": "8594bbc6-21a2-492f-9069-5c4ed7efd33d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -416
      ],
      "parameters": {
        "width": 800,
        "height": 608,
        "content": "## 1.  Ingestion & Filtering 📥\nMonitors your inbox, verifies the sender against your allowed list in Google Sheets, and filters out automated calendar responses (Accept/Decline notifications) to preve"
      }
    },
    {
      "id": "327fcb92-8f11-4111-a453-a0148256c87c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        -416
      ],
      "parameters": {
        "width": 1072,
        "height": 608,
        "content": "##  2. AI Analysis & Routing 🧠\nParses the email body and uses GPT-4 to classify the lead's intent into three categories: Schedule Meeting, Auto-Reply (Not Interested), or Needs Review."
      }
    },
    {
      "id": "b1de9ca0-f9bf-47a3-84b6-785f9bfeddd2",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1760,
        -496
      ],
      "parameters": {
        "width": 784,
        "height": 576,
        "content": "##  3. Booking & Confirmation 📅\nAutomatically creates a Google Calendar event for the lead, sends a personalized HTML confirmation email with the link, and notifies you via Telegram."
      }
    },
    {
      "id": "627689e6-dddf-43c6-af69-e64a9f5ed49b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1888,
        96
      ],
      "parameters": {
        "width": 800,
        "height": 304,
        "content": "## 4. Polite Decline 💬\nGenerates and sends a courteous, AI-driven response for leads who aren't interested at the moment, without including calendar links."
      }
    },
    {
      "id": "62aff496-ea90-4f52-976d-b457b6b1cdac",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1808,
        416
      ],
      "parameters": {
        "width": 976,
        "height": 336,
        "content": "##  5. Re-engagement ⏳\nWaits for a set period (configurable), then generates a gentle, context-aware follow-up email to re-engage leads who were unclear or didn't respond."
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Send a text message (meet accepted)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "AI Reminder Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Create an event",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Personalize Auto Reply",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Function Node: Parse Email Content",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get row(s) in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create an event": {
      "main": [
        [
          {
            "node": "Personalize AI Reply",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send a text message (New Meeting)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge (Allowed)": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet": {
      "main": [
        [
          {
            "node": "Merge (Allowed)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Personalize AI Reply": {
      "main": [
        [
          {
            "node": "Send AI Reply (schedule_meeting)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Personalize Greeting": {
      "main": [
        [
          {
            "node": "Send AI Reminder Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Reminder Generator": {
      "main": [
        [
          {
            "node": "Personalize Greeting",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Personalize Auto Reply": {
      "main": [
        [
          {
            "node": "Send AI Reply (auto_reply)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send AI Reminder Email": {
      "main": [
        []
      ]
    },
    "Send AI Reply (auto_reply)": {
      "main": [
        []
      ]
    },
    "Send AI Reply (schedule_meeting)": {
      "main": [
        []
      ]
    },
    "Send a text message (New Meeting)": {
      "main": [
        []
      ]
    },
    "Function Node: Parse Email Content": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          },
          {
            "node": "Merge (Allowed)",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}