๐Ÿ“Š Send weekly GA4 WoW email reports with Gemini AI executive summary

โšก 266 views ยท ๐Ÿ“Š Market Research & Insights

Description

Weekly Google Analytics 4 Report - Full WoW Tracking & Auto-Generated with Gemini AI

Stop manually building weekly analytics reports. This workflow automatically fetches your GA4 data every Monday morning, generates an AI-written executive summary using Gemini, builds a premium formatted HTML email with deep Week-over-Week (WoW) comparisons for every metric, and delivers it straight to your stakeholdersโ€™ inboxes โ€” fully hands-free.

๐Ÿ‘ค Who is this for?

๐Ÿšฉ What problem does this solve?

Manual GA4 reporting is repetitive, error-prone, and time-consuming. This template eliminates that entirely โ€” every Monday at 8:00 AM in your configured timezone, a fully formatted report lands in your inbox. With the new dual-node architecture, it automatically calculates accurate WoW trends for your overall metrics, specific pages, traffic sources, and more, all contextualized by a Gemini-generated executive summary.

โš™๏ธ What this workflow does

  1. โฐ Triggers every Monday at 8:00 AM via the Schedule Trigger node

  2. ๐Ÿ“ก Fetches 14 GA4 reports in parallel - pulling both Current Week and Previous Week data simultaneously for speed:

    • Overview metrics
    • Top 5 Screens / Pages by views
    • Top 5 Traffic Sources / Referrals
    • Top 5 Events by count
    • Top 5 Countries by sessions
    • Device breakdown (mobile / desktop / tablet)
    • New vs Returning users
  3. ๐Ÿ”€ Merges all 14 responses and passes the complete historical dataset forward

  4. ๐Ÿค– Gemini writes a 3-5 bullet point summary analyzing the full WoW dataset to highlight performance trends, audience behaviour, and actionable recommendations

  5. ๐Ÿงฎ Code node processes all data - aligns current vs. previous week data, calculates WoW % changes for every single category, handles new/dropped entries, and builds the full inline-CSS HTML email

  6. ๐Ÿ“ง Sends the report via standard SMTP / Email node to your configured recipients

๐Ÿ“ง What the email report includes

๐Ÿ› ๏ธ Setup Instructions

Step 1 - Google Analytics 4 Credential

  1. Go to n8n Credentials โ†’ Add new โ†’ search Google Analytics OAuth2
  2. Sign in with the Google account that has access to your GA4 property
  3. Assign this credential to all 14 GA4 nodes

Step 2 - Set your GA4 Property ID

  1. Open each of the 14 GA4 nodes
  2. In the Property ID field, replace {YOUR_PROPERTY_ID} with your GA4 numeric property ID
  3. Find your Property ID at: GA4 Admin โ†’ Property Settings โ†’ Property ID (looks like 123456789)

Step 3 - Gemini API Credential

  1. Get your free API key at aistudio.google.com
  2. Go to n8n Credentials โ†’ Add new โ†’ search Google Gemini
  3. Paste your API key and assign it to the Generate AI Summary node

Step 4 - Email / SMTP Credential

  1. Go to n8n Credentials โ†’ Add new โ†’ search SMTP (or swap the node for Gmail OAuth2 if preferred)
  2. Enter your email host, port, and login credentials
  3. Assign to the Send Weekly Report node

Step 5 - Set Recipients

  1. Open the Send Weekly Report node (or the Code node depending on your mapping preference)
  2. Update the To Email field with your recipient address(es): 'email@example.com, email2@example.com'
  3. Alternatively, update the recipients: line at the bottom of the Build Report & Email HTML Code node.

Step 6 - Set Timezone

  1. Open the Weekly Monday Trigger node
  2. Update the workflow settings to match your local timezone so the 8:00 AM trigger fires correctly.

๐Ÿ”ง How to Customise

๐Ÿ“ฆ Requirements

ServicePurposeFree Tier Available
Google Analytics 4Source of all report dataโœ… Yes
Google Gemini APIAI executive summary generationโœ… Yes (via AI Studio)
SMTP / EmailEmail deliveryโœ… Yes

โš ๏ธ Notes

๐Ÿ”— Nodes Used

Send Email, Google Analytics, Schedule Trigger, Google Gemini

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup