{
  "name": "Auto-draft professional email replies with Gmail, AI, and Slack",
  "nodes": [
    {
      "id": "f702a564-b299-4bc4-b5c4-19a38a127cfa",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "5ba2106f-fa48-4a8f-9243-f5ab93d6fe5a",
      "name": "Limit - Max emails per run",
      "type": "n8n-nodes-base.limit",
      "position": [
        624,
        -96
      ]
    },
    {
      "id": "48e377b6-bbf4-4a6d-b873-bee34c7619fd",
      "name": "Gmail - Get message details",
      "type": "n8n-nodes-base.gmail",
      "position": [
        832,
        -96
      ]
    },
    {
      "id": "d180af7a-0a91-4d3d-b7b9-740cea82a9eb",
      "name": "Search unreplied emails",
      "type": "n8n-nodes-base.gmail",
      "position": [
        208,
        0
      ]
    },
    {
      "id": "f071cd47-4c2e-4e73-86fd-db6d1d9e0a52",
      "name": "Check if new emails exist",
      "type": "n8n-nodes-base.if",
      "position": [
        416,
        0
      ]
    },
    {
      "id": "856ba060-691f-4779-9c16-5d5acf13d6d5",
      "name": "Extract email body for AI",
      "type": "n8n-nodes-base.code",
      "position": [
        1040,
        -96
      ]
    },
    {
      "id": "23239b95-5337-4285-bd74-4e9d132ce29b",
      "name": "AI - Draft professional email reply",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1248,
        -96
      ]
    },
    {
      "id": "59cdfe8b-7527-428a-bcf1-7dfd345e55ae",
      "name": "Notify draft reply in Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1600,
        -96
      ]
    },
    {
      "id": "4c787cfc-8bc0-4f5c-815e-d8432be82017",
      "name": "Mark email as AUTO_REPLIED",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1040,
        128
      ]
    },
    {
      "id": "9f39256e-b781-4109-a2dc-b897607dd9e7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        992,
        -224
      ],
      "parameters": {
        "width": 544,
        "height": 304,
        "content": "## AI Draft Generation\nCreates a professional email reply draft using AI.\nHuman review required."
      }
    },
    {
      "id": "f2204ee0-b63b-44ec-86d2-bb8224319766",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        992,
        112
      ],
      "parameters": {
        "width": 368,
        "height": 320,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## 📬 Notification & State Control\n \n• Sends AI-generated draft to Slack\n• Marks email as AUTO_REPLIED\n• Prevents duplicate processing\n"
      }
    },
    {
      "id": "95899fba-a7c8-4cfb-8829-b78bff651dba",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1584,
        -224
      ],
      "parameters": {
        "width": 368,
        "height": 304,
        "content": "## 📬 Notification & State Control\n \n• Sends AI-generated draft to Slack\n• Marks email as AUTO_REPLIED\n• Prevents duplicate processing\n"
      }
    },
    {
      "id": "5ab4f131-9d33-49f3-b3db-bb8fbb97a3b7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -752
      ],
      "parameters": {
        "width": 640,
        "height": 592,
        "content": "## I'm a note \n\nThis is a professional email automation framework\nThis workflow monitors your Gmail inbox on a schedule and looks for new, unreplied emails.\n\nWhen a new email is found, it:\n- Retrieves"
      }
    },
    {
      "id": "cce1a803-016e-4a5c-bc29-eaedf4895ab3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -112
      ],
      "parameters": {
        "width": 416,
        "height": 304,
        "content": "## Email Monitoring\nChecks Gmail for new unreplied emails on a schedule."
      }
    },
    {
      "id": "5f7db3e2-083e-4380-b87d-7828e94bd59e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        -560
      ],
      "parameters": {
        "width": 256,
        "height": 208,
        "content": "## How to customize this framework\nOptional nodes are intentionally left unconnected.\nUsers can plug them into the flow depending on their use case.\n"
      }
    },
    {
      "id": "d0d365a8-73dd-4ce0-bd89-f46fdf49cd40",
      "name": "OPTIONAL – Auto-send reply",
      "type": "n8n-nodes-base.if",
      "position": [
        1488,
        192
      ]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Search unreplied emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search unreplied emails": {
      "main": [
        [
          {
            "node": "Check if new emails exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if new emails exist": {
      "main": [
        [
          {
            "node": "Limit - Max emails per run",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract email body for AI": {
      "main": [
        [
          {
            "node": "AI - Draft professional email reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit - Max emails per run": {
      "main": [
        [
          {
            "node": "Gmail - Get message details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail - Get message details": {
      "main": [
        [
          {
            "node": "Extract email body for AI",
            "type": "main",
            "index": 0
          },
          {
            "node": "Mark email as AUTO_REPLIED",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify draft reply in Slack": {
      "main": [
        []
      ]
    },
    "AI - Draft professional email reply": {
      "main": [
        [
          {
            "node": "Notify draft reply in Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}