{
  "name": "Draft and send AI customer support email replies with Gmail and Google Sheets",
  "nodes": [
    {
      "id": "a34946c2-efe9-4c43-af40-571ec70da65e",
      "name": "Receive Customer Emails",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        160,
        208
      ]
    },
    {
      "id": "8e95a8dd-eb83-4d0c-8daf-dde14f34afed",
      "name": "Filter Unwanted Emails",
      "type": "n8n-nodes-base.if",
      "position": [
        368,
        208
      ]
    },
    {
      "id": "05bc6007-08b2-4a16-838f-c1e40697bf9e",
      "name": "Draft AI Reply",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        624,
        192
      ]
    },
    {
      "id": "cbdf0ba9-5736-409c-9db1-16967f83def4",
      "name": "OpenRouter Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        624,
        400
      ]
    },
    {
      "id": "9a2050f3-3f2f-45e2-98a1-e09f80b483d5",
      "name": "Mark Email as Read",
      "type": "n8n-nodes-base.gmail",
      "position": [
        976,
        192
      ]
    },
    {
      "id": "74dcc027-fcdd-4f1e-9774-8ac3d751aca5",
      "name": "Log to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1200,
        192
      ]
    },
    {
      "id": "cd0b7884-435f-4a5b-98a5-9f7128924875",
      "name": "Check Pending Replies",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        176,
        736
      ]
    },
    {
      "id": "dccb0769-54fe-4548-9051-413f90847f3d",
      "name": "Get Approved Replies",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        400,
        736
      ]
    },
    {
      "id": "d6c2381a-b6fe-4805-9db7-782594e84847",
      "name": "Send Reply to Customer",
      "type": "n8n-nodes-base.gmail",
      "position": [
        896,
        720
      ]
    },
    {
      "id": "57e91e89-f103-4546-a250-c5221254e1d2",
      "name": "Update Status to Replied",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1168,
        720
      ]
    },
    {
      "id": "134d964e-705b-41d3-af41-9dca6852f59b",
      "name": "Is Approved to Send?",
      "type": "n8n-nodes-base.if",
      "position": [
        640,
        736
      ]
    },
    {
      "id": "3da05e07-7a32-48db-8a4f-42ea5f936ce4",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        -32
      ],
      "parameters": {
        "width": 796,
        "height": 1184,
        "content": "## 📧 AI Customer Support Email Agent\n\n**Automatically draft AI-powered replies to customer emails, let your team review them in Google Sheets, and send with a single word - keeping a human in the loop"
      }
    },
    {
      "id": "1e210314-18c0-4c9c-a03b-0e84dc06b34c",
      "name": "Section - Email Intake",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        64
      ],
      "parameters": {
        "width": 1380,
        "height": 476,
        "content": "## ① Email Intake & AI Draft\nReceives incoming emails, filters noise, drafts AI replies, and logs everything to Google Sheets for review."
      }
    },
    {
      "id": "680b871c-35de-4191-b6e9-d5fb8168c947",
      "name": "Section - Review and Send",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        624
      ],
      "parameters": {
        "width": 1320,
        "height": 268,
        "content": "## ② Review & Send Approved Replies\nChecks Google Sheets every minute for rows marked \"send\" and delivers the approved reply to the customer."
      }
    }
  ],
  "connections": {
    "Draft AI Reply": {
      "main": [
        [
          {
            "node": "Mark Email as Read",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Model": {
      "ai_languageModel": [
        [
          {
            "node": "Draft AI Reply",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Mark Email as Read": {
      "main": [
        [
          {
            "node": "Log to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Approved Replies": {
      "main": [
        [
          {
            "node": "Is Approved to Send?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Approved to Send?": {
      "main": [
        [
          {
            "node": "Send Reply to Customer",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Check Pending Replies": {
      "main": [
        [
          {
            "node": "Get Approved Replies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Unwanted Emails": {
      "main": [
        [
          {
            "node": "Draft AI Reply",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Send Reply to Customer": {
      "main": [
        [
          {
            "node": "Update Status to Replied",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Customer Emails": {
      "main": [
        [
          {
            "node": "Filter Unwanted Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}