Company Data Enrichment using AI and Web Scraping - n8n Workflow

Automate company profile enrichment. This n8n workflow scrapes website content, uses the OpenAI n8n node for data classification (B2B, industry, value prop), and updates Google Sheets automatically. Find more n8n templates.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

• Sales Development Representatives (SDRs) needing accurate lead qualification data.
• Marketing Analysts requiring automated firmographic enrichment.
• Market Researchers looking to classify competitors or potential clients quickly.
• Automation Specialists seeking advanced n8n workflow examples combining web scraping and AI.

Overview

Manually researching company details—such as their true value proposition, target audience, and industry classification—is time-consuming. This comprehensive n8n workflow template solves this by automating the entire research and data entry process. It starts by reading a list of domains from Google Sheets, uses an HTTP Request n8n node to scrape the website content, and then leverages the powerful OpenAI n8n node to perform complex analysis and classification.

The AI is specifically prompted to return structured JSON data, ensuring reliable parsing and integration. This robust n8n workflow drastically speeds up lead qualification and market segmentation efforts, providing rich, automated data enrichment without manual intervention. This is a perfect example of advanced use cases available in n8n templates.

How it Works

The execution of this n8n workflow is initiated by a manual n8n trigger.


  1. Data Initialization: The process begins with the 'Read Google Sheets' n8n node, which pulls a list of company domains that need enrichment.

  2. Batch Processing: The 'Split In Batches' n8n node ensures that each domain is processed individually, facilitating independent web scraping and AI calls. This node also preserves the original input data for later merging.

  3. Web Scraping: The 'HTTP Request' n8n node dynamically constructs the URL using the domain and fetches the website's HTML content. The subsequent 'HTML Extract' n8n node isolates the main body of the HTML.

  4. Content Preparation: The 'Clean Content' code n8n node strips unnecessary HTML elements, cleans up whitespace, and truncates the content to 10,000 characters. This optimization reduces token usage and improves the relevance of the OpenAI call.

  5. AI Classification: The 'OpenAI' n8n node receives the cleaned content. It uses a detailed prompt to classify the company's value proposition, industry (using a predefined list like Software, Finance, Consumer Goods), target audience, and market (B2B/B2C), returning the results in a strict JSON format.

  6. Result Parsing: A subsequent 'Parse JSON' code n8n node extracts the classification fields (e.g., industry, market) from the OpenAI output.

  7. Data Integration: The 'Merge' n8n node combines the original domain data with the newly generated AI attributes.

  8. Update Spreadsheet: Finally, the 'Update Google Sheets' n8n node writes the enriched data back into the spreadsheet, matching the row based on the company 'Domain' column. A 'Wait' n8n node is included at the end to help manage pacing or API rate limits.

Installation Guide

To set up this powerful n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Google Sheets Credentials: The 'Read Google Sheets' and 'Update Google Sheets' n8n node require Google Sheets credentials. Authenticate your Google account via OAuth2 in n8n settings.

Ensure the Document ID field in both Google Sheets n8n nodes points to your master company list spreadsheet.
Verify that the columnToMatchOn in 'Update Google Sheets' is set correctly (e.g., 'Domain').

  1. OpenAI Credentials: The 'OpenAI' n8n node requires an API key. Add your OpenAI API credential in n8n.

  2. Initial Data Setup: Your Google Sheet must contain a column titled 'Domain' with company domains (e.g., n8n.io).

  3. Execution: Click the 'Execute Workflow' button (the manual n8n trigger) to run the process.

Node Details

When clicking "Execute Workflow" (Manual Trigger): The starting point of the n8n workflow, useful for immediate testing and manual runs.
Read Google Sheets: An essential data source n8n node. It fetches all rows from the specified Google Sheet document, providing the input list of domains for enrichment.
Split In Batches: A core logic n8n node that iterates over the input domains, enabling parallel processing for scraping and AI analysis.
HTTP Request: Performs the web scraping action. It dynamically constructs the URL https://www.{{ $node["Split In Batches"].json["Domain"] }} to retrieve raw HTML.
HTML Extract: Refines the scraped data by extracting only the html content from the response, preparing it for cleaning.
Clean Content (Code n8n node): A custom scripting step using a code n8n node to clean the HTML text, remove excess whitespace, and limit the content length to 10,000 characters before submitting to the AI.
OpenAI: The intelligence core of this n8n workflow. This n8n node uses a structured prompt to classify company attributes (Value Proposition, Target Audience, Market) based on the website content.
Parse JSON (Code n8n node): Parses the JSON output provided by the OpenAI n8n node, converting the structured text response into separate, usable data fields.
Merge: Recombines the original input data (Domain) with the newly enriched attributes from the AI, ensuring all necessary fields are present for the final update step.
Update Google Sheets: The final action n8n node. It updates the corresponding row in the Google Sheet using the 'Domain' as the matching key, populating the 'Market', 'Industry', 'Value Proposition', and 'Target Audience' columns.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by
Lucas Perret
Lucas Perret

Featured*