n8n

How to Automate Google Analytics Weekly Reports?

Get a clear weekly view of website performance without manual work. The system collects key Google Analytics data, compares it with the same period last year, and sends a simple report by email and Telegram. It is great for marketing teams that need fast updates every Monday.

It runs on a weekly schedule at a set time. First it pulls the last seven days of GA4 metrics, then maps fields and sums the numbers. A code step calculates the matching seven day window from the previous year and triggers a second GA4 pull. Two summary steps aggregate totals and averages. An AI step builds an easy table with current values, last year values, and percent change. The email node sends the HTML report, and a second AI step turns it into short plain text for Telegram.

You will need access to Google Analytics, an OpenAI API key, SMTP email, and Telegram if you want chat updates. Expect to cut reporting time from hours to minutes while keeping a consistent year over year view. It fits teams that want weekly KPI tracking, leaders who want fast inbox updates, and anyone who likes quick chat summaries on the go.

What are the key features?

  • Weekly schedule trigger runs every Monday at a set hour
  • GA4 data pull for the last seven days with key metrics like page views, users, sessions, session duration, and purchases
  • Code step calculates the same seven day period from the previous year
  • Dual summary steps total and average metrics for both current and last year
  • AI formatting creates an HTML table with percent change for each metric
  • Email node sends the report with a clear subject and HTML body
  • AI converts HTML to short plain text for Telegram and sends it to a chosen chat

What are the benefits?

  • Reduce manual reporting from 2 hours to 5 minutes
  • Automate over 90 percent of weekly reporting steps
  • Improve data accuracy by removing copy and paste errors
  • Connect Google Analytics, OpenAI, email, and Telegram in one flow
  • Send a consistent year over year KPI report every Monday at the same time
  • Give managers fast inbox and chat summaries without dashboards

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, OpenAI, Telegram and Email SMTP. See the Tools Required section above for links to create accounts with these services.
  3. Open the Schedule Trigger node and set the day and hour you want. Make sure the time zone in n8n matches your reporting time zone.
  4. Connect Google Analytics: double click each Google Analytics node, select Credential to connect with, click Create new credential, choose Google Analytics OAuth2, and follow the on screen steps to grant property access.
  5. In the Google Analytics nodes, pick the correct GA4 property. Keep the metrics as provided or adjust them if your team tracks different KPIs.
  6. Leave the date code as is unless you have a special calendar. The Calculation same period previous year node already computes the correct last year window.
  7. Connect OpenAI: double click the Processing for email and Processing for Telegram nodes, create a new OpenAI API Key credential, and paste your key from the OpenAI API page.
  8. Set up email: open the Send Email node, create a new SMTP credential, and enter host, port, username, and password. Set from and to addresses and test your SMTP with a simple email if needed.
  9. Optional Telegram: create a bot with BotFather to get a token. In the Telegram node, create a new Telegram credential with that token, and set the chat ID where messages should go.
  10. Run a manual test: click Execute workflow. Check the Processing for email output for a clean HTML table and confirm you receive the email. If using Telegram, verify the short text message arrives.
  11. Troubleshoot common issues: ensure the GA property ID is correct, verify account permissions, check that the OpenAI key is valid, confirm SMTP settings, and make sure the Telegram chat ID belongs to your bot.
  12. When tests pass, activate the workflow so it runs on schedule and monitor the first few runs in the n8n execution list.

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.

Email SMTP

Sign up

Google Analytics

Sign up

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

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Telegram

Sign up

Free: $0, Telegram Bot API usage is free for developers

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.