Back to Integrations
integrationGoogle Analytics node
integrationGoogle Sheets node

Google Analytics and Google Sheets integration

Save yourself the work of writing custom integrations for Google Analytics and Google Sheets and use n8n instead. Build adaptable and scalable Analytics, Data & Storage, and Productivity workflows that work with your technology stack. All within a building experience you will love.

How to connect Google Analytics and Google Sheets

  • Step 1: Create a new workflow
  • Step 2: Add and configure nodes
  • Step 3: Connect
  • Step 4: Customize and extend your integration
  • Step 5: Test and activate your workflow

Step 1: Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Google Analytics and Google Sheets integration: Create a new workflow and add the first step

Step 2: Add and configure Google Analytics and Google Sheets nodes

You can find Google Analytics and Google Sheets in the nodes panel. Drag them onto your workflow canvas, selecting their actions. Click each node, choose a credential, and authenticate to grant n8n access. Configure Google Analytics and Google Sheets nodes one by one: input data on the left, parameters in the middle, and output data on the right.

Google Analytics and Google Sheets integration: Add and configure Google Analytics and Google Sheets nodes

Step 3: Connect Google Analytics and Google Sheets

A connection establishes a link between Google Analytics and Google Sheets (or vice versa) to route data through the workflow. Data flows from the output of one node to the input of another. You can have single or multiple connections for each node.

Google Analytics and Google Sheets integration: Connect Google Analytics and Google Sheets

Step 4: Customize and extend your Google Analytics and Google Sheets integration

Use n8n's core nodes such as If, Split Out, Merge, and others to transform and manipulate data. Write custom JavaScript or Python in the Code node and run it as a step in your workflow. Connect Google Analytics and Google Sheets with any of n8n’s 1000+ integrations, and incorporate advanced AI logic into your workflows.

Google Analytics and Google Sheets integration: Customize and extend your Google Analytics and Google Sheets integration

Step 5: Test and activate your Google Analytics and Google Sheets workflow

Save and run the workflow to see if everything works as expected. Based on your configuration, data should flow from Google Analytics to Google Sheets or vice versa. Easily debug your workflow: you can check past executions to isolate and fix the mistake. Once you've tested everything, make sure to save your workflow and activate it.

Google Analytics and Google Sheets integration: Test and activate your Google Analytics and Google Sheets workflow

Generate monthly SEO analytics reports with GA4, Search Console, GPT-4.1 and Slack/Teams

Who it's for
This advanced n8n workflow is designed for SEO specialists, digital agency owners, webmasters, and marketing managers who need a comprehensive, automated solution to track and improve their website's search engine performance. It acts as a virtual SEO analyst, automatically gathering data from multiple sources (Google Analytics, Search Console, PageSpeed Insights, and technical audits), analyzing them with AI agents, and delivering actionable insights via various communication channels.

Features
Multi-Source Data Collection**: Automatically fetches data from Google Analytics (GA4), Google Search Console, PageSpeed Insights, and performs on-page technical audits.
Dual Trigger Modes**: Run the report automatically on a monthly schedule or trigger it instantly via Telegram by sending an "SEO Analysis" command.
AI-Powered Analysis**: Utilizes specialized LangChain Agents (Analytics, Performance, SEO, Technical) to analyze raw data and generate human-readable insights.
History Tracking**: Reads and writes historical data to Google Sheets, allowing AI agents to compare current performance against past data for trend analysis.
Technical SEO Audit**: Crawls the website homepage to extract meta tags, headings (H1), and image alt attributes to calculate an on-page SEO score.
Executive Summaries**: Generates a comprehensive "Master Analyst" report that aggregates findings from all agents into a unified action plan.
Multi-Channel Reporting**: Sends the final SEO report simultaneously to Slack, Microsoft Teams, Discord, WhatsApp (via Rapiwa), and Telegram.
Smart Filtering**: Includes Telegram verification logic to restrict report generation to authorized admins or alert the admin when a user requests an analysis.

