Automating DevHunt: How We Put Weekly Emails on Autopilot

forcequit

forcequit

Posted on September 14, 2023

Automating DevHunt: How We Put Weekly Emails on Autopilot

Bot-driven upvotes? Not on our watch. DevHunt is open-source, crafted by devs, for devs, with a primary goal to operate autonomously. While Vercel and Supabase serve us well, hands-free email automation was a bit of a buzzkill.

This is what we needed to happen, email wise:

  1. On register, trigger a webhook to send a welcome email.
  2. Announce the top three winners with badges immediately after voting ends at midnight on Mondays.
  3. After 3 hours, notify everyone about the winners.
  4. 9 hours post-voting, inform everyone about the next set of tools to vote for.
  5. Every Friday, remind those who didn’t open the email to cast their vote.
  6. Automate the cycle weekly.

And this is what we ended up doing
We liked the look of the Sensorpro Trigger emails. With cronjobs, they can fetch content from our Supabase API, so a totally hands-free operation. Nice.

This is what the Email Design looks like.
Image description
👆🏿So all we needed to do here was set that url liquid containing whatever content our API puts there, totally set and forget.

And this is the Trigger code:
Image description

Fun fact: DevHunt is on ProductHunt today. We know, right? 🙄 The absolute irony! Still, give us a fair vote 🥇

💖 💪 🙅 🚩
forcequit
forcequit

Posted on September 14, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related