{
  "name": "Create a weekly LLM traffic report using Google Analytics, GPT-5, and Gmail",
  "nodes": [
    {
      "id": "d9633143-8490-4bdf-a74d-ef76b4bdd296",
      "name": "Create traffic report",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1072,
        0
      ]
    },
    {
      "id": "596de87f-3356-4e6b-87fb-d08ea6f28d1b",
      "name": "Every week...",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -80,
        0
      ]
    },
    {
      "id": "9d573408-4d0d-4534-a2c6-be09cb89460e",
      "name": "Get sessions by source & medium",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        224,
        0
      ]
    },
    {
      "id": "610f9a66-61e3-47ce-baf4-d53432240b77",
      "name": "Filter known referral domains from AI companies",
      "type": "n8n-nodes-base.code",
      "position": [
        528,
        0
      ]
    },
    {
      "id": "d8c1d626-5a9e-4ee1-9d94-99d1cf33b1fd",
      "name": "Combine items",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        832,
        0
      ]
    },
    {
      "id": "3f1f25d7-46c3-4af7-916d-b856bf1b8e05",
      "name": "Send report",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1424,
        0
      ]
    },
    {
      "id": "baa2f522-9202-4387-b3c2-7c8f59c1d7f7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        -464
      ],
      "parameters": {
        "width": 272,
        "height": 704,
        "content": "## Scheduled trigger\nRun workflow every week"
      }
    },
    {
      "id": "abd6b671-da94-40d6-8f16-f4255354b335",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -464
      ],
      "parameters": {
        "width": 272,
        "height": 704,
        "content": "## Get sessions by source / medium\nGet last weeks sessions by source / medium\n\nAdd your Google analytics ID to the node to make it work. You can find it in the admin panel under `property -> property "
      }
    },
    {
      "id": "97f8d38d-5a3e-4420-9dc0-3619e4fa9a82",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        -464
      ],
      "parameters": {
        "width": 272,
        "height": 704,
        "content": "## Filter for LLM traffic\nIn this node we're filtering our traffic for known LLMs such as ChatGPT, Gemini, perplexity, etc\n\nFeel free to add your own to the list"
      }
    },
    {
      "id": "890c7ab2-651d-425f-b029-712a0816a200",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        -464
      ],
      "parameters": {
        "width": 272,
        "height": 704,
        "content": "## Combine items\nHere we combine all items into one list so we can pass it on to the LLM"
      }
    },
    {
      "id": "7b1c3630-7bc9-41e0-836e-df8b2051860d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -464
      ],
      "parameters": {
        "width": 272,
        "height": 704,
        "content": "## Generate report\nHere we ask an LLM to generate a simple traffic report for us and style in using email-friendly HTML"
      }
    },
    {
      "id": "66c8ed41-5330-4cc2-b137-0b8404ce6650",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1344,
        -464
      ],
      "parameters": {
        "width": 272,
        "height": 704,
        "content": "## Send report\nFinally, we send the report to an email address.\n\nWe use a function in n8n to get last weeks week number, the start date, and the end date"
      }
    },
    {
      "id": "6d241bf3-1b46-4280-be37-4da55119bc49",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -464
      ],
      "parameters": {
        "width": 336,
        "height": 704,
        "content": "## Overview\n\nGet a weekly report on website traffic driven by large language models (LLMs) like ChatGPT, Perplexity, and Gemini. This workflow helps you track how these tools bring visitors to your si"
      }
    }
  ],
  "connections": {
    "Combine items": {
      "main": [
        [
          {
            "node": "Create traffic report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every week...": {
      "main": [
        [
          {
            "node": "Get sessions by source & medium",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create traffic report": {
      "main": [
        [
          {
            "node": "Send report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get sessions by source & medium": {
      "main": [
        [
          {
            "node": "Filter known referral domains from AI companies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter known referral domains from AI companies": {
      "main": [
        [
          {
            "node": "Combine items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}