Free template · n8n
Automated Weekly Report for n8n with AI Analyst Summary
weekly-report-n8n.json
The weekly metrics email is the most automatable document in any company: same numbers, same format, same “sorry this is late” every Monday. This n8n workflow assembles and sends it before anyone’s first coffee — with the arithmetic done in code (so the numbers are exact) and only the narrative written by AI.
What this workflow does
- Schedule trigger fires every Monday at 8:00
- Google Sheets node reads your “Weekly Metrics” tab (one row per week: Revenue, New Customers, Churned, Website Visits, Signups)
- Code node takes the last two rows and computes absolute and percentage deltas for every metric — deterministic math, not LLM math
- OpenAI node turns those deltas into an analyst summary: a one-sentence verdict, 3-5 bullets with the biggest movements, anything beyond ±15% called out, and one suggested focus for the week
- Gmail node emails the report to the team with a link to the full sheet
- Slack node posts the same summary to your team channel
The division of labor is deliberate: the Code node guarantees the percentages are correct, and the prompt explicitly forbids the model from inventing numbers not present in the data. The LLM only does what it’s good at — turning a JSON blob of deltas into three readable paragraphs.
Prerequisites
- n8n instance running continuously (the schedule needs it awake Monday morning)
- Google Sheets credentials and a metrics sheet with at least two weekly rows and the column headers above
- OpenAI API key (
gpt-4o-mini) - Gmail OAuth2 credentials for the sending account
- Slack bot token with access to your team channel
How to import
- Download the JSON from the box at the top.
- In n8n: Workflows → Import from File.
- Attach credentials at the four placeholders and set your spreadsheet ID in both the Sheets node and the email footer link.
- Run it manually once — if your sheet has fewer than two rows, the Code node fails loudly by design rather than reporting nonsense.
- Activate. It now owns Monday mornings.
What to customize
- The metric columns — the Code node has a simple
metricsarray; rename or extend it to match your sheet exactly (names must match headers) - The ±15% callout threshold in the prompt, and the persona (“small SaaS team” by default)
- Recipients —
team@yourcompany.complaceholder in the Gmail node, and the#generalSlack channel - Schedule — switch to daily or monthly by editing one field in the trigger
- Data source — replace the Sheets node with a Postgres or HTTP node if your metrics live in a warehouse; the Code node only cares about getting rows
The end-to-end version, including pulling metrics from multiple sources first, is in the automated weekly reports tutorial.
Cost per run
One small LLM call per week: the deltas JSON is a few hundred tokens in, under 300 tokens out. As of mid-2026 that’s effectively free — fractions of a cent per report, pennies per year. This is the highest leverage-per-token template in the library.
Try it yourself
n8n
Scheduled reporting flows are n8n's home turf — cron-style triggers, a real code step for exact math, and no per-run fees for something that fires every single week forever.
Start with n8n