Projects · 03/06

Projects

Daily Hacker News digest agent

A self-running n8n workflow that wakes at 08:00, gathers the top 30 Hacker News stories, lets Claude categorise them, writes a Turkish daily digest and delivers it to Telegram.

cd ..back to projects

Overview

The workflow pulls story IDs from the free Hacker News API, fetches each item with batching and retries, and upserts the rows into an n8n Data Table keyed by story id so the first-seen timestamp survives across days. A single Claude Haiku call classifies all 30 titles at once; sorting and counting happen in a Code node and are never left to the model. Claude Sonnet then writes the digest, which is HTML-escaped and split into 4096-character Telegram messages. A separate error workflow reports failures to Telegram, and a bonus MCP server exposes the table as tools to Claude Code, Claude Desktop and Cursor.

Highlights

  • One LLM call for 30 titles, roughly 30 times cheaper than per-item calls, with a JSON-parse fallback to a default category.
  • Upsert logic keeps first-seen dates stable; a second run never adds rows.
  • Telegram HTML parse mode with escaping and chunking, three retries per send.
  • Exported workflow JSON contains no credentials; a repo script scans for leaked API keys and checks that the readable Code-node copies match the JSON.