{
  "schema_version": "1.0.0",
  "id": "website-summary-to-sheet",
  "title": "Summarise a company website into the prospect sheet",
  "category": "scraping-enrichment",
  "difficulty": "intermediate",
  "featured": false,
  "description": "Fetch the home page for each new URL in a sheet, have AI say what the company sells and to whom, and write the summary back to the row.",
  "tags": [
    "scraping",
    "webhooks",
    "ai-extraction",
    "google-sheets",
    "prospecting"
  ],
  "apps": [
    "Google Sheets",
    "Webhooks by Zapier",
    "AI by Zapier"
  ],
  "plan": {
    "minimum": "Professional",
    "reasons": [
      "multi-step Zap: 3 steps after the trigger",
      "AI by Zapier",
      "premium app: Webhooks by Zapier"
    ]
  },
  "tasks": {
    "typical": 3,
    "max": 3
  },
  "trigger": {
    "app": "Google Sheets",
    "event": "New Spreadsheet Row",
    "kind": "polling",
    "title": "New website row",
    "why": "Fires for each new row with a website to research.",
    "config": {
      "Drive": "My Google Drive",
      "Spreadsheet": "Prospects",
      "Worksheet": "Websites"
    },
    "outputs": [
      "row_number",
      "company",
      "website"
    ],
    "sample": "sample-trigger.json"
  },
  "steps": [
    {
      "key": "page",
      "kind": "action",
      "app": "Webhooks by Zapier",
      "event": "GET",
      "title": "Fetch the home page",
      "why": "Downloads the page HTML. No browser runs, so pages that build their text with JavaScript come back nearly empty.",
      "fields": {
        "URL": "{{trigger.website}}",
        "Query String Params": "(none)",
        "Headers": "User-Agent: Mozilla/5.0 (compatible; prospect-research)",
        "Unflatten": "Yes"
      },
      "outputs": [
        "status",
        "content"
      ]
    },
    {
      "key": "read",
      "kind": "ai",
      "app": "AI by Zapier",
      "event": "Analyze and Return Data",
      "title": "Say what the company does",
      "why": "Reads the visible text and returns a fixed set of fields, with a confidence flag when the page had too little text.",
      "fields": {
        "Model": "Default (fast)",
        "Instructions": "Below is the HTML of a company home page. Ignore navigation, cookie banners, and scripts. Return: what_they_sell (one sentence, plain words), who_they_sell_to (one short phrase), industry (one or two words), and enough_text (\"yes\" if the page clearly says what the company does, otherwise \"no\"). Do not guess from the company name alone.",
        "Input data": "Company: {{trigger.company}}\nURL: {{trigger.website}}\n\n{{page.content}}",
        "Output fields": "what_they_sell, who_they_sell_to, industry, enough_text"
      },
      "outputs": [
        "what_they_sell",
        "who_they_sell_to",
        "industry",
        "enough_text"
      ]
    },
    {
      "key": "update",
      "kind": "action",
      "app": "Google Sheets",
      "event": "Update Spreadsheet Row",
      "title": "Write the summary to the row",
      "why": "Keeps the research next to the company so first lines can be written straight from the sheet.",
      "fields": {
        "Drive": "My Google Drive",
        "Spreadsheet": "Prospects",
        "Worksheet": "Websites",
        "Row": "{{trigger.row_number}}",
        "Columns": {
          "what_they_sell": "{{read.what_they_sell}}",
          "sells_to": "{{read.who_they_sell_to}}",
          "industry": "{{read.industry}}",
          "page_ok": "{{read.enough_text}}",
          "http_status": "{{page.status}}",
          "researched_at": "{{meta.human_now}}"
        }
      },
      "outputs": [
        "id",
        "row_number"
      ]
    }
  ]
}
