Automate Weekly Online Marketing Reports with n8n

Automate the collection, analysis, and reporting of weekly online marketing data from Google Analytics, Google Ads, and Meta Ads using n8n. This workflow saves hours of manual data gathering by generating AI-powered summaries and sending professional reports via email and Telegram.
scheduleTrigger
lmChatOpenAi
googleAnalytics
+9
Workflow Identifier: 1289
NODES in Use: Schedule Trigger, OpenAI Chat Model, ToolWorkflow, Google Analytics, Code, HTTP Request, Set, Summarize, EmailSend, Facebook Graph API, Telegram, Langchain Agent

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This workflow runs every Monday at 7 a.m. and collects marketing data from several places automatically.
It solves the problem of spending many hours manually looking up data on multiple platforms.
At the end, it sends a clear email report showing how ads and website did, comparing this week to last year.
You get fast, accurate weekly reports without doing all the work.


Inputs, Processing, and Outputs

Inputs

  • Google Analytics API: Website and e-commerce metrics from multiple domains.
  • Google Ads API: Advertising campaign data and performance metrics.
  • Meta Ads (Facebook Graph API): Social advertising metrics.
  • Date ranges: Dynamic last 7 days and same 7 days last year.

Processing Steps

  • Calculate date ranges in code nodes for dynamic queries.
  • Fetch data from Google Ads and Meta Ads for current and last year periods.
  • Fetch website and e-commerce stats from Google Analytics for the same periods.
  • Process and summarize raw data into totals and important metrics like CTR and ROAS.
  • Use AI, GPT-4, to create easy-to-read summaries and tables.
  • Compile all these pieces into one HTML email and optional telegram message.

Outputs


Why Use This Workflow

Manual weekly reporting wastes many hours.
Manual data entry can cause errors.
This workflow saves time and gives fast, clear insights.
You can trust the numbers to be correct and timely.


Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Import the workflow

  1. Download the workflow file using the Download button on this page.
  2. In the n8n editor, click on “Import from File” and upload the downloaded workflow.

Step 2: Add credentials and settings

  1. Enter your Google Analytics OAuth2 credentials.
  2. Enter Google Ads OAuth2 credentials and developer token.
  3. Add Facebook Graph API credentials.
  4. Insert the OpenAI API key for GPT-4.
  5. Fill SMTP email account details to enable email sending.
  6. Add Telegram API credentials if you want messages sent there.
  7. Update any domain IDs, email addresses, or chat channel IDs in the nodes as needed.

Step 3: Test the workflow

  1. Run the workflow manually once to check data retrieval and report generation.
  2. Look for errors in the execution panel and fix any credentials or settings issues.

Step 4: Activate for production

  1. Enable the workflow to run on schedule every Monday at 7 a.m.
  2. Monitor first few runs to ensure emails are sent correctly.
  3. Once stable, rely on the workflow to deliver reports automatically.

For users wanting full control by running n8n on server, check self-host n8n options.


Tools and Services Used

  • Google Analytics API: Gets website and e-commerce data.
  • Google Ads API: Provides campaign metrics like clicks and cost.
  • Facebook Graph API: Fetches Meta Ads performance data.
  • OpenAI API (GPT-4): Creates natural language summaries from numbers.
  • SMTP Email Account: Sends composed email automatically.
  • Telegram Bot API (optional): Sends shortened report messages.
  • n8n workflow automation platform: Connects all steps and manages scheduling.

Common Problems and Fixes

  • 401 Unauthorized in Google Ads API: Fix by reauthenticating OAuth and verifying developer token.
  • OpenAI node errors: Check API key limits and verify model ID is “gpt-4o” or similar.
  • Email not sent: Confirm SMTP username, password, and sender email are correct.

Customization Ideas

  • Add other ad platforms like Bing Ads or LinkedIn Ads with new API nodes.
  • Change schedule timing to daily, biweekly, or monthly through the Schedule Trigger.
  • Modify AI prompts in OpenAI nodes to generate reports in other languages.
  • Include more metrics like bounce rate or new users in Code nodes.
  • Adjust HTML styling in the email to match brand colors or logos.

Summary

✓ Saves over 3 hours every week by automating report building.
✓ Automatically pulls data from Google Analytics, Google Ads, and Meta Ads.
✓ Calculates important metrics and compares this week to last year.
✓ Uses AI to write clear summaries and professional emails.
✓ Sends reports by email and optionally Telegram for fast team updates.
✓ Removes mistakes that happen when doing this by hand.


// Code example: Date calculation for Google Ads query
const today = new Date();
const end = new Date(today);
end.setDate(today.getDate() - 1);
const start = new Date(end);
start.setDate(end.getDate() - 6);
function formatDate(date) {
  const year = date.getFullYear();
  const month = String(date.getMonth() + 1).padStart(2, '0');
  const day = String(date.getDate()).padStart(2, '0');
  return `${year}${month}${day}`;
}
return { startDate: formatDate(start), endDate: formatDate(end) };

Frequently Asked Questions

Download the workflow file from this page, then use the Import from File feature inside the n8n editor. Add all required API keys and credentials, update IDs or emails if needed, test the workflow, and finally activate it.
This error usually means the OAuth credentials expired or the developer token is incorrect. Reauthenticate and verify tokens in the workflow credentials settings.
Yes, the workflow includes optional Telegram nodes that send a condensed text version of the weekly report to chosen channels or groups.
Yes, by editing the prompts inside the OpenAI nodes, the summary and report can be generated in other languages such as Spanish or French.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free