8
n8n 한국어amn8n.com

Google Analytics, AI 및 Gmail을 사용하여 매주 LLM 트래픽 보고서 생성

중급

이것은Content Creation, Multimodal AI분야의자동화 워크플로우로, 13개의 노드를 포함합니다.주로 Code, Gmail, Aggregate, GoogleAnalytics, ScheduleTrigger 등의 노드를 사용하며. Google Analytics, GPT-5 및 Gmail을 사용하여 매주 LLM 트래픽 보고서를 만듭니다.

사전 요구사항
  • Google 계정 및 Gmail API 인증 정보
  • OpenAI API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "EOcBeSjghx5s9AWj",
  "meta": {
    "instanceId": "b597f3db206729fea79938d01afc341ae2811ad29d941b24c1597c0110c58f12",
    "templateCredsSetupCompleted": true
  },
  "name": "Create a weekly LLM traffic report using Google Analytics, AI, and Gmail",
  "tags": [],
  "nodes": [
    {
      "id": "d9633143-8490-4bdf-a74d-ef76b4bdd296",
      "name": "트래픽 보고서 생성",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1072,
        0
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5",
          "cachedResultName": "GPT-5"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=Please create a report of the following traffic\n\n {{ $json.data.toJsonString() }}"
            },
            {
              "role": "system",
              "content": "=You are a virtual assistant. Your job is to take the list of traffic numbers provided and generate a weekly report that will be sent by email. Use the following structure:\n\n<structure>\n## Top sources\nShow a table with top sources of traffic. The columns should be | # | Source / Medium | Sessions |\n</structure>\n\nAdhere to the following rules:\n- Only return the body text of the email.\n- Return the body text without any additional commentary or remarks\n- The report should be formatted to comply with HTML used in emails."
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "R5mcnwXQyAqWYNFn",
          "name": "OpenAi account - SOAX"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "596de87f-3356-4e6b-87fb-d08ea6f28d1b",
      "name": "매주...",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -80,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [
                1
              ]
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9d573408-4d0d-4534-a2c6-be09cb89460e",
      "name": "소스 및 미디어별 세션 조회",
      "type": "n8n-nodes-base.googleAnalytics",
      "position": [
        224,
        0
      ],
      "parameters": {
        "returnAll": true,
        "metricsGA4": {
          "metricValues": [
            {
              "listName": "sessions"
            }
          ]
        },
        "propertyId": {
          "__rl": true,
          "mode": "id",
          "value": "=put id here"
        },
        "dimensionsGA4": {
          "dimensionValues": [
            {
              "listName": "sourceMedium"
            }
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "googleAnalyticsOAuth2": {
          "id": "1igLahLYGVAhtJYv",
          "name": "Google Analytics account - SOAX"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "610f9a66-61e3-47ce-baf4-d53432240b77",
      "name": "AI 기업의 알려진 리퍼럴 도메인 필터링",
      "type": "n8n-nodes-base.code",
      "position": [
        528,
        0
      ],
      "parameters": {
        "jsCode": "const regex = /^.openai.*|.*copilot.*|.*chatgpt.*|.*gemini.*|.*gpt.*|.*neeva.*|.*writesonic.*|.*nimble.*|.*outrider.*|.*perplexity.*|.*google.*bard.*|.*bard.*google.*|.*bard.*|.*edgeservices.*|.*astastic.*|.*copy.ai.*|.*bnngpt.*|.*gemini.*google.*$/i;\n\n// Filter items\nreturn items.filter(item => {\n  // Adjust the property you want to match against, e.g. `item.json.source`\n  const value = item.json.sourceMedium || \"\";\n  return regex.test(value);\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "d8c1d626-5a9e-4ee1-9d94-99d1cf33b1fd",
      "name": "항목 결합",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        832,
        0
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "3f1f25d7-46c3-4af7-916d-b856bf1b8e05",
      "name": "보고서 전송",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1424,
        0
      ],
      "webhookId": "853478aa-74d6-4824-a7fb-1fbd3fdcfb54",
      "parameters": {
        "sendTo": "youremail@example.com",
        "message": "={{ $json.message.content }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "=LLM traffic report for week {{ $now.minus(1,'week').format('W') }} - {{ $now.minus(1,'week').format('dd MMMM yyyy') }} to {{ $now.format('dd MMMM yyyy') }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "r36hIUr5SXLnTlQK",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "baa2f522-9202-4387-b3c2-7c8f59c1d7f7",
      "name": "스티키 노트",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        -464
      ],
      "parameters": {
        "color": 7,
        "width": 272,
        "height": 704,
        "content": "## Scheduled trigger\nRun workflow every week"
      },
      "typeVersion": 1
    },
    {
      "id": "abd6b671-da94-40d6-8f16-f4255354b335",
      "name": "스티키 노트1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -464
      ],
      "parameters": {
        "color": 7,
        "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 details`. In the top right you'll see your property ID"
      },
      "typeVersion": 1
    },
    {
      "id": "97f8d38d-5a3e-4420-9dc0-3619e4fa9a82",
      "name": "스티키 노트2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        -464
      ],
      "parameters": {
        "color": 7,
        "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"
      },
      "typeVersion": 1
    },
    {
      "id": "890c7ab2-651d-425f-b029-712a0816a200",
      "name": "스티키 노트3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        -464
      ],
      "parameters": {
        "color": 7,
        "width": 272,
        "height": 704,
        "content": "## Combine items\nHere we combine all items into one list so we can pass it on to the LLM"
      },
      "typeVersion": 1
    },
    {
      "id": "7b1c3630-7bc9-41e0-836e-df8b2051860d",
      "name": "스티키 노트4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -464
      ],
      "parameters": {
        "color": 7,
        "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"
      },
      "typeVersion": 1
    },
    {
      "id": "66c8ed41-5330-4cc2-b137-0b8404ce6650",
      "name": "스티키 노트5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1344,
        -464
      ],
      "parameters": {
        "color": 7,
        "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"
      },
      "typeVersion": 1
    },
    {
      "id": "6d241bf3-1b46-4280-be37-4da55119bc49",
      "name": "스티키 노트6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -464
      ],
      "parameters": {
        "color": 7,
        "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 site. A weekly snapshot helps you make better content and marketing decisions.\n\n## How it works\n\n- Pull weekly sessions from Google Analytics by source/medium\n- Use regex to find traffic from LLMs\n- Combine the filtered sessions and generate a short report with AI\n- Email the report to you\n\n## Setup\n\n1. Connect your OpenAI API key, Google Analytics access, and email credentials (for example, Gmail via Google Cloud Console).\n2. Configure your Google Analytics and email nodes to read and send data.\n3. Update the code node to filter sessions based on LLM referral URLs."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "4cdce158-749d-4fd1-acb4-cf45cdc7d403",
  "connections": {
    "d8c1d626-5a9e-4ee1-9d94-99d1cf33b1fd": {
      "main": [
        [
          {
            "node": "d9633143-8490-4bdf-a74d-ef76b4bdd296",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "596de87f-3356-4e6b-87fb-d08ea6f28d1b": {
      "main": [
        [
          {
            "node": "9d573408-4d0d-4534-a2c6-be09cb89460e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d9633143-8490-4bdf-a74d-ef76b4bdd296": {
      "main": [
        [
          {
            "node": "3f1f25d7-46c3-4af7-916d-b856bf1b8e05",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9d573408-4d0d-4534-a2c6-be09cb89460e": {
      "main": [
        [
          {
            "node": "610f9a66-61e3-47ce-baf4-d53432240b77",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "610f9a66-61e3-47ce-baf4-d53432240b77": {
      "main": [
        [
          {
            "node": "d8c1d626-5a9e-4ee1-9d94-99d1cf33b1fd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

중급 - 콘텐츠 제작, 멀티모달 AI

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
중급
노드 수13
카테고리2
노드 유형7
난이도 설명

일정 경험을 가진 사용자를 위한 6-15개 노드의 중간 복잡도 워크플로우

저자
Robin Geuens

Robin Geuens

@robingeuens

Hi, I'm Robin. I'm a veteran marketer of 7 years and love automation. If you have any questions about automation feel free to reach out to me on LinkedIn: https://www.linkedin.com/in/rgeuens/

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34