How to Automate Your Email Reports (and Never Send One Again)

Every Monday morning, I used to spend 20 minutes pulling together a status report: open the dashboard, copy the numbers, paste them into an email, write a few lines of summary, hit send. It was mindless, but I had to do it for my stakeholders.

Then I wrote a script that does it for me. Now I get a Slack notification on Mondays saying “Report sent to 3 people.” I never touch it. Here’s how you can do the same.

First, you need a way to get your data. If you’re using an analytics tool like Google Analytics or Plausible, they have APIs. Even a simple SQL query against your database works. The key is to export the numbers you actually need — don’t try to scrape the whole dashboard. Start with 3-5 metrics that matter.

Next, write a script that fetches that data and formats it into a clean HTML email. I use Python with the requests library for the API call and a simple f-string template for the email body. It’s not fancy, but it looks professional. If you’re comfortable with Node, you can use node-fetch and a template literal.

The hardest part is actually sending the email. You don’t want to set up your own SMTP server if you can avoid it. I recommend using a service like SendGrid or Postmark — they have free tiers for low volume. All you need is an API key. In the script, you just POST to their endpoint with the ‘to’, ‘subject’, and ‘body’ fields.

Once you have the script running, you need to schedule it. If you’re on macOS or Linux, cron is your friend. A simple `crontab -e` entry like `0 8 * * 1` will run it every Monday at 8am. Windows users can use Task Scheduler. The point is: you write it once, set it, and forget it.

I’ve packaged all of this into a reusable script called ’email-report’ — it’s in the library. It takes a YAML config file where you define your metrics, recipients, and schedule. You just fill in your API keys and you’re live.

Now, a word of caution: don’t automate something until you’ve done it manually at least three times. You need to understand the process before you can script it. But once you’ve done that, automation is pure leverage. That 20 minutes becomes 20 seconds of checking a Slack message.

The same principle applies to any recurring report — sales numbers, support tickets, error logs. If you’re sending the same format every week, you’re ready to automate.

So, take the leap. Your future self will thank you.