Some months ago, I launched Stori.
Lots of people started to register, add Instagram Accounts to view and save their stories’ performance.
After 2 days, more than 200 people signed up and somebody bought a subscription.
Everything was great! 🚀
(Btw, if you want to check it out, here is Stori: https://stori.social)
But after some times, I started to think that I haven’t full control of everything: was everything really ok? Were the background scripts working? I realized that I haven’t a way to be warned if something wasn’t right.
I started to visit my db more often (ehmm… maybe every 10 minutes?) than necessary, just to see if everything was running smoothly.
Yeah, I was in paranoia mode.
So I created a Telegram Bot.
One night I saw this tweet by Pieter Levels:
And it just got me that I could be notified when something good (or bad) happened on Stori. I use Telegram every day and I found out that it’s really easy to send a message as a Bot.
Here are the 16 lines of code that currently powers my notification bot:
Et voilà! 🧙
I also created some utils function to permit to extract more easily the data that I want (notice the ‘json’ option: in this way I can put whatever data I need to see in a <pre> html element 💪
Now I can be notified when…
A new user registers
Somebody subscribe a plan
A new account is created
And also (and more important) when there are some problems:
That’s it. Now I know exactly what’s going on on Stori and also it’s super cool to have a Robot that warns you whenever something new happens! 🤖