Skip to main content

Create a weekly LLM traffic report using Google Analytics, GPT-5, and Gmail

Workflow preview

Workflow preview
100%
Create a weekly LLM traffic report using Google Analytics, GPT-5, and Gmail preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Get a weekly report on website traffic driven by large language models (LLMs) such as ChatGPT, Perplexity, and Gemini. This workflow helps you track how these tools bring visitors to your site. A w...

Best for

  • Market Research automation workflows
  • AI Summarization automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.openai, n8n-nodes-base.scheduletrigger, n8n-nodes-base.googleanalytics, n8n-nodes-base.code, n8n-nodes-base.aggregate, n8n-nodes-base.gmail, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Robin Geuens.

Original n8n.io source

1.1 Workflow description

Title
Create a weekly LLM traffic report using Google Analytics, GPT-5, and Gmail
Workflow name
Create a weekly LLM traffic report using Google Analytics, GPT-5, and Gmail

Overview

Get a weekly report on website traffic driven by large language models (LLMs) such as ChatGPT, Perplexity, and Gemini. This workflow helps you track how these tools bring visitors to your site. A weekly snapshot can guide better content and marketing decisions.

How it works

  • The trigger runs every Monday.
  • Pull the number of sessions on your website by source/medium from Google Analytics.
  • The code node uses the following regex to filter referral traffic from AI providers like ChatGPT, Perplexity, and Gemini:
/^.openai.*|.*copilot.*|.*chatgpt.*|.*gemini.*|.*gpt.*|.*neeva.*|.*writesonic.*|.*nimble.*|.*outrider.*|.*perplexity.*|.*google.*bard.*|.*bard.*google.*|.*bard.*|.*edgeservices.*|.*astastic.*|.*copy.ai.*|.*bnngpt.*|.*gemini.*google.*$/i;
  • Combine the filtered sessions into one list so they can be processed by an LLM.
  • Generate a short report using the filtered data.
  • Email the report to yourself.

Setup

  1. Get or connect your OpenAI API key and set up your OpenAI credentials in n8n.
  2. Enable Google Analytics and Gmail API access in the Google Cloud Console. (Read more here).
  3. Set up your Google Analytics and Gmail credentials in n8n. If you're using the cloud version of n8n, you can log in with your Google account to connect them easily.
  4. In the Google Analytics node, add your credentials and select the property for the website you’re working with. Alternatively, you can use your property ID, which can be found in the Google Analytics admin panel under Property > Property Details. The property ID is shown in the top-right corner. Add this to the property field.
  5. Under Metrics, select the metric you want to measure. This workflow is configured to use sessions, but you can choose others. Leave the dimension as-is, since we need the source/medium dimension to filter LLMs.
  6. (Optional) To expand the list of LLMs being filtered, adjust the regex in the code node. You can do this by copying and pasting one of the existing patterns and modifying it. Example: |.*example.*|
  7. The LLM node creates a basic report. If you’d like a more detailed version, adjust the system prompt to specify the details or formatting you want.
  8. Add your email address to the Gmail node so the report is delivered to your inbox.

Requirements

  • OpenAI API key for report generation
  • Google Analytics API enabled in Google Cloud Console
  • Gmail API enabled in Google Cloud Console

Customizing this workflow

  • The regex used to filter LLM referral traffic can be expanded to include specific websites.
  • The system prompt in the AI node can be customized to create a more detailed or styled report.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Create traffic report

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 2 - Every week...

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 3 - Get sessions by source & medium

Type / Role
n8n-nodes-base.googleAnalytics - googleAnalytics
Config choices
Version 2

Block 4 - Filter known referral domains from AI companies

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Combine items

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 6 - Send report

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 7 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Create a weekly LLM traffic report using Google Analytics, GPT-5, and Gmail
Complexity intermediate
Nodes 13
Categories Market Research, AI Summarization
Author Robin Geuens
Published 29 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9081/9081.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Create a weekly LLM traffic report using Google Analytics, GPT-5, and Gmail do?

Get a weekly report on website traffic driven by large language models (LLMs) such as ChatGPT, Perplexity, and Gemini. This workflow helps you track how these tools bring visitors to your site. A w...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research, AI Summarization use case.