Automate google analytics reporting
Automate Google Analytics Reporting with n8n This n8n workflow collects, processes, and formats Google Analytics data into a comprehensive HTML report. The report is segmented into three primary categories: Engagement Stats, Search Results, and Country Views. The formatted report can be emailed or saved as a document, and the workflow includes error handling and logging for better debugging. Overview Purpose To automate the extraction, processing, and presentation of Google Analytics data in a v
At a glance
Automate google analytics reporting is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects Gmail, Slack. It's free to download. Follow the 5-step import below to go live in minutes.
- Platform
- n8n
- Connects
- Gmail, Slack
- Modules
- 19
- Price
- Free
- Version
- v1.0

About this workflow
Automate Google Analytics Reporting with n8n This n8n workflow collects, processes, and formats Google Analytics data into a comprehensive HTML report. The report is segmented into three primary categories: Engagement Stats, Search Results, and Country Views. The formatted report can be emailed or saved as a document, and the workflow includes error handling and logging for better debugging. Overview Purpose To automate the extraction, processing, and presentation of Google Analytics data in a visually appealing and structured format for easier insights and decision-making. Features - Data Parsing: Individual parsers process raw Google Analytics data for different time periods and categories. - Data Aggregation: Combines parsed data into a single structured JSON object. - HTML Report Generation: Formats the aggregated data into an HTML table with color-coded segments for better readability. - Email or Document Output: The formatted report can be emailed or saved as a Google Doc (will need additional setup). - Error Handling: Includes checks for missing data and detailed error messages for debugging. Workflow Steps 1. Data Fetching: - Six separate Google Analytics data pulls: - Page Engagement Stats (This Week and Prior Week) - Google Search Results (This Week and Prior Week) - Country Views (This Week and Prior Week) 2. Data Parsing: - Each data pull is processed using a dedicated parser node to generate a URL-safe string. - Example nodes: - Parse - Get Page Engagement This Week - Parse - Country Views Prior Week 3. Data Aggregation: - Aggregates parsed data into a structured JSON object using the Aggregate Data node. - Ensures consistency and handles missing or malformed data. 4. HTML Report Generation: - Creates a formatted HTML report with color-coded tables for each segment: - Engagement Stats: Green - Search Results: Blue - Country Views: Orange - Includes headers and neatly formatted tables for each data set. 5. Output: - The report can be sent via email using the Gmail API or saved to Google Docs. - Example nodes: - Gmail node for email delivery. - Google Docs node for saving the report as a document. Requirements Prerequisites - Google Cloud Setup: - Enable Google Analytics API. - Enable Gmail API (if using email output). - Generate OAuth credentials for API access. - n8n Installation: - Self-hosted n8n instance with required nodes (Gmail, Google Docs, etc.). - Free Cloud-based n8n account. Environment Variables - Ensure API credentials and tokens are set up in the n8n environment. - Update the respective nodes with client ID, client secret, and access tokens. Configuration Google Analytics - Configure the Get Report nodes with the appropriate property ID and metrics. - Ensure correct date ranges are selected for each node. Formatting Node - The Format Data node processes aggregated data and generates the HTML content. - Customize the HTML styling and segment colors as needed. Email Node - Configure the Gmail node with OAuth credentials. - Set the recipient email address and subject line dynamically. Error Handling Common Issues 1. Authentication Errors: - Ensure OAuth credentials are correct. - Verify that the APIs are enabled in the Google Cloud Console. 2. Empty Data: - Check the raw data from Google Analytics. - Validate the property ID and query parameters in the Get Report nodes. 3. Parsing Errors: - Ensure the parser nodes are correctly configured and match the expected input format. Debugging - Use debug logs in each node to identify data flow issues. - Add error-handling nodes to capture and log issues during execution. Example Usage 1. Run the Workflow - Trigger the workflow to fetch, process, and format Google Analytics data. 2. Verify Output - Check the formatted HTML output in the debug logs. - Ensure the email or Google Doc contains the correctly formatted report. Future Enhancements - Add support for additional metrics or dimensions. - Integrate with Slack for notifications. - Enable scheduling for automated reports. - Add a visual dashboard for real-time analytics. ---
How to import this n8n workflow
- 1
Download the workflow JSON file after purchase.
- 2
Open n8n → click the menu → Import from File.
- 3
Select the downloaded JSON and import.
- 4
Set up credentials for each node that requires them.
- 5
Click Execute Workflow to test, then activate.
Setup guide
Setup guide included
Purchase to unlock the full step-by-step guide
Related N8n workflows
Create HubSpot companies & tasks from Jotform submissions with Google Sheets
Translate Slack messages with Google Translate and forward them to Telegram
Handle clinic WhatsApp support with GPT-4o-mini, Pinecone RAG and Gmail alerts
Send a slack message from a new company in Custify
Monitor GitHub releases with Gemini AI Chinese translation & Slack notifications
AI-powered Scrum Master assistant with OpenAI, Slack and Asana integration
Extract university term dates from Excel using CloudFlare markdown conversion
🧑🎓 AI powered language teacher with Telegram, Google Sheet and GPT-4o
Reviews
No reviews yet
Be the first to buy and share your experience.
Leave a review
Sign in to share your experience with this workflow.
Create a free account to purchase workflows.
- JSON blueprint — instant download
- Setup guide PDF included
- 5 downloads · valid 30 days
- Works with n8n
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.
- Configure live on Google Meet / Zoom
- Free follow-up if workflow has defects
- Platform expert assigned to you