How to Automate Web Scraper with AI for Company Market Intelligence with n8n
Your sales and ops teams waste hours every week doing the same thing: opening a company's website, digging through their About page, checking their LinkedIn, guessing their tech stack, and hunting for
Your sales and ops teams waste hours every week doing the same thing: opening a company's website, digging through their About page, checking their LinkedIn, guessing their tech stack, and hunting for a contact email. Multiply that by 200 prospects and you have a full-time job that produces stale, inconsistent notes scattered across spreadsheets. Market intelligence gathered by hand does not scale, and by the time you finish researching a list, half of it is out of date.
This article shows you how to replace that manual grind with an n8n workflow that takes a raw list of URLs or company names and returns structured intelligence on every one of them — sector, technology stack, key contacts, and a relevance score — written straight into Airtable. It runs unattended, processes hundreds of companies in a single execution, and gives every record the same schema so your team can actually filter and act on it.
The problem: research does not scale linearly
Manual company research has three failure modes. First, it is slow — a decent analyst spends 8 to 15 minutes per company to produce anything useful. Second, it is inconsistent — two people researching the same account will surface different facts, use different labels, and score fit differently, so the data is impossible to sort or prioritize. Third, it decays — a list researched in January is wrong by March because companies rebrand, migrate stacks, and change staff.
The consequence is that most teams either research too few companies (and miss opportunities) or research many companies badly (and drown in unstructured notes). What you actually want is a pipeline that treats research as a repeatable transformation: raw identifier in, structured intelligence out, every time, in the same shape.
The solution: an AI enrichment pipeline in n8n
n8n is the ideal home for this because company intelligence is fundamentally a data pipeline — fetch, extract, structure, store — and that is exactly what n8n orchestrates. The workflow has four logical stages:
- Ingest — read the list of URLs or company names from a trigger or a source table.
- Scrape — pull the raw HTML/text of each company's website and any signal-rich pages (homepage, about, pricing).
- Extract with AI — hand the scraped content to an LLM that returns a strict JSON object: sector, tech stack, contacts, and a relevance score against your ideal-customer profile.
- Store — upsert each structured record into Airtable so nothing is duplicated and everything is filterable.
The AI step is what makes this robust. Instead of writing brittle CSS selectors for every site (which break the moment a company redesigns), you let the model read messy page text and produce clean, typed fields. You get the reliability of structured data without the maintenance cost of per-site scrapers.
Step-by-step setup in n8n
Here is how the nodes fit together. You can build this in under an hour.
1. Trigger and input. Start with a Webhook node (to accept a POST with a list) or a Schedule Trigger feeding an Airtable node that reads rows where status = pending. Either way, your goal is to end this stage with an array of items, each holding a URL or a company name.
2. Normalize identifiers. Add a Code node. If you receive company names instead of URLs, resolve them to a domain here — either by calling a search API or by constructing a best-guess domain and validating it. Output one item per company with a clean url field. Follow it with a Split In Batches (Loop Over Items) node set to a batch size of 1 to 3, so you control concurrency and avoid rate limits.
3. Scrape the page. Use an HTTP Request node to GET the target URL. Set a realistic User-Agent header, enable Retry On Fail (3 attempts), and set Continue On Fail so one dead domain does not kill the whole run. For JavaScript-heavy sites, point the HTTP Request at a rendering service (a headless-browser API) instead of fetching raw HTML. Pass the response through an HTML node (Extract HTML Content) to strip tags and reduce the page to plain text — this keeps your token count down before the AI step.
4. Extract with AI. Add an AI Agent or Basic LLM Chain node connected to an Anthropic Claude model (use a current model such as claude-sonnet-5 for a strong cost-to-quality balance on extraction). Attach a Structured Output Parser so the node returns validated JSON rather than free text. Your prompt should be explicit and schema-first:
You are a B2B research analyst. From the website text below, extract:
- sector (one of: SaaS, Ecommerce, Agency, Fintech, Healthcare, Other)
- tech_stack (array of detected tools/platforms)
- contacts (array of {name, role, email} found on the page)
- relevance_score (0-100) for an ICP of: [describe your ideal customer]
- summary (max 2 sentences)
Return ONLY valid JSON. Use null for unknown fields, never invent data.
WEBSITE TEXT:
{{ $json.text }}
The "never invent data" instruction and explicit enum for sector are what keep the output clean and sortable across hundreds of companies.
5. Store in Airtable. Finish with an Airtable node in Upsert mode, matching on the domain field so re-running the workflow updates existing records instead of duplicating them. Map each JSON field to a column: Sector, Tech Stack (multi-select or long text), Contacts, Relevance Score, Summary, and a last_enriched timestamp. Set the status back to done so your next scheduled run skips it.
The benefits: consistent, fresh, and scalable
Once this runs, three things change. Your research becomes consistent — every company is scored against the same ICP definition with the same field schema, so you can finally sort your pipeline by relevance and work the best accounts first. It becomes fresh — schedule the workflow weekly and it re-enriches records automatically, catching stack migrations and new hires. And it becomes scalable — processing 500 companies costs you a coffee's worth of API spend and zero analyst hours, versus the 60-plus hours the same work would take by hand.
The relevance score is the highest-leverage output. Instead of a flat list, your team gets a ranked queue. Reps stop guessing which accounts to touch and start every day at the top of a data-driven priority list.
Common pitfalls and how to avoid them
Getting blocked while scraping. Firing hundreds of parallel requests from one IP gets you rate-limited or blocked. Keep Split In Batches small, add a short Wait node inside the loop (1 to 3 seconds), and always set Continue On Fail so partial failures do not abort the run.
Feeding raw HTML to the model. Sending full markup wastes tokens and confuses extraction. Always reduce pages to plain text with the HTML node first, and truncate to a sane character limit in a Code node before the LLM — the first few thousand characters of a homepage usually contain everything you need.
Unvalidated AI output. Without a Structured Output Parser, the model will occasionally return prose, markdown fences, or an extra field, and your Airtable node will throw. The parser plus a strict "return ONLY valid JSON" instruction eliminates almost all of these; keep Continue On Fail on the AI node to quarantine the rare miss.
Duplicating records. Insert mode looks fine until your second run doubles the table. Use Upsert keyed on the domain from day one.
Hallucinated contacts. Models will happily invent an email if you let them. The "use null for unknown, never invent data" rule is not optional — treat any contact the model returns as a lead to verify, not a confirmed fact.
Build it once and you own a market-intelligence engine that turns a raw list into a prioritized, structured, always-current view of your entire target market — without adding a single hour to anyone's week.
Ja construimos isso pra voce
Nao comece do zero. O Web Scraper with AI for Company Market Intelligence e um workflow n8n pronto para instalar — conecta suas ferramentas em minutos, sem codigo.
Instalar por $79.0 →