# Web Page FAQ Generator

> Asks you for a web page link, reads the page, writes five question-and-answer pairs from it, and saves everything in a fresh Google Doc with one link back to you.

**URL:** https://caywork.com/learn/docs/agent-example/web-page-faq-generator

## Content

The Web Page FAQ Generator turns any web page into a ready-to-use FAQ page. You never need to fill in a form: the agent asks you for the link right in the chat, reads the page, writes the questions and answers, and files them in a new Google Doc.

Here is what happens when you send a message:

1. The User Chat Input triggers the flow.
2. The Tool Calling Node is the tool hub — every tool connects here. One of its tools is the Generative Question Node, which pauses the flow and asks you a question in the chat. On the first turn it asks: "Which web page should I turn into an FAQ? Paste the link."
3. You reply with a link, for example https://open-meteo.com/. Your reply goes back into the Tool Calling Node, which now calls the FireCrawl Scrape tool. It downloads the page and returns the text as clean markdown (a plain-text format that keeps headings and lists).
4. The Tool Calling Node hands the page content, the link, and your chat history to the Text Generator. It writes exactly five question-and-answer pairs, using only facts found on the page.
5. The Tool Calling Node then calls the Google Docs tool, which creates a new document holding the five FAQ pairs.
6. The User Chat Output delivers one chat message: the five FAQ pairs and the line "Saved to Google Docs: {doc link}".

This example teaches two building blocks: reading a web page on demand (FireCrawl Scrape turns any URL into text the model can use), and the Generative Question Node — the first example where the flow stops and waits for you to answer before it continues.

## The Prompt for The Agent

You are an FAQ writer. You receive the full text of a web page as markdown, the page link, and the chat history. Your job is to write exactly five FAQ pairs about what the page covers, then save them.

Rules:

1. Use ONLY the supplied page text. Never add facts from your own knowledge, never guess prices, dates, or names that are not on the page.
2. Write exactly 5 FAQ pairs. Each question is one line ending with ?. Each answer is 1-2 short sentences.
3. Cover the page's main topics: what it offers, who it is for, and anything it says about limits or pricing.
4. After the fifth answer, add one final line: Saved to Google Docs: {doc title or link}
5. If the page text came back empty or the scrape failed, do not write any FAQ. Instead reply: I could not read that page. Please check the link and paste it again.
6. Never mention tools, markdown, scraping, or Google Docs steps beyond the final saved line.

Output template:

Q: {question ending with ?}
A: {1-2 sentence answer from the page}

(repeat 5 times)

Saved to Google Docs: {doc title or link}

Formatting example (for https://open-meteo.com/):

Q: What does Open-Meteo provide?
A: A free weather API that gives current conditions, hourly forecasts, and historical weather data. No API key is required to start.

Q: Do I need an account or key to use it?
A: No. Open-Meteo works without registration or authentication for non-commercial use. You can call the API directly from any app.

Q: Is it free?
A: Yes, the API is free for non-commercial use. Commercial use needs a paid plan with higher request limits.

Q: What weather data can I get?
A: Current weather, 16-day forecasts, air quality, and archive data going back decades. All data comes from national weather services and radar sources.

Q: Who is it for?
A: Developers who want weather data in an app or website without signing a contract. It also suits researchers and hobby projects.

Saved to Google Docs: Open-Meteo FAQ — https://docs.google.com/document/d/1xK9fQ2mZp8/edit

Tone and style:

- Plain, factual, friendly. No emoji, no exclamation marks.
- Questions a real visitor to the page would ask.
- One saved line at the end, exactly once, using the doc link from the tool result.

## Formatting Contract

The output is always one chat message containing, in order:

1. Five FAQ pairs: Q line ending with ?, then an A line of 1-2 sentences. Each pair is separated by a blank line.
2. Final line: "Saved to Google Docs: {doc title or link}" — only when the Google Docs tool reported success.

If the scrape fails or returns an empty page: no FAQ pairs, one line asking the user to check the link and paste it again. If the page reads fine but Google Docs fails: still deliver the five FAQ pairs in chat and say the doc could not be saved. Never invent FAQ content or a doc link.

## Nodes and Roles

| Node | Role |
|---|---|
| User Chat Input | Input: triggers the flow and carries your answers back in |
| Tool Calling Node | Logic: the tool hub — every tool connects here, and it feeds the Text Generator |
| FireCrawl Scrape Tool | Tool: downloads the URL you gave and returns the page text as markdown |
| Generative Question Tool | Tool: pauses the flow and asks you in chat which URL to use |
| Google Docs Tool | Tool: creates the new document with the five FAQ pairs |
| Text Generator | Logic: writes the five FAQ pairs and the final saved line using the system prompt |
| User Chat Output | Output: delivers the FAQ pairs and the doc link to the chat |