AI-Powered Weekly Google Analytics Insight Reporter - n8n Workflow

Generate AI-driven weekly reports from Google Analytics using this sophisticated n8n workflow. It uses the Gemini LLM for sentiment analysis and automatically routes actionable insights via Gmail and Telegram.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Data Analysts and SEO Professionals who need automatic, insightful weekly reports.
Marketing Managers requiring immediate notification of significant positive or negative trends.
n8n power users looking for advanced examples combining data fetching, memory, and AI agents.
Organizations seeking to automate their data reporting using robust n8n templates.

Overview

Automating weekly data reporting can be challenging, especially when you need summaries that provide true insight, not just raw metrics. This advanced n8n workflow solves this by leveraging AI to act as your personal data analyst. The n8n trigger starts the process weekly, fetching critical Google Analytics 4 (GA4) metrics.

The core value of this n8n template lies in the AI Agent node, which utilizes the power of the Google Gemini Chat Model and historical memory to analyze trends and provide concise, actionable summaries. Furthermore, the Insight Sentiment Analysis n8n node classifies the report's tone (Positive or Negative), allowing the n8n workflow to route notifications strategically. Positive trends can be routed immediately to stakeholder emails (via Gmail), while general or operational alerts are sent to a team channel (via Telegram). This robust n8n automation ensures you never miss a critical update while minimizing manual data processing.

How it Works

This comprehensive n8n workflow follows a six-step process, starting with a scheduled n8n trigger and ending with intelligent multi-channel routing:


  1. Scheduled Start: The Schedule Trigger n8n trigger initiates the entire process every seven days, ensuring weekly reports are generated consistently.

  2. Data Retrieval: The Get a weekly report n8n node connects to Google Analytics to pull key metrics like session counts, 7-day active users, event counts, and user engagement duration for the past week.

  3. Data Aggregation: The Aggregate n8n node combines all the retrieved data rows into a single JSON object, preparing it for the AI analysis stage.

  4. AI Analysis and Memory: The consolidated data is fed into the AI Agent n8n node, which uses a specific system prompt (acting as an experienced data analyst) and the Simple Memory n8n node (for historical context) to generate a concise, insightful summary using the connected Google Gemini Chat Model.

  5. Sentiment Classification: The AI-generated summary then passes through the Insight Sentiment Analysis n8n node, classifying the output as Positive or Negative.

  6. Intelligent Routing: The analyzed report is distributed. High-level stakeholders are notified via the Notify Stakeholders (Gmail) n8n node, with a subject optimized for positive trends. Simultaneously, the operational team receives the detailed, formatted alert through the Send a message to group (Telegram) n8n node.

Installation Guide

To deploy this powerful n8n workflow, follow these steps:


  1. Import: Copy the provided JSON code and import it into your n8n instance using the 'New' -> 'Import from JSON' feature.

  2. Google Analytics Credentials: Set up or select your Google Analytics OAuth2 credentials for the Get a weekly report n8n node.

  3. LLM Credentials: Configure your API key for the Google Gemini Chat Model node (or update the n8n node to use a different LLM like OpenAI if preferred).

  4. Telegram Setup: Provide your Telegram API credentials and specify the target chatId for the Send a message to group n8n node.

  5. Gmail Setup: Configure your Gmail OAuth2 credentials and specify the recipient email address for the Notify Stakeholders n8n node.

  6. Configuration: Ensure the Google Analytics property ID within the data retrieval n8n node is updated to match your specific property.

  7. Activation: Save the n8n workflow and switch the 'Active' toggle to ON. The n8n trigger will execute the automation weekly.

Node Details

Schedule Trigger (n8n trigger):
Function: Starts the n8n workflow automatically.
Key Configuration: Set to run at a specific interval, configured here for a weekly (7-day) execution.
Google Analytics (n8n node):
Function: Fetches specific GA4 metrics (sessions, user counts, event counts) from the last week.
Key Configuration: Requires OAuth2 authentication and a configured GA property ID.
Aggregate (n8n node):
Function: Flattens the GA data structure, combining multiple data rows into a single JSON object for simplified AI input.
AI Agent (n8n node):
Function: Processes the aggregated data using the Gemini LLM. It applies a detailed prompt to generate an insightful summary, acting as a data analyst. It compares current data against historical context stored in memory.
Key Configuration: Uses a customized system message prompt and is linked to the Simple Memory n8n node for persistent context.
Simple Memory (n8n node):
Function: Provides short-term memory (Buffer Window) to the AI Agent, allowing it to detect trends and compare current metrics with previous runs of the n8n workflow.
Insight Sentiment Analysis (n8n node):
Function: Analyzes the text output generated by the AI Agent and categorizes its sentiment (Positive or Negative).
Gmail (Notify Stakeholders n8n node):
Function: Sends the AI-generated report summary to designated stakeholders. The subject line is pre-configured to highlight positive trends.
Telegram (Send a message to group n8n node):
* Function: Delivers the concise weekly report and AI analysis to an operational group chat, clearly labeling the report date range.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by

Specializing in software engineering with over 5 years of hands-on experience. In addition to my expertise in web development, I also have experience in creating Hybrid mobile apps.

Featured*