{
  "name": "AI Timesheet Generator with Gmail, Calendar & GitHub to Google Sheets",
  "nodes": [
    {
      "id": "d3ad9729-1444-4227-b37e-b232546347de",
      "name": "Get Today's Calendar Events",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        -3220,
        -1300
      ]
    },
    {
      "id": "cd793b22-bd54-430e-aa78-7a7e1f066f96",
      "name": "Get Today's Emails",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -3220,
        -1560
      ]
    },
    {
      "id": "8bdb5e00-ce98-4c75-94e4-d1c9f341a826",
      "name": "Get GitHub PRs",
      "type": "n8n-nodes-base.github",
      "position": [
        -3320,
        -640
      ]
    },
    {
      "id": "201ef564-57e6-4fde-8251-459c56ef05d0",
      "name": "Format All Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -2320,
        -1080
      ]
    },
    {
      "id": "9a9385f0-ca86-457f-b599-713a809aa423",
      "name": "Generate Journal Summary",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -2100,
        -1080
      ]
    },
    {
      "id": "34e60115-851c-4055-b1bc-3bba3076fefe",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -2940,
        -1560
      ]
    },
    {
      "id": "a1dbd248-1cd5-4fec-8198-52573fbe50ed",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        -2540,
        -1101
      ]
    },
    {
      "id": "53ab1990-ddeb-410f-8cd4-675ed88387a9",
      "name": "Aggregate1",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -2940,
        -1300
      ]
    },
    {
      "id": "7cc275df-68ac-4a9e-ae02-eb617b85f4cf",
      "name": "Aggregate2",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -2840,
        -620
      ]
    },
    {
      "id": "0faf1f55-23d3-4d33-a142-d1c87d85e9f1",
      "name": "Daily at 7PM",
      "type": "n8n-nodes-base.cron",
      "position": [
        -3900,
        -1180
      ]
    },
    {
      "id": "7ee78807-a5df-493c-8419-3e9ef8688954",
      "name": "Set Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        -3640,
        -1180
      ]
    },
    {
      "id": "c6471886-5bce-43ae-9af7-89db8983706c",
      "name": "Aggregate3",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -2820,
        -1000
      ]
    },
    {
      "id": "469e916d-b567-4314-9f3d-ddebdac1a7c6",
      "name": "If Authors Commit",
      "type": "n8n-nodes-base.if",
      "position": [
        -3040,
        -980
      ]
    },
    {
      "id": "2e566c1b-1a75-4302-b6f1-bd48d1ea6f26",
      "name": "If it's closed today",
      "type": "n8n-nodes-base.if",
      "position": [
        -3120,
        -500
      ]
    },
    {
      "id": "c4dafdca-e764-412a-9d3c-9b8653c3fb13",
      "name": "If it's created today",
      "type": "n8n-nodes-base.if",
      "position": [
        -3120,
        -760
      ]
    },
    {
      "id": "ce041632-5c3e-4f15-b772-cde890181ab7",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -1724,
        -1080
      ]
    },
    {
      "id": "61d7bb88-1ad8-48d7-ae56-953123ccd501",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4200,
        -1620
      ],
      "parameters": {
        "width": 640,
        "height": 380,
        "content": "## 📊 Daily Activity Tracker Workflow\n\n**Overview:** This workflow automatically collects your daily activities from multiple sources and creates a comprehensive timesheet in Google Sheets.\n\n**Key Feat"
      }
    },
    {
      "id": "ddefaf28-97c9-493b-8762-0d67e8adb345",
      "name": "Data Collection",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3280,
        -1900
      ],
      "parameters": {
        "width": 480,
        "height": 280,
        "content": "## 🔄 Data Collection Hub\n\n**Sources:**\n- **Gmail:** Fetches emails from today (filtered by sender)\n- **Google Calendar:** Gets confirmed events from yesterday\n- **GitHub API:** Retrieves commits via c"
      }
    },
    {
      "id": "011634e4-2d08-40ac-9545-12b06a370e79",
      "name": "GitHub Filtering",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3360,
        -340
      ],
      "parameters": {
        "width": 580,
        "height": 340,
        "content": "## 🔍 GitHub Activity Filtering\n\n**Commit Filter:**\n- Only includes commits by the configured user\n- Fetches commits from yesterday (UTC)\n\n**PR Filters:**\n1. **Created Today:** New PRs opened by the us"
      }
    },
    {
      "id": "c02e7286-fe56-4719-84ae-d75591814c67",
      "name": "Sheet Management",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4360,
        -920
      ],
      "parameters": {
        "width": 420,
        "height": 280,
        "content": "## 📋 Sheet Management\n\n**Monthly Sheet Creation:**\n- Automatically creates a new sheet for each month\n- Names sheets using month name (e.g., \"January\")\n- Checks if sheet already exists to avoid duplic"
      }
    },
    {
      "id": "d24c8f38-772f-47c7-8be5-62b0bf3bb45b",
      "name": "Data Aggregation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2600,
        -1480
      ],
      "parameters": {
        "width": 620,
        "height": 320,
        "content": "## 🔀 Data Aggregation\n\n**Purpose:** Combines multiple items into single data objects\n\n**Aggregate Nodes:**\n- **Emails → emails[]**\n- **Calendar Events → calendarEvents[]**\n- **Commits → commits[]**\n- "
      }
    },
    {
      "id": "5c550d91-2e03-40a7-848b-f1a84e6a335a",
      "name": "Final Output",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1780,
        -1440
      ],
      "parameters": {
        "width": 420,
        "height": 280,
        "content": "## 💾 Final Output\n\n**Google Sheets2 Node:**\n- Appends each activity to the current month's sheet\n- Maps AI-generated data:\n  - **Type:** CALENDAR_EVENT | EMAIL | COMMIT | PR\n  - **Description:** Conci"
      }
    },
    {
      "id": "9c66ce99-54b4-43c1-bd72-c03b583355f1",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2220,
        -840
      ],
      "parameters": {
        "width": 540,
        "height": 280,
        "content": "## 🤖 AI Processing & Summary\n\n**Purpose:** Transform raw activity data into structured timesheet entries\n\n**Process:**\n1. **Format All Data** node consolidates data from all sources\n2. **OpenAI GPT-4o"
      }
    },
    {
      "id": "bf6a9ad5-11b6-46f5-b4e1-8f7cbed04c56",
      "name": "Split Out1",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -3380,
        -980
      ]
    },
    {
      "id": "17c57291-2bbc-4fbb-b2c3-2c7352c379f2",
      "name": "Get Commits From Github",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3220,
        -980
      ]
    },
    {
      "id": "df7ad87d-f6e1-4d26-8551-c503271dbb3a",
      "name": "Insert Sheets Entry",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1504,
        -1080
      ]
    },
    {
      "id": "122a1907-1eb5-48c2-9fb7-4d004f41c74a",
      "name": "Create Sheet If It Doesn't Exist",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -4500,
        -560
      ]
    },
    {
      "id": "a172be21-11f1-48a5-bf6c-2989d3888771",
      "name": "If it didn't exist",
      "type": "n8n-nodes-base.if",
      "position": [
        -4280,
        -560
      ]
    },
    {
      "id": "9d96d32c-75db-4712-8e8f-8806cb43830b",
      "name": "Init Sheet Headers",
      "type": "n8n-nodes-base.set",
      "position": [
        -4060,
        -560
      ]
    },
    {
      "id": "242351ee-c830-4253-8b4f-37d2c7494018",
      "name": "init Sheet Columns",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -3840,
        -560
      ]
    },
    {
      "id": "ce14b4e3-3796-4d03-93fe-8cc2a6199955",
      "name": "Split Out2",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -3580,
        -720
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Format All Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Insert Sheets Entry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Aggregate2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Aggregate3": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Get Commits From Github",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out2": {
      "main": [
        [
          {
            "node": "Get GitHub PRs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily at 7PM": {
      "main": [
        [
          {
            "node": "Set Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Variables": {
      "main": [
        [
          {
            "node": "Get Today's Emails",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Today's Calendar Events",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create Sheet If It Doesn't Exist",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Out2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get GitHub PRs": {
      "main": [
        [
          {
            "node": "If it's created today",
            "type": "main",
            "index": 0
          },
          {
            "node": "If it's closed today",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format All Data": {
      "main": [
        [
          {
            "node": "Generate Journal Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Authors Commit": {
      "main": [
        [
          {
            "node": "Aggregate3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Today's Emails": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If it didn't exist": {
      "main": [
        [
          {
            "node": "Init Sheet Headers",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Init Sheet Headers": {
      "main": [
        [
          {
            "node": "init Sheet Columns",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "init Sheet Columns": {
      "main": [
        []
      ]
    },
    "If it's closed today": {
      "main": [
        [
          {
            "node": "Aggregate2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If it's created today": {
      "main": [
        [
          {
            "node": "Aggregate2",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Get Commits From Github": {
      "main": [
        [
          {
            "node": "If Authors Commit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Journal Summary": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Today's Calendar Events": {
      "main": [
        [
          {
            "node": "Aggregate1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Sheet If It Doesn't Exist": {
      "main": [
        [
          {
            "node": "If it didn't exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}