DEV Community

forcequit
forcequit

Posted on

3 3 3 3 4

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 🥇

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (1)

Collapse
 
johnrushx profile image
John Rush

good article

Billboard image

Imagine monitoring that's actually built for developers

Join Vercel, CrowdStrike, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay