{
  "name": "Process invoices & engineering emails with Gmail, AI analysis & Telegram alerts",
  "nodes": [
    {
      "id": "475789cb-c3cf-49d5-94d0-4f4256ab10a4",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -176,
        880
      ]
    },
    {
      "id": "8f3068ac-1e05-442a-a43e-cc89bd2a88e7",
      "name": "Get a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        192,
        880
      ]
    },
    {
      "id": "f6c752e4-24ba-4e28-9c99-cef45aed9147",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        400,
        1120
      ]
    },
    {
      "id": "5e52c675-3d01-403e-a42e-c5b490054e56",
      "name": "Debugged code to find attachment",
      "type": "n8n-nodes-base.code",
      "position": [
        160,
        1120
      ]
    },
    {
      "id": "423dc208-4abc-43bc-936e-8081b7c84b06",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        592,
        1360
      ]
    },
    {
      "id": "6340421b-dd62-47a4-9dfc-5dd08c66b387",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        400,
        1360
      ]
    },
    {
      "id": "abb27cad-f021-448a-9f53-349f5766a0af",
      "name": "Information Extractor",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        1632,
        1296
      ]
    },
    {
      "id": "b534c247-73ec-4a18-a9ef-75d9d94f3702",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        528,
        576
      ]
    },
    {
      "id": "e03d09d3-b733-4ebb-9e6b-0e3dddd46534",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1104,
        1296
      ]
    },
    {
      "id": "88c73900-f883-4fe6-a1f3-bead44b4f6e6",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        368,
        592
      ]
    },
    {
      "id": "3be55a2e-b289-4919-80c1-927eb487fe03",
      "name": "Edit Fields2",
      "type": "n8n-nodes-base.set",
      "position": [
        368,
        736
      ]
    },
    {
      "id": "92542f0e-7681-4933-a11b-d4291e5338b5",
      "name": "Split Out1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        528,
        736
      ]
    },
    {
      "id": "92e64272-92eb-4bcd-b61d-ba3fe610a1d5",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        704,
        864
      ]
    },
    {
      "id": "fe54224c-447d-4870-a659-2bfd755bfc3e",
      "name": "Filter",
      "type": "n8n-nodes-base.filter",
      "position": [
        928,
        864
      ]
    },
    {
      "id": "3864b113-2733-408b-b2cc-4c3e409cbab0",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        1104,
        1056
      ]
    },
    {
      "id": "44ff8834-36e3-40d5-976f-2f289f9e0474",
      "name": "Filter1",
      "type": "n8n-nodes-base.filter",
      "position": [
        16,
        880
      ]
    },
    {
      "id": "7e1ec925-c0e1-492d-891f-81127bdcc231",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        528
      ],
      "parameters": {
        "width": 1632,
        "height": 1008,
        "content": "## MULTIPLE DOCUMENTS EXTRACTOR\n"
      }
    },
    {
      "id": "9b6c2acc-fdeb-4bed-9ac0-00092b354b74",
      "name": "Extracting File Details",
      "type": "n8n-nodes-base.set",
      "position": [
        2016,
        1296
      ]
    },
    {
      "id": "ad2c0eb2-0691-4401-b708-76c596fc1526",
      "name": "Convert Names to download files",
      "type": "n8n-nodes-base.code",
      "position": [
        1632,
        1056
      ]
    },
    {
      "id": "07b492c0-2c62-4d96-91b7-d63ad46baf7c",
      "name": "Remove Duplicates",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        2016,
        1056
      ]
    },
    {
      "id": "badba30d-fe2d-413c-a25e-3b75d13985bd",
      "name": "Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1632,
        1440
      ]
    },
    {
      "id": "29edd5f6-1a03-465c-94ba-c04ca8bea09f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1472,
        912
      ],
      "parameters": {
        "width": 1024,
        "height": 640,
        "content": "## Telegram - Invoice and details to Engineering dept."
      }
    },
    {
      "id": "ef2167ee-0038-49dd-ac6b-5a1086956294",
      "name": "Reply to same thread",
      "type": "n8n-nodes-base.gmail",
      "position": [
        768,
        1120
      ]
    },
    {
      "id": "7f745152-b54a-4f51-ba13-b78a3cf498cd",
      "name": "Send important details",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2240,
        1296
      ]
    },
    {
      "id": "bdfe5a8c-27c2-400d-a43f-126714240af3",
      "name": "Send a document (e.g. dwg files)",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2240,
        1056
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Extract from File",
            "type": "main",
            "index": 0
          },
          {
            "node": "Convert Names to download files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter1": {
      "main": [
        [
          {
            "node": "Get a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Reply to same thread",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a message": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          },
          {
            "node": "Debugged code to find attachment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Filter1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract from File": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "Send a document (e.g. dwg files)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor": {
      "main": [
        [
          {
            "node": "Extracting File Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Extracting File Details": {
      "main": [
        [
          {
            "node": "Send important details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Convert Names to download files": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Debugged code to find attachment": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}