{
  "name": "Daily Google Analytics report with GPT-4 mini summaries, WhatsApp alerts & ClickUp tasks",
  "nodes": [
    {
      "id": "b1d9cdc3-5542-413e-a5a0-7b50dd208c8e",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -816,
        -64
      ]
    },
    {
      "id": "fbfe639e-2ec1-4856-baee-9767f997cc8b",
      "name": "Today's Report",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        -512,
        -160
      ]
    },
    {
      "id": "1ed41054-d7c7-432b-ae69-96c47fea8bae",
      "name": "Yesterday's Report",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        -512,
        32
      ]
    },
    {
      "id": "fea0b4e4-2457-40cd-813e-d7ae3b0651de",
      "name": "Calculator",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "position": [
        784,
        -192
      ]
    },
    {
      "id": "05d43788-639c-4a9f-b7d3-1e311f53761b",
      "name": "Combine Today & Yesterday",
      "type": "n8n-nodes-base.merge",
      "position": [
        0,
        -80
      ]
    },
    {
      "id": "c74defc5-4d0e-4c08-bec2-4fc53703fe49",
      "name": "Normalize & Convert Types",
      "type": "n8n-nodes-base.code",
      "position": [
        -304,
        -160
      ]
    },
    {
      "id": "74147616-bdfe-427d-a557-08872111e7f4",
      "name": "Normalize & Convert Types1",
      "type": "n8n-nodes-base.code",
      "position": [
        -288,
        32
      ]
    },
    {
      "id": "92eb428a-79c5-463b-87a5-9e04540642e9",
      "name": "Calculate Percent Changes",
      "type": "n8n-nodes-base.code",
      "position": [
        208,
        -80
      ]
    },
    {
      "id": "3117362c-7bcf-4dba-a8bf-660d64bbe972",
      "name": "Add Trend Arrows & Low-Traffic Handling",
      "type": "n8n-nodes-base.code",
      "position": [
        416,
        -80
      ]
    },
    {
      "id": "7a90da7e-d0de-4995-a89b-79a21957f86a",
      "name": "Generate AI Summary",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        752,
        -320
      ]
    },
    {
      "id": "09d7d619-1610-430a-923e-54837f16d7bb",
      "name": "Format Message for WhatsApp / Email",
      "type": "n8n-nodes-base.set",
      "position": [
        1136,
        -416
      ]
    },
    {
      "id": "494dcb21-988f-4465-9381-11ae5a09c188",
      "name": "Send message",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        1424,
        -352
      ]
    },
    {
      "id": "43171b06-e5ca-472e-bdd6-347b02ed3368",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        768,
        -80
      ]
    },
    {
      "id": "3b80f891-d2a1-473a-82bd-01fafcd7f487",
      "name": "Send email to dedicated person",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1424,
        -512
      ]
    },
    {
      "id": "496b244b-1586-43b7-a164-c7814579a3fe",
      "name": "Send email to marketing team",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1136,
        -224
      ]
    },
    {
      "id": "1c054737-c053-46ae-a05a-ba1e4d092195",
      "name": "Add log to High Traffic Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1136,
        16
      ]
    },
    {
      "id": "86480632-9e77-44d7-9ecd-6d62474e1abb",
      "name": "Add log to Less Traffic",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1392,
        -96
      ]
    },
    {
      "id": "69154211-58b9-4b07-bc22-a40ee0916592",
      "name": "Append or update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        768,
        112
      ]
    },
    {
      "id": "56ebd751-2a73-4d5f-943c-54ddec25c96d",
      "name": "Create a task",
      "type": "n8n-nodes-base.clickUp",
      "position": [
        1136,
        224
      ]
    },
    {
      "id": "a1e3d162-80cb-4def-9d73-0f6bde65e089",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1712,
        -576
      ],
      "parameters": {
        "width": 704,
        "height": 880,
        "content": "## Workflow Overview\n\nThis workflow automates a daily traffic report and communication process. It compares today's and yesterday's analytics data, calculates percentage changes, identifies trends and"
      }
    },
    {
      "id": "80f5f910-5966-4480-b550-810192a28441",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        -544
      ],
      "parameters": {
        "width": 496,
        "height": 352,
        "content": "## Analytics Report & Normalize\n\nFetch google analytics data for today and yesterday from node and get users, sessions, pageViews, sessionPerPage and etc.\n\nNormalize the response from the analytics. I"
      }
    },
    {
      "id": "12abaf28-dd50-4750-a223-21dbd29d6bc7",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -544
      ],
      "parameters": {
        "width": 624,
        "height": 352,
        "content": "## Combine and Calculation\n\nThis merge node appends both normalized records into one data stream so the workflow can compare two time snapshots in a single execution context.\n\nThe calculate function c"
      }
    },
    {
      "id": "e41b8fa3-34e0-4fb2-aceb-72eb72306001",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        -912
      ],
      "parameters": {
        "width": 624,
        "height": 432,
        "content": "## Generate and format message for email / WhatsApp\n\nThis AI node turns the final processed metrics and trends into concise natural-language performance summary suitable for dedicated teams or persons"
      }
    },
    {
      "id": "41cfbf04-9db4-4fdc-90bb-4de04ecf69b7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1568,
        -192
      ],
      "parameters": {
        "width": 624,
        "height": 256,
        "content": "## Check the report traffics & Notify users & Logs\n\nIF Node checks whether today's users are lower than yesterday, If percentage is less than yesterday the trigger alerts emails to dedicated persons o"
      }
    },
    {
      "id": "bff9188c-5e62-4219-b75d-30f8fa5739ce",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1344,
        176
      ],
      "parameters": {
        "width": 624,
        "height": 256,
        "content": "## Create Log & Create Task\n\nThis node is store all daily metrics for tracking and historical analysis. It keep all records in `Daily Traffic Sheet` for help marketing or analytics teams to monitor tr"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Send email to marketing team",
            "type": "main",
            "index": 0
          },
          {
            "node": "Add log to Less Traffic",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add log to High Traffic Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculator": {
      "ai_tool": [
        [
          {
            "node": "Generate AI Summary",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Today's Report": {
      "main": [
        [
          {
            "node": "Normalize & Convert Types",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Today's Report",
            "type": "main",
            "index": 0
          },
          {
            "node": "Yesterday's Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Yesterday's Report": {
      "main": [
        [
          {
            "node": "Normalize & Convert Types1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI Summary": {
      "main": [
        [
          {
            "node": "Format Message for WhatsApp / Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Percent Changes": {
      "main": [
        [
          {
            "node": "Add Trend Arrows & Low-Traffic Handling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Today & Yesterday": {
      "main": [
        [
          {
            "node": "Calculate Percent Changes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize & Convert Types": {
      "main": [
        [
          {
            "node": "Combine Today & Yesterday",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize & Convert Types1": {
      "main": [
        [
          {
            "node": "Combine Today & Yesterday",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Send email to marketing team": {
      "main": [
        []
      ]
    },
    "Append or update row in sheet": {
      "main": [
        [
          {
            "node": "Create a task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Message for WhatsApp / Email": {
      "main": [
        [
          {
            "node": "Send email to dedicated person",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Trend Arrows & Low-Traffic Handling": {
      "main": [
        [
          {
            "node": "Generate AI Summary",
            "type": "main",
            "index": 0
          },
          {
            "node": "If",
            "type": "main",
            "index": 0
          },
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}