{
  "name": "Route and log incoming emails with GPT-4, Excel 365 and Telegram",
  "nodes": [
    {
      "id": "09a48a06-4a41-4086-8d6b-ecbcf09c8b66",
      "name": "Email Trigger (IMAP)",
      "type": "n8n-nodes-base.emailReadImap",
      "position": [
        176,
        32
      ]
    },
    {
      "id": "583def6c-0cdc-4f9d-8188-ac49a281bec4",
      "name": "Extract Email Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        384,
        32
      ]
    },
    {
      "id": "5f46ca75-d4e7-4a8e-aab8-6cbf85cb3113",
      "name": "Parse Summary",
      "type": "n8n-nodes-base.code",
      "position": [
        960,
        32
      ]
    },
    {
      "id": "85a35a38-0cd1-4287-9d34-05dde5937854",
      "name": "Append rows to table",
      "type": "n8n-nodes-base.microsoftExcel",
      "position": [
        176,
        768
      ]
    },
    {
      "id": "27b697bf-1096-4dfc-9762-f84140653469",
      "name": "Prepare Excel Row",
      "type": "n8n-nodes-base.set",
      "position": [
        160,
        320
      ]
    },
    {
      "id": "850eb357-0f9c-4b6a-941e-564501f713b3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        -144
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "0de7e2cd-2487-4c66-a61c-36b120e111df",
      "name": "Send email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        960,
        416
      ]
    },
    {
      "id": "c9a09d61-2d5b-4f74-bb39-785824831794",
      "name": "Send Notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        960,
        240
      ]
    },
    {
      "id": "7e546db4-8aba-448e-b786-3872a6ecfdc4",
      "name": "Validate Department",
      "type": "n8n-nodes-base.if",
      "position": [
        720,
        320
      ]
    },
    {
      "id": "65e651d6-2a33-4b48-96e8-92b633359816",
      "name": "Lookup Department",
      "type": "n8n-nodes-base.microsoftExcel",
      "position": [
        512,
        320
      ]
    },
    {
      "id": "4701869e-3809-473f-950a-d73a47c56005",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -80
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "c46bea03-bb15-419c-a268-e75bfa479cd5",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        -80
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "eea548db-c384-49a0-98e3-291193c0d6a0",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        224
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "81c635c0-5a9f-4b35-8048-561171cc9dad",
      "name": "Message a model",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        624,
        32
      ]
    },
    {
      "id": "34323f82-f685-44e9-bcdd-4d8d09e16de8",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        624
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Parse Summary": {
      "main": [
        [
          {
            "node": "Prepare Excel Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Parse Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lookup Department": {
      "main": [
        [
          {
            "node": "Validate Department",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Excel Row": {
      "main": [
        [
          {
            "node": "Append rows to table",
            "type": "main",
            "index": 0
          },
          {
            "node": "Lookup Department",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Department": {
      "main": [
        [
          {
            "node": "Send Notification",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Trigger (IMAP)": {
      "main": [
        [
          {
            "node": "Extract Email Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Email Fields": {
      "main": [
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}