Category: Automations › SEO, Analytics & Reporting · Best for: Agencies reporting to clients · Platform: n8n · Steps: 19
What it does
Your website reports are made and sent for you, ready for clients.
This workflow will check for country views, page engagement and google search console results. It will take this week's data and compare it to last week's data.
Works with: Google Analytics, Gmail
What you get
- The n8n workflow file (
workflow.json), ready to import - This setup guide
- The list of fields to change for your own accounts (see Install below)
- Email support if you get stuck
Before you start
-
An n8n account. Easiest: n8n Cloud (free trial). Self-host for free with Docker:
docker run -it --rm -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n, then open http://localhost:5678. -
Accounts and API keys for these services:
- Google (Sheets, Gmail, Drive, Calendar, Docs): how to connect (used by Get Page Engagement Stats for this week, Get Page Engagement Stats for prior week, Get Google Search Results for this week, Get Country views data for this week, Get Google Search Results for prior week, Get Country views data for prior week, Email the Report)
Install
- In n8n, click Create workflow (top right).
- Click the ⋯ menu → Import from file and choose
workflow.json. Or open the file, copy everything and paste it onto the empty canvas with Ctrl/Cmd + V. - Open each node with a red warning triangle and pick or create the matching credential from the list above.
- Point these fields at your own sheets, chats and accounts:
- Email the Report →
sendTo: choose your own
- Email the Report →
- Click Save.
Test it
- Click Test workflow (or Execute workflow). When clicking ‘Test workflow’ starts it. Trigger it once with real sample data.
- Click each node to check its output. A green tick means the step worked.
- Fix any red node: it's almost always a credential or a field that still points at a sheet or chat that isn't yours.
Go live
Toggle Active (top right). From now on it runs on its own. Check Executions in the left sidebar to see every run.
How it works, step by step
- When clicking ‘Test workflow’ starts the workflow (Manual).
- Schedule Trigger starts the workflow (Schedule).
- Get Page Engagement Stats for this week uses Google Analytics.
- Parse - Get Page Engagement This Week reshapes the data for the next step.
- Get Page Engagement Stats for prior week uses Google Analytics.
- Parse - Get Page Engagement Prior Week reshapes the data for the next step.
- Get Google Search Results for this week uses Google Analytics.
- Parse - Get Google Search This Week reshapes the data for the next step.
- Get Google Search Results for prior week uses Google Analytics.
- Parse - Get Google Search Prior Week reshapes the data for the next step.
- Get Country views data for this week uses Google Analytics.
- Parse - Country Views This Week reshapes the data for the next step.
- Get Country views data for prior week uses Google Analytics.
- Parse - Country Views Prior Week reshapes the data for the next step.
- Set urlStrings reshapes the data for the next step.
- Aggregate Data reshapes the data for the next step.
- Input All reshapes the data for the next step.
- Format Data reshapes the data for the next step.
- Email the Report uses Gmail.
Extra setup notes
These notes are also on the canvas as yellow sticky notes:
Aggregate Google Analytics data and Email the results
This workflow will check for country views, page engagement and google search console results. It will take this week's data and compare it to last week's data.
Credit to Keith Rumjahn for the original workflow, which I modified.
Property ID
- Create your Google Analytics Credentials
- Enter your property ID or Choose from the List of Properties.
AlexK1919
I’m Alex Kim, an AI-Native Workflow Automation Architect Building Solutions to Optimize your Personal and Professional Life.
Format the data and Email
Troubleshooting
- "Credentials not found": open the node and select your credential again.
- Google "access blocked": in Google Cloud, add your email as a test user on the OAuth consent screen.
- Webhook not firing: copy the node's Production URL (not Test URL) into the other app, and make sure the workflow is Active.
- AI node errors: check your API key has billing enabled and the model name exists on your plan.
- Nothing happens on schedule: the workflow must be Active, and self-hosted n8n must stay running.
Need help?
Reply to your Morning Method order email and we'll help you get it running.
© Morning Method