E-mail based automation

My first serious personal development project in a long time

I spend a lot of time using e-mail.

E-mail is, quite literally, my favourite format to organize myself for all kinds of purposes.

Until now, I had a mix of my "main" inbox and my personal data inbox, which was messy and hard to track once I received lots of comms.

So I decided to build a small setup where a cron-based script would check my mailbox by IMAP, extract every e-mail matching a "known" format, and enqueue the tasks on my job queue broker.

Behind that comes a few workers, each performing a different task, e.g. creating a draft on one of my blogs, publishing a new chapter on my writings website, sending me a SMS through a SMS gateway, creating a todo list through my todo app, etc.

I'm about done with the pre-broker part, and am planning the worker's core structure now.

The way I built it means I can simply do something like the following, and I'll have a new worker ready and running.

$ python -m pip -i https://my-pypi/ install hook-worker-orders
$ systemctl enable hook-worker@orders
$ systemctl start hook-worker@orders

And boom, everything's automatically ready (systemd's config specialization is perfect for this need, I love it) and I have a new task that can be processed without caring much for the rest of the infrastructure.