DEV Community

Sasidhar Sunkesula
Sasidhar Sunkesula

Posted on

I Automated a Marketing Agency's Client Reporting — Here's the Exact n8n Workflow

Last month I watched a friend's marketing agency team spend 6 hours every Monday doing the same thing: opening Google Ads, copying numbers into a spreadsheet, opening Meta Ads Manager, copying more numbers, writing a "summary" email to each client, and hitting send.

For 12 clients. Every single week.

I thought: "This is insane. A machine should do this."

So I built one. With n8n + Gemini AI. And it runs in 90 seconds.

What the workflow does

Every Monday at 8 AM IST, this n8n workflow:

  1. Pulls each client's weekly metrics — spend, impressions, clicks, conversions, CPA, ROAS — per channel (Google Ads, Meta, Email, SEO)
  2. Writes an AI narrative — Gemini analyzes the data and writes a professional summary with trends, insights, and a specific recommendation for next week
  3. Builds a branded HTML email — KPI cards with week-over-week deltas, channel breakdown table, AI insights callout
  4. Sends it to each client via Gmail
  5. Logs everything to a Google Sheets audit trail
  6. Posts a Slack recap to the agency owner

Total time: 90 seconds for all 12 clients.

The AI narrative is the killer feature

Here's an actual output from the workflow:

"Your blended ROAS improved 14.7% week-over-week (4.48x → 5.14x), driven primarily by Meta's CPA dropping from $16.20 to $13.80 after the creative refresh on Jul 18. Google Ads remains your highest-volume channel but ROAS dipped slightly (4.12x → 3.95x) — likely audience fatigue on the search campaigns. Recommendation: shift 15% of Google Ads budget to Meta to capitalize on the efficiency gain, and refresh search ad copy by Aug 1."

That's not a template. That's a real insight from the data. The agency owner told me his account managers spend 20 minutes per client trying to write something half this good.

The architecture (for the n8n nerds)

Schedule Trigger (Monday 8 AM)
  → Merge (with Manual Trigger for testing)
  → Client Config (Sheets read)
  → Fetch Metrics (Sheets / Google Ads API / Meta API)
  → Validate Input (email format, required fields, size limits)
  → [Invalid?] → Log to "Invalid Reports" tab
  → Idempotency Check (EventKey = client + date)
  → [Already sent?] → Log to "Skipped Reports" tab
  → Gemini: Write Narrative (gemma-4-31b-it)
  → Parse Narrative (extract from <<<REPORT>>> markers)
  → Build HTML Report (branded email with KPI cards)
  → Gmail: Send Report
  → Prepare Audit Row
  → Sheets: Append to "Report Log"
  → Slack: Agency Recap
Enter fullscreen mode Exit fullscreen mode

Production features:

  • 3× retry on every external node (Gemini, Gmail, Sheets, Slack)
  • Idempotency guard — if the workflow runs twice, it won't double-send
  • Input validation — bad data gets logged, never reaches Gemini
  • Error branches — invalid metrics, already-sent, and extraction failures all route to separate Sheets tabs
  • AI confidence scoring — low-confidence narratives get flagged for human review
  • Sticky notes on the canvas documenting every section

What it cost

  • n8n: self-hosted, free (or $20/mo for n8n Cloud)
  • Gemini API: ~$0.02 per client report (gemma-4-31b-it is cheap)
  • Gmail/Sheets/Slack: free tier
  • My time: ~8 hours to build, test, and deploy

What it's worth

The agency was paying an account manager $25/hour to write reports. 6 hours/week × $25 = $600/month in labor.

The workflow costs about $1/month in API fees.

That's a $599/month saving for a $10 VPS and a Gemini API key.

What I learned

  1. The AI narrative is what sells it. Anyone can pull numbers from an API. The "so what?" — the insight, the recommendation — is what makes a client feel like their agency actually understands their business.

  2. Production features matter more than features. Retries, idempotency, error handling — these are the difference between "cool demo" and "I trust this with my client relationships."

  3. The HTML email template is underrated. A branded report with KPI cards and trend arrows looks 10x more professional than a plain-text email. Clients notice.

  4. Sticky notes on the canvas make the workflow self-documenting. When the agency's tech lead opened the n8n editor, he understood the entire flow in 30 seconds.

Want this for your agency?

I build production-grade n8n automations for marketing agencies, B2B SaaS teams, and finance departments. Every workflow includes:

  • Real integrations (not mocks)
  • AI-powered decision making (Gemini/GPT)
  • Error handling, retries, audit logging
  • Deployment + documentation
  • Monthly monitoring retainer

If your team still writes reports by hand, DM me or comment below. I'll send you a 3-minute Loom of this workflow running with sample data.


Sasidhar Sunkesula is a Full-Stack Developer & Automation Engineer. He builds n8n workflows that don't break. GitHub · LinkedIn

Top comments (0)