Prompt
Prompt template for fetching Hacker News best stories IDs
https://hacker-news.firebaseio.com/v0/beststories.json
An automated AI-powered workflow to fetch, summarize, and present the top Hacker News stories, including story details, URLs, and top comments. Users can interact via chat or buttons, and the AI agent retrieves and organizes trending tech, startup, and AI discussions in a user-friendly format.
Flows
Below is a complete list of all prompts used in this flow to achieve its functionality. Prompts are the instructions given to the AI model to generate responses or perform actions. They guide the AI in understanding user intent and generating relevant outputs.
Prompt template for fetching Hacker News best stories IDs
https://hacker-news.firebaseio.com/v0/beststories.json
Prompt template for fetching a specific Hacker News story by ID
https://hacker-news.firebaseio.com/v0/item/{input}.json?print=pretty
Prompt template for fetching a specific Hacker News story by ID (duplicate, possibly another workflow branch)
https://hacker-news.firebaseio.com/v0/item/{input}.json?print=pretty
Prompt template for fetching Hacker News top stories IDs
https://hacker-news.firebaseio.com/v0/topstories.json
The main backstory and goal prompt for the Hacker News AI agent
**Core Functionality**:
**For general story requests:**
1. Always begin by calling either the `get_beststories` or the `get_topstories` tool depending on user query to retrieve the current top/best stories
2. Extract the IDs of the first 10 stories from the results
3. Use the `story_detail` tool to fetch information for each of these 10 story IDs individually
4. Present the user with a formatted list containing the title, a brief summary, and ID for all 10 top stories (always show exactly 10 stories)
**For specific story requests:**
1. When a user mentions a specific story title in the top 10 list, locate the corresponding story ID (if the user gave the number as "id=XYZ use the tool to find that id number detail, but if they give a number from 1 to 10 they mean one of the items in the list you provided them.)
2. Use the `story_detail` tool to retrieve the story's URL and details
3. Use the `URL_retriever` tool to fetch the full content from the story's URL
4. you will get a list of IDs in the previous step these are comment IDs use the ```comments_fetch``` tool to get the top 10 comments and give to the user as well. BUT MAKE SURE TO SEND THE IDS TO THE TOOL ONE BY ONE!
5. Provide the user with:
* A comprehensive summary of the page content
* The direct URL to the story
* top 10 comment
**Important**: Always maintain consistency in showing the top 10 stories for general requests, and provide thorough summaries with URLs for specific story inquiries.
Below is a complete list of all components used in this flow to achieve its functionality. Components are the building blocks of every AI Flow. They allow you to create complex interactions and automate tasks by connecting various functionalities. Each component serves a specific purpose, such as handling user input, processing data, or integrating with external services.
Unlock custom workflows with the Custom Trigger component in FlowHunt. This component allows users to define specific trigger points within their flow, enabling tailored actions based on custom events or inputs. Essential for building interactive and flexible automation workflows.
Learn how FlowHunt's Prompt component lets you define your AI bot’s role and behavior, ensuring relevant, personalized responses. Customize prompts and templates for effective, context-aware chatbot flows.
Integrate external data and services into your workflow with the API Request component. Effortlessly send HTTP requests, set custom headers, body, and query parameters, and handle multiple methods like GET and POST. Essential for connecting your automations to any web API or service.
The Parse Data component transforms structured data into plain text using customizable templates. It enables flexible formatting and conversion of data inputs for further use in your workflow, helping to standardize or prepare information for downstream components.
Discover the Chat Output component in FlowHunt—finalize chatbot responses with flexible, multi-part outputs. Essential for seamless flow completion and creating advanced, interactive AI chatbots.
The Button Widget component in FlowHunt transforms text or input into interactive, clickable buttons within your workflow. Perfect for creating dynamic user interfaces, collecting user choices, and improving engagement in AI-driven chatbots or automated processes.
The Chat Opened Trigger component detects when a chat session starts, enabling workflows to respond instantly as soon as a user opens the chat. It initiates flows with the initial chat message, making it essential for building responsive, interactive chatbots.
The Chat Input component in FlowHunt initiates user interactions by capturing messages from the Playground. It serves as the starting point for flows, enabling the workflow to process both text and file-based inputs.
The Run Flow component in FlowHunt lets you trigger and execute another workflow within your current flow. Pass inputs, variables, and control how flows interact, enabling modular and reusable automation. Ideal for chaining workflows or using flows as tools.
The Chat History component in FlowHunt enables chatbots to remember previous messages, ensuring coherent conversations and improved customer experience while optimizing memory and token usage.
The AI Agent component in FlowHunt empowers your workflows with autonomous decision-making and tool-using capabilities. It leverages large language models and connects to various tools to solve tasks, follow goals, and provide intelligent responses. Ideal for building advanced automations and interactive AI solutions.
Unlock web content in your workflows with the URL Retriever component. Effortlessly extract and process the text and metadata from any list of URLs—including web articles, documents, and more. Supports advanced options like OCR for images, selective metadata extraction, and customizable caching, making it ideal for building knowledge-rich AI flows and automations.
Flow description
This workflow automates the process of curating, summarizing, and displaying top stories and comments from Hacker News. It combines API integrations, templating, parsing, user interaction widgets, and an AI agent to provide users with a seamless experience for exploring and summarizing trending discussions in tech, startups, AI, and more.
The flow is structured to respond to different user triggers—such as button clicks or custom commands—to fetch and present either general lists of top or best stories, or in-depth details for specific stories, including their URLs and top comments. It leverages the Hacker News API, processes and formats the results, and optionally uses an AI agent to further automate and enrich the interaction.
Component | Purpose |
---|---|
Custom Triggers | Initiate flows for fetching best stories, top stories, story details, or comments. |
Prompt Templates | Generate dynamic API URLs by substituting variables (e.g., story IDs) for requests. |
API Requests | Make HTTP GET requests to Hacker News endpoints. |
Parse Data | Convert raw API data into readable text with templates. |
Chat Output | Display results/messages in the chat interface. |
Button Widgets | Present user-friendly buttons to trigger actions. |
Chat Input/Opened | Capture user messages or detect chat session start. |
Chat History | Store and retrieve conversation context for the AI agent. |
AI Agent | Orchestrates the flow, decides which tools to use, formats summaries, and maintains consistency. |
URL Retriever | Fetches and summarizes content from external URLs. |
Run Flow | Allows flows to be reused as tools by the AI agent. |
When the chat interface is opened, a welcome message and interactive buttons are displayed:
Upon user trigger (button or command):
/v0/topstories.json
or /v0/beststories.json
) via a template.When a user requests more information about a specific story:
At the core, an AI Agent serves as an orchestrator:
The workflow uses “Run Flow” nodes to modularize fetching top stories, story details, and comments as reusable tools that the AI agent can call as needed. This design makes it easy to extend or scale the workflow to handle new trigger types or additional features.
Trigger Type | Action | Output |
---|---|---|
Chat Opened | Show welcome message and buttons | Interactive UI |
“Get Top/Best Stories” | Fetch and show top/best 10 stories | List of stories |
Story Detail Request | Fetch details, article content, top 10 comments for a story | Summary + comments |
AI Agent Query | Orchestrate above using tools, maintain consistency, clarify requests | Structured, conversational reply |
Through this workflow, you can automate the curation and presentation of Hacker News stories, enabling rich, interactive, and scalable user experiences with minimal manual effort.
We help companies like yours to develop smart chatbots, MCP Servers, AI tools or other types of AI automation to replace human in repetitive tasks in your organization.