AR
AutomatedReality

Build a Free Local AI Website Scraper with n8n

Overview & Architecture

Tracking competitor pages or news by hand is repetitive, and paid scraping tools add up. This blueprint loads a page in a headless Chrome browser you run yourself (Browserless), cleans the text in an n8n Code node, and asks a local Ollama model for a short summary and a few bullet findings. The result is saved in your own Postgres table with the source URL and a timestamp.

The workflow runs on a daily schedule, or on demand with a manual trigger. Only the page you scrape is fetched from the internet. The summarizing and storing stay on your own hardware.

The test run scraped the Hacker News front page with qwen2.5:14b-instruct-q5_K_M and inserted one row with a generated title, summary and bullet findings.

The Pipeline

  1. Triggers: A Daily Schedule (07:00) and a Manual Demo Run trigger both feed the same flow.
  2. Scrape Settings: One Set node holds the target URL, the scraping goal and the table name, so retargeting means editing three values.
  3. Create Intel Table: A Postgres Execute Query node runs CREATE TABLE IF NOT EXISTS for the table (id, source URL, scraped time, title, summary, findings).
  4. Fetch Page with Browserless: An HTTP Request posts a small script to the Browserless /function endpoint. The script opens the page, waits for the network to go idle and returns the rendered HTML.
  5. Clean Page Text: A Code node removes script, style, nav, footer and header blocks, decodes common HTML entities, stops with a clear error if almost no text is left, and caps the text at 12,000 characters.
  6. Summarize with Ollama: A Basic LLM Chain with an Ollama Chat Model (temperature 0.2, 8192 context) returns JSON with a title, a summary and bullets.
  7. Format Row: A Code node parses the JSON (with a raw-text fallback) and builds one row.
  8. Insert Intel Row: A parameterized Postgres insert that returns the new row id.
  9. Insert Succeeded?: An If node sends successful inserts to a Success node and failed inserts to a Debug node that records the error message and time.

What You Need

Key Deployment Hurdles & Solutions

Download the Workflow (.json)

Import-ready n8n workflow with all 18 nodes (13 working nodes plus stage labels). In n8n choose Import from file, attach your own Postgres, Browserless and Ollama credentials, then set the target URL, goal and table name in the Scrape Settings node.

Download the n8n workflow (.json)

Download the Companion System Prompt (.md)

Enter your first name to personalize the scraper assistant prompt so your AI helper can walk you through the Browserless, Ollama, Postgres and n8n setup step by step. Add your email optionally to get notified when new home lab blueprints drop.