Save top Hacker News stories to Nextcloud Notes
A Hacker News + Nextcloud agent flow
Self-hosters who keep their notes in Nextcloud don't want a third-party read-it-later service in the loop; they want the interesting links to land in the notebook they already own. This recipe does that. The agent calls get_stories on the top feed, reads the front-page stories, and for each new one creates a note in Nextcloud with nc_notes_create_note: the title, the score and comment count, the article link, and the HN discussion link, all in Markdown. Hacker News answers the request when the agent runs it rather than pushing, so this fires a few times a day, and the agent remembers the story ids it has already saved so a piece sitting on the front page for hours isn't saved on every pass.
The flow
get_storiesFetches stories from a chosen feed: top, new, Ask HN, or Show HN.
nc_notes_create_noteCreate a new note.
Step by step
- Fetch the top feed
One get_stories call on the top feed (or Show HN, or Ask HN, whichever you follow) returns the ranked stories with id, title, points, comment count, author, and URL.
- Filter and dedupe
Stories above a score threshold you set survive; ids already saved are dropped. A long-lived front-page story is saved once, and a fresh one that breaks your threshold is saved the next time it qualifies.
- Create the Nextcloud note
For each new story the agent calls nc_notes_create_note with a Markdown body: title as the heading, the article link, the HN discussion link, and the score and comments. A category like Reading collects them in one folder.
Tell your agent
Three times a day, call get_stories on the Hacker News top feed, and for each story above 150 points I haven't saved yet, create a Nextcloud note in the Reading category with the title, article link, discussion link, and score.
Setup
This flow needs both servers connected to your agent. Follow each install guide:
Worth knowing
- get_stories returns the ranked feed, which holds the same stories across reads as they rise and fall; dedupe on story id or the same piece becomes a new note on every poll.
- nc_notes_create_note takes a title and content but the category is what keeps notes organized; set it explicitly or saved stories scatter across the default notebook.
Questions
- Can I save only Show HN launches?
- Yes. get_stories takes a feed argument, so point it at Show HN and the agent saves only project launches, or run it twice with different feeds into different categories.
- Does it grab the article text?
- No, get_stories returns the metadata and links, not the article body. The note holds the title and the two links; pair it with a fetch tool if you want the full text saved alongside.