n8n

How to Automate Google Analytics Weekly Report Email?

Get a clear weekly website report sent to your inbox. The flow pulls page views, user activity, top landing pages, and country traffic, then compares this week to last week. It suits marketers, founders, and content teams who want fast insights without opening dashboards.

It runs on a schedule or with a test button. Google Analytics steps collect three sets of data for the current week and the prior week: page engagement by screen name, landing page performance, and traffic by country. Code steps parse and compare the numbers, calculate week over week changes, and merge everything into one dataset. A formatting step creates a clean summary, and Gmail sends the final email to your recipients.

You need a GA4 property and a Gmail account. Add your property ID, connect both credentials in n8n, and set the day and time for the weekly run. Teams can cut reporting time from about an hour to a few minutes and spot drops or wins faster across pages and regions. Use it to track new posts, monitor country launches, and share a simple weekly update with stakeholders.

What are the key features?

  • Manual and scheduled runs so you can test anytime and send a weekly report automatically
  • GA4 page engagement pull with views, users, and events by screen name
  • GA4 landing page performance using landing page plus query string
  • GA4 country level metrics with active users and engagement
  • Two time windows captured this week and prior week for comparison
  • Code steps parse results and calculate week over week changes
  • Aggregation and formatting nodes combine all sections into one message
  • Gmail sends the final summary email to your chosen recipients

What are the benefits?

  • Reduce weekly reporting time from 60 minutes to 5 minutes
  • Automate over 90 percent of routine analytics checks
  • Improve data accuracy by removing copy and paste errors
  • Connect Google Analytics and Gmail in one workflow
  • Track many pages and countries without extra effort

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Analytics and Gmail. See the Tools Required section above for links to create accounts with these services.
  3. Connect Google Analytics: double click any Google Analytics node, open the 'Credential to connect with' dropdown, click 'Create new credential', then follow the on screen steps to sign in and allow access. Save the credential.
  4. Set your GA4 property: in each Google Analytics node, choose your property from the list or paste the property ID. Keep the default dimensions and metrics unless you have a special need.
  5. Confirm date ranges: the flow already pulls this week and prior week. Check your timezone in n8n so comparisons match your reporting week.
  6. Connect Gmail: double click the 'Email the Report' node, create a new Gmail credential, follow the on screen steps, and save. Set the To and Subject fields.
  7. Review formatting: open the 'Format Data' code node to see the message layout. Adjust any labels or sections to match your style.
  8. Run a test: click 'Test workflow' to trigger a manual run. Check your inbox for the report. Confirm page, landing page, and country sections show current and prior week numbers.
  9. Schedule the report: open the Schedule Trigger node, pick Weekly, choose day and time, then activate the workflow. Verify the schedule appears in the workflow list.
  10. Troubleshoot: if a GA node returns no rows, confirm the property has data for the selected dates and your user has read access. If Gmail blocks sending, check Google account security and daily send limits. If fields look undefined, check keys used in the 'Parse' and 'Format Data' steps.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

Google Analytics

Sign up

Free (GA4 standard): $0; API access included and subject to quotas

Credits:
Credit to Keith Rumjahn for the original idea. Adapted and shared by Alex Kim profile.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.