{
  "name": "Smart email draft generator",
  "nodes": [
    {
      "id": "2f4d2db0-f825-4064-b9c4-059570ca28e8",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        840,
        -20
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "This workflow triggers from Mail (IMAP), processes text with Basic LLM or Ollama Model, sets up an email field, and saves it as a draft."
      }
    },
    {
      "id": "8cc89e3d-ab69-4c3e-8753-ef79a105fd62",
      "name": "Check New Email (IMAP)",
      "type": "n8n-nodes-base.emailReadImap",
      "position": [
        500,
        220
      ]
    },
    {
      "id": "d4098fe8-b946-441a-8f7d-1aada1cb6625",
      "name": "Process Email with AI",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        700,
        220
      ]
    },
    {
      "id": "1bb72900-6d50-449a-bf8a-49cbeb0cfc86",
      "name": "Custom AI Model",
      "type": "@n8n/n8n-nodes-langchain.lmOllama",
      "position": [
        700,
        420
      ]
    },
    {
      "id": "2308c0c8-c232-4560-b120-598addd7e4c5",
      "name": "Prepare Email Content",
      "type": "n8n-nodes-base.set",
      "position": [
        1100,
        220
      ]
    },
    {
      "id": "f2c81d97-0b15-4fbb-a050-4f2750b1af9c",
      "name": "Save as Gmail Draft",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1320,
        220
      ]
    }
  ],
  "connections": {
    "Custom AI Model": {
      "ai_languageModel": [
        [
          {
            "node": "Process Email with AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Save as Gmail Draft": {
      "main": [
        []
      ]
    },
    "Prepare Email Content": {
      "main": [
        [
          {
            "node": "Save as Gmail Draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Email with AI": {
      "main": [
        [
          {
            "node": "Prepare Email Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check New Email (IMAP)": {
      "main": [
        [
          {
            "node": "Process Email with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}