See llms.txt for all machine-readable content.

Back to Templates

AI marketing report (Google Analytics & Ads, Meta Ads), sent via email/Telegram

What this workflow does

This workflow retrieves Online Marketing data (Google Analytics for several domains, Google Ads, Meta Ads) from the last 7 days and the same period in the previous year. The data is then prepared by AI as a table, analyzed and provided with a small summary.
The summary is then sent by email to a desired address and, shortened and summarized again, sent to a Telegram account.

This workflow has the following sequence:

  1. time trigger (e.g. every Monday at 7 a.m.)
  2. retrieval of Online Marketing data from the last 7 days
  3. assignment and summary of the data
  4. retrieval of Online Marketing data from the same time period of the previous year
  5. allocation and summary of the data
  6. preparation in tabular form and brief analysis by AI.
  7. sending the report as an email
  8. preparation in short form by AI for Telegram (optional)
  9. sending as Telegram message.

Requirements

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

Feel free to contact me via LinkedIn, if you have any questions!

Set WEEKLY_GA_PROPERTIES to a JSON array with one to five objects, each with a GA4 property id and display label. Set WEEKLY_GOOGLE_ADS_ID and WEEKLY_META_ADS_ID, plus WEEKLY_GOOGLE_ADS_MANAGER_ID if your access uses a manager. Set WEEKLY_REPORT_FROM and WEEKLY_REPORT_TO. Set WEEKLY_TELEGRAM_CHAT to enable the optional Telegram summary. Connect Google Analytics OAuth, Meta Graph, OpenAI, SMTP and optionally Telegram credentials. On Authorize Google Ads reporting, select a Custom Auth credential with body fields client_id, client_secret and refresh_token for your Google Ads OAuth app. On Fetch Google Ads totals, select a Header Auth credential named developer-token with your Google Ads developer token. Store these secrets only in n8n credentials. Successful, failed and manual execution data saving is disabled for this workflow.