Menu

1 / 2

Sending new post notifications with Resend

DEV Community·Roger Rajaratnam·6 months ago
#AP6uMau4
#engineering#astro#resend#const#script
Reading 0:00
15s threshold

Original post: Sending new post notifications with Resend

Series: Part of How this blog was built — documenting every decision that shaped this site.

When a new post goes live, I want subscribers to know about it. The mailing list

runs through Resend — subscribers are stored in a Resend

Segment, and broadcasting to them means calling the Resend Broadcasts API. The

question was: how do I trigger that broadcast as part of the publish flow, without

adding complexity to the build pipeline?

The answer is a standalone Node.js script — scripts/notify-new-post.js — that

runs manually after publishing. It reads frontmatter directly, builds an HTML email,

previews it in the terminal, and asks for confirmation before sending.

Diagram fallback for Dev.to.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.