Category: Automations › SEO, Analytics & Reporting · Best for: Marketing teams · Platform: n8n · Steps: 46
What it does
Every week you get one report on how your marketing is doing.
- retrieval of Online Marketing data from the last 7 days (via sub workflows)
Works with: OpenAI, Tool Workflow, Tool Calculator, Agent, Google Analytics, Facebook, Email, Telegram
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:
- OpenAI API key: how to connect (used by OpenAI Chat Model, Processing for Google Ads report, Processing for Meta Ads Report, Processing for Google Analytics Report, Processing for Telegram Report)
- Google (Sheets, Gmail, Drive, Calendar, Docs): how to connect (used by Call Google Analytics data: Last 7 days, Call Google Analytics data: Last 7 days (previous year), Call Google Ads Data: Last 7 days, Call Google Ads Data: Last 7 days (previous year))
- Meta / Facebook Graph API: how to connect (used by Call Meta Ads Data: Last 7 days, Call Meta Ads Data: Last 7 days (previous year))
- SMTP email login: how to connect (used by Send mail report)
- Telegram bot token from @BotFather: how to connect (used by Send Telegram 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:
- Send mail report →
toEmail: choose your own - Send Telegram report →
chatId: choose your own
- Send mail report →
- Click Save.
Test it
- Click Test workflow (or Execute workflow). Schedule Trigger 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
- Schedule Trigger starts the workflow (Schedule).
- Execute Workflow Trigger starts the workflow (Execute Workflow).
- Calculate date format for Google Ads request (last 7 days) reshapes the data for the next step.
- Calculate date format for meta ads request s reshapes the data for the next step.
- OpenAI Chat Model uses AI (OpenAI).
- Analytics_Domain_1 uses AI (Tool Workflow).
- Analytics_Domain_2 uses AI (Tool Workflow).
- Analytics_Domain_3 uses AI (Tool Workflow).
- Analytics_Domain_4 uses AI (Tool Workflow).
- Analytics_Domain_5 uses AI (Tool Workflow).
- Google_Ads uses AI (Tool Workflow).
- Meta_Ads uses AI (Tool Workflow).
- Calculator uses AI (Tool Calculator).
- Calculator1 uses AI (Tool Calculator).
- Calculator3 uses AI (Tool Calculator).
- Weekly Report Agent uses AI (Agent).
- Call Google Analytics data: Last 7 days uses Google Analytics.
- Call Google Ads Data: Last 7 days calls an external API (https://googleads.googleapis.com/v17/customers/3300525230/go).
- Call Meta Ads Data: Last 7 days uses Facebook.
- Processing for Google Analytics Report uses AI (OpenAI).
- Processing for Google Ads report uses AI (OpenAI).
- Processing for Meta Ads Report uses AI (OpenAI).
- Processing for Telegram Report uses AI (OpenAI).
- Send mail report uses Email.
- Assign Google Analytics data input (current year) reshapes the data for the next step.
- Format data input (current year) reshapes the data for the next step.
- Assign Meta data from input (current year) reshapes the data for the next step.
- Send Telegram report uses Telegram.
- Summarize Google Analytics input (current year) uses Summarize.
- Assign data from input (current year) reshapes the data for the next step.
- Summarize Meta input (current year) uses Summarize.
- Calculation same period previous year1 reshapes the data for the next step.
- Summarize input (current year) uses Summarize.
- Call Meta Ads Data: Last 7 days (previous year) uses Facebook.
- Call Google Analytics data: Last 7 days (previous year) uses Google Analytics.
- Calculation same period previous year reshapes the data for the next step.
- Assign Meta data input (previous year) reshapes the data for the next step.
- Assign Google Analytics data input (previous year) reshapes the data for the next step.
- Call Google Ads Data: Last 7 days (previous year) calls an external API (https://googleads.googleapis.com/v17/customers/3300525230/go).
- Summarize Meta data input (previous year) uses Summarize.
- Summarize Google Analytics input (previous year) uses Summarize.
- Format data input (previous year) reshapes the data for the next step.
- Format all Meta data for LLM reshapes the data for the next step.
- Assign input (previous year) reshapes the data for the next step.
- Summarize input (previous year) uses Summarize.
- Format all Google data for LLM reshapes the data for the next step.
Extra setup notes
These notes are also on the canvas as yellow sticky notes:
Sub-Workflow: Google Analytics Data
Sub-Workflow: Meta Ads Data
Main Workflow: Weekly Report Assistant
Sub-Workflow: Google Ads Data
Welcome to Online Marketing Weekly Report Workflow!
This workflow has the following sequence:
- time trigger (e.g. every Monday at 7 a.m.)
- retrieval of Online Marketing data from the last 7 days (via sub workflows)
- assignment and summary of the data
- retrieval of Online Marketing data from the same time period of the previous year
- allocation and summary of the data
- preparation in tabular form and brief analysis by AI.
- sending the report as an email
- preparation in short form by AI for Telegram (optional)
- sending as Telegram message.
The following accesses are required for the workflow:
- Google Analytics (via Google Analytics API): Documentation
- Google Ads (via HTTP Request -> Google Ads API):Documentation
- Meta Ads (via Facebook Graph API): Documentation
- AI API access (e.g. via OpenAI, Anthropic, Google or Ollama)
- SMTP access data (for sending the mail)
- Telegram access data (optional for sending as Telegram message): Documentation
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