{
  "id": "erQR03J34CgGUlgv",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI-Powered Construction Site Progress Tracker",
  "tags": [],
  "nodes": [
    {
      "id": "da61ca99-96ef-4d45-980a-b345934e1763",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -360,
        -200
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "12714e65-1608-415f-a7ad-cd5f53011d38",
      "name": "AI Analysis",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        300,
        -200
      ],
      "parameters": {
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "You are an AI construction progress analyst. Analyze the provided daily site photo and summarize the visible construction progress. Focus on structural elements (e.g., foundation, walls, roofing), machinery, materials, and any noticeable changes from previous days if available.  Return the update in 2-3 clear bullet points.  Then suggest the next expected step of construction based on standard workflow.  Format:  Progress Summary: \u2022 Point 1 \u2022 Point 2  Next Expected Step: <one-line suggestion>  Be concise, use simple language, and avoid speculation if details are unclear."
            }
          ]
        }
      },
      "typeVersion": 1.7
    },
    {
      "id": "a49a82ee-e630-4344-99bc-e97647ae5c6c",
      "name": "Append data to a sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        676,
        -200
      ],
      "parameters": {
        "range": "Sheet1!A:B",
        "options": {},
        "sheetId": "=uyt543erty65432456yu",
        "operation": "append"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d478f1a4-023a-49f8-a4ed-84ad03c49714",
      "name": "Tack All Images ",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        80,
        -200
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "477884af-a527-41ad-983e-02f9b82c79bc",
      "name": "List a file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -140,
        -200
      ],
      "parameters": {
        "options": {},
        "operation": "list"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bcf6fcdc-ea52-4ae6-a148-22ae84ecbf73",
      "name": "Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        388,
        20
      ],
      "parameters": {
        "options": {},
        "modelName": "=models/gemini-1.0-pro"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "91e41140-4d9d-466a-8085-34f610a9d4b9",
      "name": "Send email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        900,
        -200
      ],
      "parameters": {
        "text": "=Construction site progress report is ready",
        "options": {},
        "subject": "Construction Site Progress Report",
        "toEmail": "user@example.com",
        "fromEmail": "user@example.com",
        "emailFormat": "text"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "43c14ff9-a3bf-40e7-bb52-95c011799740",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        -300
      ],
      "parameters": {
        "color": 6,
        "width": 160,
        "height": 260,
        "content": "Runs the workflow daily to check for new site photos.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ec04c3bb-f1ea-488b-bca7-1cf82f90209a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        -300
      ],
      "parameters": {
        "color": 5,
        "width": 200,
        "height": 260,
        "content": "Logs the AI-generated summary into a Google Sheet for tracking.\n\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "4e2ca085-ce22-4225-9521-3f846d273284",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        40,
        -300
      ],
      "parameters": {
        "color": 3,
        "width": 160,
        "height": 260,
        "content": "Loops through each image to send them individually for AI analysis.\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "f218dc67-2bf0-4a7c-8efd-9534541c639c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -300
      ],
      "parameters": {
        "color": 4,
        "width": 160,
        "height": 260,
        "content": "Fetches the latest uploaded site photos from the Drive folder.\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "46582e78-902c-406e-aa0a-1a09e4b2892c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        -300
      ],
      "parameters": {
        "width": 280,
        "height": 260,
        "content": "Passes each image to Gemini AI for construction progress detection.\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d51ee962-ce7f-4e99-9c0b-640c694d5090",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        -300
      ],
      "parameters": {
        "color": 2,
        "width": 160,
        "height": 260,
        "content": "Sends the daily site progress update to stakeholders.\n\n\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "ee36063d-88ba-403f-b408-db4ed188007f",
  "connections": {
    "AI Analysis": {
      "main": [
        [
          {
            "node": "Append data to a sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List a file": {
      "main": [
        [
          {
            "node": "Tack All Images ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "AI Analysis",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "List a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tack All Images ": {
      "main": [
        [
          {
            "node": "AI Analysis",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Tack All Images ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append data to a sheet": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}