Hacker NewsCoda

Log Hacker News stories about your space to a Coda table

A Hacker News + Coda agent flow

Hacker News surfaces the launches, postmortems, and Show HN threads that shape your market, and almost all of it scrolls past while you're heads-down. A research doc in Coda that fills itself with the relevant stories is a quieter way to keep up. This recipe builds one. The agent calls search_stories for the topics you track, reads the matches, and upserts each into a Coda table with coda_upsert_rows: title, points, comment count, author, and the URL. Hacker News answers the search on request rather than pushing, so the agent runs on a cadence, and because coda_upsert_rows keys on the story id, a thread that's still climbing the front page updates its score in place instead of landing as a second row.

The flow

Hacker Newssearch_stories

Searches Hacker News stories by query.

Codacoda_upsert_rows

Inserts new rows or updates existing rows in a table.

Step by step

  1. Search the topics

    One search_stories call per query covers the frameworks, companies, or themes you follow. The response is the matching stories with title, points, comment count, author, and the external and discussion URLs.

  2. Upsert by story id

    Each story has a stable id used as the upsert key. A story already in the table gets its points and comment count refreshed; a new one is inserted. No manual dedupe logic needed.

  3. Write to the Coda table

    With coda_upsert_rows the agent writes a row per story to the table id you give it: title, points, comments, author, date, and the HN discussion link. The doc becomes a living, sortable list of what's being discussed in your space.

Tell your agent

Twice a day, call search_stories for my tracked topics, and upsert each result into the HN Watch Coda table keyed on story id, with title, points, comment count, author, and the discussion URL.

Setup

This flow needs both servers connected to your agent. Follow each install guide:

Worth knowing

  • coda_upsert_rows needs a column designated as the key for the update-in-place behavior to work; map the HN story id to that column or every run inserts duplicates instead of updating.
  • search_stories ranks by relevance and recency together, so popularity alone won't surface a story; if you want the front page specifically, use get_stories on the top feed and filter by your terms.

Questions

Will the points stay current as a story trends?
Yes, that's the point of upsert. On each run the agent rewrites the score and comment count for stories it has seen, so the table tracks momentum instead of freezing the numbers at first sight.
Can I filter to a minimum score?
Yes. The agent reads points on each result and can skip stories below a threshold, so only discussions that actually gained traction make it into the table.