Skip to content

Add briefing email API for Hermes cron digests#104

Merged
frogr merged 2 commits intomainfrom
hermes/briefing-email
Mar 17, 2026
Merged

Add briefing email API for Hermes cron digests#104
frogr merged 2 commits intomainfrom
hermes/briefing-email

Conversation

@frogr
Copy link
Copy Markdown
Owner

@frogr frogr commented Mar 17, 2026

What

Adds a new API endpoint at POST /api/v1/briefings/send that accepts dynamic email content and sends it via Resend from hi@austn.net.

Why

This powers a Hermes Agent cron job that runs every 3 days and sends a briefing digest with:

  • Latest tech & AI news
  • Stock market highlights
  • Weather in Turlock and Brooklyn
  • Recent git activity on austn.net

What's included

  • BriefingMailer - accepts recipient, subject, and sections (array of title + HTML content)
  • Dark-themed HTML email template - matches the austn.net aesthetic
  • API controller with Bearer token auth (BRIEFING_API_KEY env var)
  • Plain text fallback

Setup needed after deploy

Set the BRIEFING_API_KEY env var in production — the Hermes cron job will use this to authenticate.

Files changed

  • app/mailers/briefing_mailer.rb
  • app/controllers/api/v1/briefings_controller.rb
  • app/views/briefing_mailer/digest.html.erb
  • app/views/briefing_mailer/digest.text.erb
  • config/routes.rb (one new route)

frogr added 2 commits March 16, 2026 21:04
- BriefingMailer with dark-themed HTML template
- POST /api/v1/briefings/send endpoint with Bearer auth
- Accepts dynamic sections (title + HTML content)
- Plain text fallback included
This is an internal-only endpoint sending to a fixed address,
no need for API key auth.
@frogr frogr merged commit ec3d03b into main Mar 17, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant