English | Polski 🇵🇱
Marketing agencies waste 1–2 hours every week manually compiling client reports: copying sales numbers, re-typing Google reviews, formatting emails. This automation does it all — the report lands in the client's inbox every Monday at 7:00 AM, before anyone starts their workday.
flowchart LR
A(["⏰ Schedule<br/>Mon 7:00 AM"]) --> B["⚙️ Config<br/>(single edit point)"]
B --> C["📊 Google Sheets<br/>sales data"]
C --> D["⭐ Firecrawl<br/>Google reviews scrape"]
D --> E["🧮 Code<br/>week-over-week deltas"]
E --> F["🤖 OpenAI<br/>summary + recommendation"]
F --> G["📄 Code<br/>render HTML template"]
G --> H(["✉️ Resend<br/>email to client"])
D -. "scrape fails →<br/>report without reviews" .-> E
F -. "AI fails →<br/>numeric fallback" .-> G
style A fill:#111827,color:#fff
style H fill:#16a34a,color:#fff
One n8n workflow, 8 nodes, zero manual clicks. Every new client = editing one Set node (business name, Google Maps URL, e-mail addresses).
| Section | Source | Example |
|---|---|---|
| 💰 Revenue + WoW change | Google Sheets (POS export) | 14 280 zł (+4.6%) |
| 🛒 Transactions & avg. basket | Google Sheets | 98 transactions, 145.70 zł |
| ⭐ New Google reviews & rating | Firecrawl scrape of public Maps listing | 3 new, 4.6/5 |
| 🤖 AI summary (2–3 sentences) | OpenAI gpt-4o-mini | "Revenue grew 4.6% to 14 280 zł..." |
| 💡 One actionable recommendation | OpenAI gpt-4o-mini | "Check if the June promo is still live..." |
Note
Why scraping instead of the official Google Business Profile API? The official API requires a business-use-case approval process that can take weeks. Scraping the public listing via Firecrawl ships the demo in hours — and the architecture is designed so the real API can be swapped in later without rebuilding anything.
flowchart TD
S{"Sheet has<br/>sales data?"} -- no --> X["❌ Stop with clear error<br/>(a report without sales data is useless)"]
S -- yes --> R{"Firecrawl<br/>scrape OK?"}
R -- no --> R2["⚠️ Continue without reviews section"]
R -- yes --> AI{"OpenAI<br/>responds?"}
R2 --> AI
AI -- no --> AI2["⚠️ Numeric fallback summary"]
AI -- yes --> OK(["✅ Report delivered"])
AI2 --> OK
style X fill:#dc2626,color:#fff
style OK fill:#16a34a,color:#fff
All 5 scenarios are covered by logic tests that run the actual code from the workflow file (not a copy): happy path, scrape failure, AI failure, empty sheet, single week of data.
- Get API keys — OpenAI, Firecrawl (free tier), Resend (free tier)
- Create a Google Sheet with a
salestab — columns as inmock-data/sales-example.csv - Import
workflows/weekly-report.jsoninto any n8n instance (cloud or self-hosted) and attach credentials - Edit the
Konfiguracjanode — business name, Google Maps URL, recipient & sender e-mail - Execute manually to test → activate the workflow
Full step-by-step instructions: docs/setup.en.md (wersja polska)
📦 Report data schema (JSON)
{
"period": { "from": "2026-07-06", "to": "2026-07-12" },
"sales": {
"revenue": 12450,
"revenue_change_pct": -12.3,
"transactions": 87,
"avg_basket": 143.1
},
"reviews": {
"new_count": 3,
"average_rating": 4.6,
"latest": [
{ "author": "Anna K.", "rating": 5, "text": "Bardzo miła obsługa." }
]
},
"ai_summary": "Sales dropped 12% vs the previous week, yet customer reviews remain excellent...",
"recommendation": "Check whether the June promo is still displayed on the homepage."
}📁 Repository structure
workflows/
weekly-report.json # n8n workflow export (validated, ready to import)
templates/
report-template.html # e-mail HTML template with {{placeholders}}
mock-data/
sales-example.csv # 10 weeks of sample sales data
docs/
setup.en.md / setup.md # deployment guide (EN / PL)
demo-script.en.md / demo-script.md # 10-min client demo script (EN / PL)
sample-report.html # rendered sample report (live on GitHub Pages)
.env.example # required environment variables
💸 Running costs
| Service | Cost |
|---|---|
| OpenAI (gpt-4o-mini, 1 call/week) | ~$0.01/month — negligible |
| Firecrawl | free tier is enough |
| Resend | free tier: 100 emails/day |
| n8n | free self-hosted or cloud trial |
Business case: replaces ~4 hours of manual work per month. At any agency rate, ROI is immediate.
- Real social media stats via Meta Insights API (requires Meta business verification)
- Official Google Business Profile API instead of scraping
- Branded PDF attachment instead of inline HTML
- Multi-tenant panel — one workflow serving many clients
MIT — use it, fork it, deploy it for your clients.