I automated my whole weekly reporting with 40 lines of Node — here's the setup
Every Friday I used to lose two hours copy-pasting numbers into a report. Now it runs itself in about 6 seconds. No SaaS, no n8n, no Zapier bill. Just Node and a couple of small files.
Here's the whole thing, and why I think most people over-engineer this.
The problem with "automation tools"
I tried the usual stack first: schedule a Zap → pull data → format → email. It worked, until:
- A field changed name upstream and the whole chain silently produced garbage.
- I hit the free tier's task limit mid-month.
- Debugging meant clicking through a visual builder that hides the actual logic.
The lesson (and I've now seen it repeated across dozens of small workflows): if the logic fits in one file, keep it in one file. Visual builders are great for integrating 5 third-party apps you don't control. They're a tax when you're just transforming your own data.
The 4-step pipeline
My report pipeline is deliberately boring:
- Collect — read from a handful of sources (a CSV export, a small SQLite table, one JSON API).
-
Normalize — map everything into one shape:
{date, metric, value, source}. - Compute — group by week, compute deltas vs. last week.
- Render — emit Markdown + a tiny HTML summary you can paste into Slack/Notion.
const rows = loadAll(); // 1
const norm = rows.flatMap(toCanonical); // 2
const byWeek = groupByWeek(norm); // 3
render(byWeek); // 4
That's the skeleton. The rest is just having one canonical shape. Once every source snaps to the same {date, metric, value, source} object, every downstream step becomes trivial — and testable.
Two details that saved me the most time
Idempotency beats cleverness. The script writes a source_date + hash marker per run. If it runs twice, nothing double-counts. When automation runs unattended, "safe to run again" matters more than "fast."
Fail loud, fail early. If a source returns 0 rows when it should return >0, the script exits non-zero instead of publishing an empty report. Silent success is the most expensive bug in any pipeline.
Where templates help
The pipeline is the fun part. The output — the weekly report template, the number formatting, the exact sections a stakeholder expects — is the part nobody wants to rebuild. I keep a small library of pre-built productivity templates (report layouts, budget trackers, prompt packs) for exactly this reason, mainly so I don't re-invent the formatting layer each time. If that's useful to you, I keep them together here: productivity templates + AI prompt packs.
But honestly: start with the 40-line script. Templates are the last 10%. The pipeline is the 90% that actually saves the two hours.
The takeaway
If you're automating something you own, reach for plain code before a platform. Fewer moving parts, no per-task pricing, and you can actually read what it does next time something breaks.
What's the one recurring task you still do by hand? That's usually the highest-ROI place to start.
Top comments (0)