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 🥇

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (1)

Collapse
 
johnrushx profile image
John Rush

good article

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay