Daily Email Reports with Serverless & Node.js

I like to receive quick-and-simple reports for my side projects in the email inbox every morning. This helps to have a good understanding of the progress, but without paying too much attention to Google Analytics or getting lost in sql queries.

Problem is, for all my projects the KPIs are different. For some apps it is the daily subscriber count, for others a key API’s usage for example. The technical stack also varied a lot: some project were written in Python, some in Node.js and others in Java. I couldn’t reuse much of the code for all those projects.

The solution was to create a super-lightweight external app that extracts the important data points from the database and sends it out in a nice email.

This new open-source project is then a simple tool, where you can create reports from simple database queries, and send those reports out in pretty emails. (I also did one Google Analytics integration for one of my projects, but that code still needs some cleaning-up before it can be open-sourced.)

This app runs on AWS Lambda, so you don’t need to set up servers or worry about hosting: you just deploy the function and add a scheduler on the AWS dashboard to run it. I’ve set it for daily or weekly mails, but it does support all sorts of triggers too.

Source code & quick start guide on Github.

Enjoy!

j j j