Requirements
Google APIs**: Credentials for Google Analytics (GA4), Google Search Console, and Google Sheets OAuth2.
OpenAI API**: Required for the LangChain Agents (using models like gpt-4.1-mini and gpt-4.1-nano) to process data and generate insights.
Telegram API**: For triggering the workflow and receiving the final report.
Slack API**: To post messages to a specific Slack channel.
Microsoft Teams API**: To send notifications to a Team or channel.
Discord Bot API**: To post rich embed updates to a Discord server.
Rapiwa (WhatsApp)**: To send the report via WhatsApp messages.

Important Notes
Permissions**: Ensure your Google Cloud Project has access to the specific View ID for Analytics and the Site URL for Search Console.
Telegram Setup**: You must update the Chat ID in the "Send SEO Report Message" node to ensure the report goes to the correct recipient. The workflow includes a check to validate the user ID against an admin list.
Data Aggregation**: The workflow uses a "Merge" node to combine outputs from four different AI agents. Ensure all agents complete successfully before the merge step.
Sheet ID**: The Google Sheets nodes (Append row, Get GA History, etc.) require the specific Document ID and Sheet Name to be populated to read/write history correctly.
Target Domain**: Update the Edit Fields (Add Your Target Website URL) node with your specific domain (e.g., https://yourwebsite.com) before activating.

Support & Help
WhatsApp**: Chat on WhatsApp
Discord**: SpaGreen Community
Facebook Group**: SpaGreen Support
Website**: spagreen.net
Developer Portfolio**: Codecanyon SpaGreen

Nodes used in this workflow

Popular Google Analytics and Google Sheets workflows

+5

Generate monthly SEO analytics reports with GA4, Search Console, GPT-4.1 and Slack/Teams

Who it's for This advanced n8n workflow is designed for SEO specialists, digital agency owners, webmasters, and marketing managers who need a comprehensive, automated solution to track and improve their website's search engine performance. It acts as a virtual SEO analyst, automatically gathering data from multiple sources (Google Analytics, Search Console, PageSpeed Insights, and technical audits), analyzing them with AI agents, and delivering actionable insights via various communication channels. Features Multi-Source Data Collection**: Automatically fetches data from Google Analytics (GA4), Google Search Console, PageSpeed Insights, and performs on-page technical audits. Dual Trigger Modes**: Run the report automatically on a monthly schedule or trigger it instantly via Telegram by sending an "SEO Analysis" command. AI-Powered Analysis**: Utilizes specialized LangChain Agents (Analytics, Performance, SEO, Technical) to analyze raw data and generate human-readable insights. History Tracking**: Reads and writes historical data to Google Sheets, allowing AI agents to compare current performance against past data for trend analysis. Technical SEO Audit**: Crawls the website homepage to extract meta tags, headings (H1), and image alt attributes to calculate an on-page SEO score. Executive Summaries**: Generates a comprehensive "Master Analyst" report that aggregates findings from all agents into a unified action plan. Multi-Channel Reporting**: Sends the final SEO report simultaneously to Slack, Microsoft Teams, Discord, WhatsApp (via Rapiwa), and Telegram. Smart Filtering**: Includes Telegram verification logic to restrict report generation to authorized admins or alert the admin when a user requests an analysis. Requirements Google APIs**: Credentials for Google Analytics (GA4), Google Search Console, and Google Sheets OAuth2. OpenAI API**: Required for the LangChain Agents (using models like gpt-4.1-mini and gpt-4.1-nano) to process data and generate insights. Telegram API**: For triggering the workflow and receiving the final report. Slack API**: To post messages to a specific Slack channel. Microsoft Teams API**: To send notifications to a Team or channel. Discord Bot API**: To post rich embed updates to a Discord server. Rapiwa (WhatsApp)**: To send the report via WhatsApp messages. Important Notes Permissions**: Ensure your Google Cloud Project has access to the specific View ID for Analytics and the Site URL for Search Console. Telegram Setup**: You must update the Chat ID in the "Send SEO Report Message" node to ensure the report goes to the correct recipient. The workflow includes a check to validate the user ID against an admin list. Data Aggregation**: The workflow uses a "Merge" node to combine outputs from four different AI agents. Ensure all agents complete successfully before the merge step. Sheet ID**: The Google Sheets nodes (Append row, Get GA History, etc.) require the specific Document ID and Sheet Name to be populated to read/write history correctly. Target Domain**: Update the Edit Fields (Add Your Target Website URL) node with your specific domain (e.g., https://yourwebsite.com) before activating. Support & Help WhatsApp**: Chat on WhatsApp Discord**: SpaGreen Community Facebook Group**: SpaGreen Support Website**: spagreen.net Developer Portfolio**: Codecanyon SpaGreen
+8

Qualify and email literary agents with GPT‑4.1, Gmail and Google Sheets

Inspiration & Notes This workflow was born out of a very real problem. While writing a book, I found the process of discovering suitable literary agents and managing outreach to be manual, and surprisingly difficult to scale. Researching agents, checking submission rules, personalizing emails, tracking submissions, and staying organized quickly became a full-time job on its own. So instead of doing it manually, I automated it. I built this entire workflow in 3 days — and the goal of publishing it is to show that you can do the same. With the right structure and intent, complex sales and marketing workflows don’t have to take months to build. Contact & Collaboration If you have questions, business inquiries, or would like help setting up automation workflows, feel free to reach out: 📩 [email protected] I genuinely enjoy designing workflows and automation systems, especially when they support meaningful projects. I work primarily from interest and impact rather than purely financial motivation. Whether I take on a project for FREE or paid for the following reasons: I LOVE setting up workflows and automation. I work for meaningfulness, not for money. I may do the work for free**, depending on how meaningful the project is. If the problem statement matters, the motivation follows. It also depends on the value I bring to the table** -- If I can contribute significant value through system design, I’m more inclined to get involved. If you’re building something thoughtful and need help automating it, I’m always happy to have a conversation. Enjoy~! Overview Automates the end-to-end literary agent outreach pipeline, from data ingestion and eligibility filtering to deep agent research, personalized email generation, submission tracking, and analytics. Architecture The system is organized into four logical domains: The system is modular and is divided into four domains: --> Data Engineering --> Marketing & Research --> Sales (Outreach) --> Data Analysis Each domain operates independently and passes structured data downstream. Data Engineering Purpose: Ingest and normalize agent data from multiple sources into a single source of truth. Inputs Google BigQuery Azure Blob Storage AWS S3 Google Sheets (Optional) HTTP sources Key Steps Scheduled ingestion trigger Merge and normalize heterogeneous data formats (CSV, tables) Deduplication and validation AI-assisted enrichment for missing metadata Append-only writes to a central Google Sheet Output Clean, normalized agent records ready for eligibility evaluation Marketing & Research Purpose: Decide who to contact and how to personalize outreach. Eligibility Evaluation An AI agent evaluates each record against strict rules: Email submissions enabled Not QueryTracker-only or QueryManager-only Genre fit (e.g. Memoir, Spiritual, Self-help, Psychology, Relationships, Family) Outputs send_email (boolean) reason (auditable explanation) Deep Research For eligible agents only: Public research from agency sites, interviews, Manuscript Wish List, and LinkedIn (if public) Extracts: Professional background Editorial interests Genres represented Notable clients/books (if publicly listed) Public statements Source-backed personalization angles Strict Rule: All claims must be explicitly cited; no inference or hallucination is allowed. Sales (Outreach) Purpose: Execute personalized email outreach and maintain clean submission tracking. Steps AI generates agent-specific email copy Copy is normalized for tone and clarity Email is sent (e.g. Gmail) Submission metadata is logged: Submission Completed Submission Timestamp Channel used Result Consistent, traceable outreach with CRM-style hygiene Data Analysis Purpose: Measure pipeline health and outreach effectiveness. Features Append-only decision and submission logs QuickChart visualizations for fast validation (e.g. TRUE vs FALSE completion rates) Optional integration with: Power BI Google Analytics 4 Supports Completion rate analysis Funnel tracking Source/platform performance Decision auditing Design Principles Separation of concerns** (ingestion ≠ decision ≠ outreach ≠ analytics) AI with hard guardrails** (strict schemas, source-only facts) Append-only logging** (analytics-safe, debuggable) Modular & extensible** (plug-and-play data sources) Human-readable + machine-usable outputs** Constraints & Notes Only public, professional information is used No private or speculative data HTTP scraping avoided unless necessary Power BI Embedded is not required Workflow designed and implemented end-to-end in ~3 days Use Cases Marketing Audience discovery Agent segmentation Personalization at scale Campaign readiness Funnel automation Sales Lead qualification Deduplication Outreach execution Status tracking Pipeline hygiene Tech Stack Automation:** n8n AI:** OpenAI (GPT) Scripting:** JavaScript Data Stores:** Google Sheets Email:** Gmail Visualization:** QuickChart BI (optional):** Power BI, Google Analytics 4 Cloud Sources:** AWS S3, Azure Blob, BigQuery Status This workflow is production-ready, modular, and designed for extension into other sales or marketing domains beyond literary outreach.
+2

Automate unified marketing reports with Google Analytics, Google Ads, Meta Ads & HubSpot

How it works This workflow runs on scheduled weekly and monthly triggers to generate unified marketing performance reports. It processes multiple websites by collecting analytics data, paid ads performance, and CRM leads, then calculates KPIs and insights automatically. The workflow sends structured reports via email and stores historical data in Google Sheets. It ensures consistent reporting without manual effort. Step-by-step Step 1: Trigger & report type detection** Schedule Trigger2 – Triggers the workflow weekly at a predefined time. Schedule Trigger3 – Triggers the workflow monthly at a predefined time. check month and week1 – Identifies whether the run is weekly or monthly and sets flags. Set Websites and Campaings1 – Defines websites, GA4 property IDs, and mapped ad campaigns. Expand Websites1 – Expands the website array into individual website items. Attach Run Flags1 – Attaches weekly or monthly flags to each website record. Step 2: Website & ads data processing** Loop Websites1 – Iterates through each website independently. Get a report – Fetches website traffic and engagement metrics from analytics. Get many campaigns – Retrieves Google Ads campaign data. Fetch Meta Ads – Fetches Meta Ads performance data via API. Filter Google Ads By Website1 – Filters Google Ads campaigns by website. Filter Meta Ads By Website1 – Filters Meta Ads campaigns by website. Merge1 – Merges analytics, Google Ads, and Meta Ads datasets. Build Website Dataset1 – Builds a unified dataset per website. Calculate KPIs & Campaign Insights1 – Calculates spend, CTR, CPA, CPL, conversions, and performance insights. Append or update row in sheet2 – Stores website-level marketing metrics in Google Sheets. Step 2.1: Marketing report generation** Prepare Report Data2 – Combines all website datasets into a unified report object. Switch – Routes execution based on weekly or monthly report type. Send Weekly Marketing report2 – Sends the weekly marketing performance email. Send Monthly Marketing Report2 – Sends the monthly marketing performance email. Step 3: HubSpot lead analysis** Fetch1 – Fetches leads from HubSpot CRM. Filter Hubspot Leads – Filters leads based on weekly or monthly time range. Summarize Hubspot Leads – Aggregates lead status and lifecycle metrics. Prepare Report Data3 – Prepares CRM summary data for reporting. Step 3.1: CRM reporting & storage** Switch3 – Routes CRM reporting by report type. Send Weekly Marketing report3 – Sends the weekly CRM summary email. Send Monthly Marketing Report3 – Sends the monthly CRM summary email. Code in JavaScript1 – Transforms CRM data for storage. Append or update row in sheet3 – Stores CRM lead performance data in Google Sheets. Switch3 – Routes CRM reporting by report type. Send Weekly Marketing report3 – Sends the weekly CRM summary email. Send Monthly Marketing Report3 – Sends the monthly CRM summary email. Code in JavaScript1 – Transforms CRM data for storage. Append or update row in sheet3 – Stores CRM lead performance data in Google Sheets. Why use this? Automates complex weekly and monthly marketing reporting. Unifies website analytics, ad platforms, and CRM data in one flow. Delivers consistent KPI calculations and insights every run. Maintains historical performance logs in Google Sheets. Scales easily across multiple websites and campaigns.
+4

Automated Business KPI Insights with GPT-4, MSSQL, Analytics & Multi-Channel Alerts

WORKFLOW OVERVIEW This workflow is an AI-powered business intelligence agent designed for founders and business owners. It automatically collects key business metrics, calculates performance KPIs, applies decision logic, uses AI reasoning, and sends clear, actionable notifications — without dashboards or manual reports. Key Features: ✅ Aggregates multiple data sources (MSSQL, Google Analytics, Google Sheets) ✅ Calculates critical KPIs: ROAS, CAC, Revenue & User Growth ✅ Applies rule-based decision logic for business risk and opportunity detection ✅ AI-powered reasoning: summarizes insights and recommends actions ✅ Multi-channel notifications: Email, WhatsApp, Slack, Telegram ✅ Fully automated daily execution via Cron trigger ✅ Enterprise-ready: error handling, structured data, KPI validation Setup & Requirements: API access to data sources (MSSQL, Google Analytics, Google Sheets) OpenAI or Google Gemini API for AI reasoning Messaging integration: Gmail, Twilio (WhatsApp), Slack, Telegram Workflow Flow: Cron Trigger – runs daily at a chosen time Data Collection – revenue, users, marketing spend, website analytics Merge Node – combines all data sources Function Node – consolidates into a single JSON object KPI Calculation – calculates ROAS, CAC, growth rates Business Logic Engine – identifies risks and opportunities AI Reasoning Agent – summarizes insights, suggests actions Notification Formatter – builds founder-friendly message Notification Delivery – sends via WhatsApp, Email, Slack, or Telegram Example Data Formation These data below Getting from all different channels. `{ "revenue": 4290, "registeredUsers": 20, "totalUsers": 3, "adSpend": 800 }` Applies rule-based logic to detect potential risks or opportunities `{ "ROAS": 5.36, "CAC": 40, "agentStatus": "normal", "agentPriority": "low", "insights": ["Marketing campaigns are performing very well"] }` Workflow Highlights Fully automated, runs daily without human intervention Integrates multiple business data sources Converts raw data into KPIs for actionable insight Applies both rule-based logic and AI reasoning Generates concise, human-friendly notifications Sending notification to different channels.
+3

Daily Google Analytics Report with GPT-4 Mini Summaries, WhatsApp Alerts & ClickUp Tasks

How it Works. The workflow runs automatically every day and collects analytics data for both today and yesterday. It cleans and standardizes both datasets in the same way so they are easy to compare. After that, it measures how performance has changed from one day to the next and interprets those changes to understand trends and context. Once all calculations are finished, the AI creates a clear, easy-to-read summary of what happened. This summary is then formatted and sent through the required communication channels, while the final data is saved for tracking over time and for creating follow-up tasks if needed. Key Features: Trigger runs once per day recommended (11: 57 PM). Fetch seperate data for today and yesterday in node. Compare the two days data and highlight if traffic is less Add the trend lowTraffic for low traffic identification. Using GPT-4 Mini for human readable summary to suit different communication channels. Sending report to WhatsApp / Email Stored the final structure data to Google Sheet for future analytics and historical record Setup Steps Connect Required Credentials You must connect the following credentials: Google Analytics API Google Sheets OpenAi API Email SMTP WhatsApp API ClickUp API Replace Defalut Values Update the workflow with: Your Google Analytics Id's Your Google Sheet Tabs Replace SMTP Credentials, sender and recipients Change with your OpenAi API key Create your WhatApi API Credentials ClickUp API Key's Customize Email Template Modify subject, message body, or formatting style based on your reporting standards. Adjust Trigger You may choose: Manual Trigger Cron Trigger for daily/weekly report Webhook Trigger integrated with your system Detailed Process Flow Schedule Trigger Node Type: Trigger Node Purpose: Automates the start of the workflow. Details: Runs every day (or every hour if real-time monitoring is needed). Eliminates manual data collection and ensures consistent reporting. Analytics Reports Node Type :- Google Analytics Node Purpose: Fetch website performance data Metrics includes: users, sessions, page views Combine the Data Node Type: Merge Node (Append) Purpose: Combines today’s and yesterday’s datasets into a single item for comparison. Details: Prepares data for calculating percentage changes. Maintains proper structure for further nodes. Calculate Percent Changes Node Type: Function Node Purpose: Computes day-over-day percentage changes for users, sessions, and page views. Details: Formula: ((today - yesterday) / yesterday) * 100 Handles increases and decreases correctly. Outputs values used for trend indicators and alerts. Generate AI Summary Node Type: OpenAI Node Purpose: Produces human-readable, professional insights about the daily analytics. Details: Summarizes key changes, trends, and recommendations. Provides context such as low-traffic warnings. Text output is used in emails, WhatsApp, and ClickUp tasks. Send Email or Whatsapp to Dedicated Person / Marketing Team Node Type: Email Node / Whatspp Purpose: Sends daily alert or report emails or whatsapp. Details: Includes formatted metrics and AI summary. Email subject and body clearly indicate trends and recommendations. Workflow Benefits Fully automated daily GA reporting AI-generated summaries for clear insights Alerts only triggered when necessary Historical logging for trends and dashboards Actionable tasks automatically created in ClickUp Multi-channel delivery via Email and WhatsApp Handles low-traffic scenarios gracefully

Automate SEO Reporting with Google Search Console, GA4, and Google Sheets

How it works: This workflow automates comprehensive SEO reporting by: Extracting keyword rankings and page performance from Google Search Console. Gathering organic reach metrics from Google Analytics. Analyzing internal and external article links. Tracking keyword position changes (gains and losses). Formatting and importing all data into Google Sheets reports. Set up steps: Connect Google Services: Authenticate Google Search Console, Google Analytics, and Google Sheets OAuth2 credentials. Configure Source Sheet: Set up a data source Google Sheet with article URLs to analyze. Set Report Sheet: Create or specify destination Google Sheets for reports. Update Date Ranges: Modify date parameters in GSC and GA nodes for your reporting period. Customize Filters: Adjust keyword filters and row limits based on your needs. Test Individual Sections: Each reporting section (keywords, pages, articles, position changes) can be tested independently. The workflow includes separate flows for: Keyword ranking (top 1000). Page ranking analysis. Organic reach reporting. Internal article link analysis. External article link analysis. Position gain/loss tracking.

Build your own Google Analytics and Google Sheets integration

Create custom Google Analytics and Google Sheets workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

Google Analytics supported actions

Get
Return the analytics data
Search
Return user activity data

Google Sheets supported actions

Create
Create a spreadsheet
Delete
Delete a spreadsheet
Append or Update Row
Append a new row or update an existing one (upsert)
Append Row
Create a new row in a sheet
Clear
Delete all the contents or a part of a sheet
Create
Create a new sheet
Delete
Permanently delete a sheet
Delete Rows or Columns
Delete columns or rows from a sheet
Get Row(s)
Retrieve one or more rows from a sheet
Update Row
Update an existing row in a sheet

FAQs

  • Can Google Analytics connect with Google Sheets?

  • Can I use Google Analytics’s API with n8n?

  • Can I use Google Sheets’s API with n8n?

  • Is n8n secure for integrating Google Analytics and Google Sheets?

  • How to get started with Google Analytics and Google Sheets integration in n8n.io?

Need help setting up your Google Analytics and Google Sheets integration?

Discover our latest community's recommendations and join the discussions about Google Analytics and Google Sheets integration.
Sergey Komardenkov
sérgio eduardo floresta filho
Julian
therealJMT
Guilherme

Looking to integrate Google Analytics and Google Sheets in your company?

Over 3000 companies switch to n8n every single week

Why use n8n to integrate Google Analytics with Google Sheets

Build complex workflows, really fast

Build complex workflows, really fast

Handle branching, merging and iteration easily.
Pause your workflow to wait for external events.

Code when you need it, UI when you don't

Simple debugging

Your data is displayed alongside your settings, making edge cases easy to track down.

Use templates to get started fast

Use 1000+ workflow templates available from our core team and our community.

Reuse your work

Copy and paste, easily import and export workflows.

Implement complex processes faster with n8n

red iconyellow iconred iconyellow icon