{
  "id": "F1wuIZkEMUVdXtxC",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Save Invoice Attachments to OneDrive and Update Excel Log",
  "tags": [],
  "nodes": [
    {
      "id": "2",
      "name": "Get Attachments",
      "type": "n8n-nodes-base.microsoftOutlook",
      "position": [
        432,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "4",
      "name": "Upload to OneDrive",
      "type": "n8n-nodes-base.microsoftOneDrive",
      "position": [
        1328,
        16
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5",
      "name": "Append to Excel Log",
      "type": "n8n-nodes-base.microsoftExcel",
      "position": [
        1712,
        16
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "2b17a075-4c2d-4988-ab30-6b8da0e89d84",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        640,
        0
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "5fd3ff1e-1a3c-4456-a39d-b0009095f58a",
      "name": "Get Message ID",
      "type": "n8n-nodes-base.set",
      "position": [
        240,
        0
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "cda46c7a-97d3-495a-8450-464ce59033a0",
      "name": "On Mail Received",
      "type": "n8n-nodes-base.microsoftOutlookTrigger",
      "position": [
        32,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7",
      "name": "Notify User",
      "type": "n8n-nodes-base.microsoftTeams",
      "position": [
        928,
        -192
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5a5f0f1e-11cc-48c9-a88c-1f9ac705d69a",
      "name": "Get Folder ID",
      "type": "n8n-nodes-base.microsoftOneDrive",
      "position": [
        928,
        16
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "898ecd52-4b26-4963-af73-7a3140881335",
      "name": "Download Attachment",
      "type": "n8n-nodes-base.microsoftOutlook",
      "position": [
        1120,
        16
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "36a5d459-5b6d-48eb-9a06-2019fc0521b7",
      "name": "Set Filename",
      "type": "n8n-nodes-base.set",
      "position": [
        1520,
        16
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "f0f1d810-6045-425e-9716-8ce8f555f701",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1184,
        256
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "600f99de-c6c7-461d-8ee3-01a17bfd6b9e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -560
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "847765b5-01c9-42f0-b808-764be7959f20",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        224
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "dccb657c-d4bc-4bf6-89fe-165e888b5a88",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1248,
        -256
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "businessContext": {
      "data_flow": "Linear",
      "complexity": "Low",
      "department": "Finance/Accounting",
      "workflow_type": "Automation",
      "key_components": [
        "Email Processing"
      ],
      "integration_points": []
    }
  },
  "versionId": "37fb0a58-673f-47b4-a13d-e9d0a072a40b",
  "connections": {
    "Set Filename": {
      "main": [
        [
          {
            "node": "Append to Excel Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Folder ID": {
      "main": [
        [
          {
            "node": "Download Attachment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Message ID": {
      "main": [
        [
          {
            "node": "Get Attachments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Attachments": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Notify User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Folder ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On Mail Received": {
      "main": [
        [
          {
            "node": "Get Message ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to OneDrive": {
      "main": [
        [
          {
            "node": "Set Filename",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append to Excel Log": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Attachment": {
      "main": [
        [
          {
            "node": "Upload to OneDrive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}