{
  "name": "Automatic email classification with Gmail and Claude AI",
  "nodes": [
    {
      "id": "65d1a63b-fcc7-4049-ac00-dfec4b86332a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        -192
      ],
      "parameters": {
        "width": 304,
        "height": 976,
        "content": "## Label Actions\nGmail nodes — Add \"Ads\", \"Work\", \"Personal\", \"Financial\", or \"Other\" labels."
      }
    },
    {
      "id": "7a61d992-e66f-4320-bd76-ab64b4faa5f2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        448
      ],
      "parameters": {
        "width": 272,
        "height": 240,
        "content": "\n\n\n\n\n\n\n\n\n## Model\nAnthropic Chat Model — language model used by classifier (model selection / credential)."
      }
    },
    {
      "id": "940fa5d6-27b3-4be8-a2d7-183496bbfe0a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        80
      ],
      "parameters": {
        "width": 352,
        "height": 352,
        "content": "## Classification\nEmail Content Classifier (LangChain) — classifies message content into category labels."
      }
    },
    {
      "id": "c2fa4449-d8b4-4e0a-85a7-c799e0ed735c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        176
      ],
      "parameters": {
        "width": 320,
        "height": 256,
        "content": "## Trigger\nGmail Trigger — listens for new incoming messages."
      }
    },
    {
      "id": "db1d5a35-c9f8-481d-8b2a-5350179c5ee4",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1152,
        -480
      ],
      "parameters": {
        "width": 656,
        "height": 1072,
        "content": "## How It Works\n1. Gmail Trigger\n\nContinuously monitors your Gmail inbox for new messages.\nCaptures the email’s subject, body, and metadata.\nSends the extracted content to the Email Content Classifier"
      }
    },
    {
      "id": "2ffc836e-899e-46be-818d-d0c665bae8a2",
      "name": "Add \"Ads\" label to message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        400,
        -96
      ]
    },
    {
      "id": "cf738400-8b42-4b16-a4f0-498eaa889389",
      "name": "Add \"Work\" label to message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        400,
        80
      ]
    },
    {
      "id": "7db073dd-cc2b-47ea-9686-9699d6214eec",
      "name": "Add \"Personal\" label to message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        400,
        256
      ]
    },
    {
      "id": "3534f2b2-b504-4f13-9652-049b13438105",
      "name": "Add \"Financial\" label to message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        400,
        432
      ]
    },
    {
      "id": "3aefee49-53ed-4525-a74a-91150e607168",
      "name": "Add \"Other\" label to message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        400,
        608
      ]
    },
    {
      "id": "5680dcb3-8583-482f-ac52-14e01edb9690",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        0,
        464
      ]
    },
    {
      "id": "b9a041fa-b5c5-48cc-b9b0-a9c5905a7aa2",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -368,
        256
      ]
    },
    {
      "id": "eda9fe4a-e5b7-4c31-976c-676aa587ad71",
      "name": "Email Content Classifier",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        -64,
        208
      ]
    }
  ],
  "connections": {
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Email Content Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Email Content Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Email Content Classifier": {
      "main": [
        [
          {
            "node": "Add \"Ads\" label to message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add \"Work\" label to message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add \"Personal\" label to message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add \"Financial\" label to message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add \"Other\" label to message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}