I Built a Daily News Newsletter Bot with Hermes Agent — Here's Everything That Went Wrong (and Right) A developer built a daily news newsletter bot using Hermes Agent, TypeScript, and Nodemailer, but encountered multiple failures including a typo that caused a 30-minute debugging session and a container rebuild that deleted all configuration. The bot, designed to deliver top news from Canada, India, and the AI/tech space along with a motivational quote and health tip, required fixes for SMTP spam filtering and TypeScript module conflicts. The project ultimately succeeded using GitHub Codespaces, OpenRouter's free LLM API, and the tsx runtime instead of ts-node. Submitted for the Hermes Agent Challenge I wanted one simple thing: a daily email that lands in my inbox every morning with the top news from Canada, the world, India, and the AI/tech space — plus a motivational quote and a health tip. One email. Everything in one place. No scrolling through five different apps before my coffee. Sounds simple. It wasn't. This is the honest story of building a daily briefing bot using Hermes Agent — including every wall I hit, every config I lost, and every moment where it finally clicked. Hermes Agent — the brain that fetches news and generates the newsletter GitHub Codespaces — free cloud dev environment no touching my personal Mac TypeScript + Nodemailer — sends the email via Gmail SMTP OpenRouter — free LLM API for Hermes to use No paid services. No cloud bills. Just open source tooling wired together. I specifically didn't want this running on my personal Mac. I wanted it isolated — something I could destroy and rebuild without affecting my machine. GitHub Codespaces gave me a free Linux environment in the browser. Perfect. Or so I thought. Problem 1: The Typo That Took 30 Minutes After getting Nodemailer set up and running my send script, the terminal just... hung. No error. No output. Just silence. I thought it was a firewall issue in Codespaces blocking SMTP port 587. I switched to port 465. Still hanging on some runs. I added verbose logging. I tried verify calls. Then I spotted it: hostname: 'smpt.gmail.com' smpt instead of smtp. One transposed letter. Thirty minutes of debugging. Lesson: Always print your env vars before debugging the code. Problem 2: Rebuilding the Container Deleted Everything This one hurt. I had Hermes installed, my .env configured, my SMTP secrets set up, everything working. Then I rebuilt my Codespace container to fix an unrelated issue. Gone. All of it. Hermes was uninstalled. My environment variables vanished. My .env file disappeared. I had to reinstall everything from scratch and reconfigure all my secrets. The fix was two things: First, create a .devcontainer/devcontainer.json so Hermes auto-installs on every rebuild: { "name": "daily-brief-hermes", "postCreateCommand": "pip install hermes-agent && npm install" } Second, keep secrets in ~/.hermes/.env and your project .env committed to a safe location — not just floating in your shell session. Lesson: Never trust your shell session. Anything not written to a file is gone the moment the container rebuilds. Problem 3: ts-node Fighting with "type": "module" My package.json had "type": "module" in it, which made ts-node throw: TypeError: Unknown file extension ".ts" Three different error messages, two config changes, one Stack Overflow rabbit hole. The fix was switching from ts-node to tsx — a drop-in replacement that handles both ESM and CommonJS without any config: npm install --save-dev tsx npx tsx send-newsletter.ts briefings/2026-05-26.md Lesson: Use tsx over ts-node for TypeScript in modern Node projects. It just works. Problem 4: "Newsletter Sent " But No Email The most confusing moment. The script printed Newsletter sent — Nodemailer was happy, no errors thrown. But my inbox was empty. Three possible culprits I had to rule out one by one: Spam folder — it was there. Gmail flagged it as spam. Wrong app password — Gmail requires a 16-character App Password, not your regular login password. Easy to get wrong. Empty file being sent — the file path resolved correctly but the content hadn't been written yet. The spam issue was fixed by adding a proper sender name and dynamic subject line: await transporter.sendMail { from: "Daily Brief 📰" <${SMTP USER} , to: RECIPIENTS.join ", " , subject: Daily Brief — ${new Date .toLocaleDateString "en-CA", { weekday: "long", year: "numeric", month: "long", day: "numeric" } } , text: body, } ; Lesson: Always check spam. Always use Gmail App Passwords, not your account password. Always mark the first email as "Not Spam" to train Gmail. Problem 5: Hermes Had No Model Configured After getting email working, I opened hermes chat and pasted my newsletter prompt. Hermes responded with: No inference provider configured. Run 'hermes model' to choose a provider and model, or set an API key in ~/.hermes/.env Then after adding the OpenRouter key: HTTP 400: No models provided The API key was there but no model was set. The fix was adding HERMES MODEL to ~/.hermes/.env: OPENROUTER API KEY=sk-or-xxxxxxxxxxxxxxxx HERMES MODEL=owlobot/owl-7b Lesson: Hermes needs both an API key AND a model specified. One without the other gives cryptic errors. Once everything was configured, Hermes was genuinely impressive to use. I pasted a plain English prompt: Today is 2026-05-26. Search the web for today's top 5 headlines for Canada news, World news, India news, and AI/tech news. Add one motivational quote and one health tip. Format as Markdown and save to /workspaces/daily-brief-hermes/briefings/2026-05-26.md And Hermes: That's the part that made the whole painful setup worth it. I didn't write a single line of news-fetching code. No RSS parsers, no news APIs, no scraping. Hermes handled all of it through natural language. ~/.hermes/.env └── OPENROUTER API KEY + HERMES MODEL └── SMTP credentials hermes chat manual trigger or cron └── Reads skills/daily brief.md prompt └── Searches web for today's news └── Generates Markdown newsletter └── Saves to briefings/YYYY-MM-DD.md npx tsx send-newsletter.ts briefings/YYYY-MM-DD.md └── Reads ~/.hermes/.env for SMTP credentials └── Sends email via Gmail SMTP port 465 └── Delivers to all recipients in the list hermes cron start Inside hermes chat : /cron add "0 8 " "Read the skill at /workspaces/daily-brief-hermes/skills/daily brief.md and generate today's newsletter. Save it to /workspaces/daily-brief-hermes/briefings/ $ date +%Y-%m-%d .md then run: npx tsx /workspaces/daily-brief-hermes/send-newsletter.ts /workspaces/daily-brief-hermes/briefings/$ date +%Y-%m-%d .md" Every day at 8am UTC, Hermes generates and sends the newsletter automatically. Note: Codespaces sleeps when idle, so for a truly always-on setup you'd move this to a small VPS. But for prototyping and learning, Codespaces works perfectly. The setup friction is real — especially in a Codespaces environment where rebuilds wipe your state. But once Hermes is configured, the experience of writing plain English instructions and watching it search the web, reason about content, and produce structured output is genuinely different from anything I've built before. I didn't write a news aggregator. I didn't build a scraper. I wrote a prompt and a TypeScript email script, and I get a daily briefing in my inbox every morning. That's the part that sticks with me. Built for the Hermes Agent Challenge | GitHub: daily-brief-hermes