Automate web scraping using Bright Data and process the output into structured JSON data, topics, and trends using Google Gemini in this powerful n8n workflow.
Download this n8n workflow template and start using it instantly.
Data scientists and analysts needing automated, structured web data feeds.
Developers looking for advanced web scraping n8n templates integrating Bright Data.
Businesses requiring AI-driven insights (topic modeling, trend analysis) from scraped web content.
Users deploying complex AI pipelines within a robust n8n workflow environment.
This expert-level n8n workflow demonstrates a cutting-edge data pipeline that combines advanced web extraction technology (Bright Data Web Unlocker) with sophisticated AI processing (Google Gemini). The core problem solved is transforming unstructured, noisy web content—received in markdown format via the Bright Data API—into clean textual data and multiple detailed structured JSON outputs. This specific n8n workflow allows for concurrent analysis, including converting markdown to clean text, performing topic modeling, and clustering emerging trends by location and category. Every step is clearly defined using an n8n node, ensuring the entire automation is transparent and highly reusable as an n8n template for data mining.
The n8n workflow begins with a manual n8n trigger, initializing the process.
Set URL and Bright Data Zone n8n node defines the target URL (e.g., a news site) and the specific Bright Data Web Unlocker zone to be used for scraping.Perform Bright Data Web Request n8n node executes the scrape via an HTTP request, pulling the fully unlocked page content in markdown format.Markdown to Textual Data Extractor Chain LLM n8n node uses a Google Gemini model to strip the markdown of links, scripts, and formatting, outputting clean text. This result is then sent to a logging webhook.Topic Extractor with the structured response Information Extractor n8n node uses a separate Google Gemini connection and a predefined JSON schema to analyze the content, outputting topics, confidence scores, summaries, and keywords. This structured JSON output is converted to a binary file using an n8n Function node and saved to disk (d:\topics.json).Trends by location and category with the structured response Information Extractor n8n node uses a dedicated Google Gemini model and another custom JSON schema to cluster emerging trends by geographical location and category. This result is also saved to disk (d:\trends.json) after passing through a Function n8n node.This powerful architecture demonstrates how a single n8n trigger can initiate complex, multi-faceted data processing operations.
To use this advanced n8n workflow, follow these setup steps:
Perform Bright Data Web Request n8n node.Authorization or X-BrightData-Auth. Input your Bright Data API token as the header value.Google Gemini Chat Model for Data Extract, Google Gemini Chat Model for Sentiment Analyzer, and Google Gemini Chat Model).Set URL and Bright Data Zone n8n node with the URL you wish to scrape and verify the correct Bright Data zone.https://webhook.site/... URLs in the three Initiate a Webhook Notification n8n node instances to point to your actual logging or notification endpoints.Test workflow n8n trigger.This n8n template relies on advanced integration between external APIs and internal AI processing nodes.
When clicking ‘Test workflow’ (Manual Trigger n8n trigger):
Function: Starts the entire data pipeline upon manual execution. This is the simplest form of an n8n trigger.
Set URL and Bright Data Zone (Set n8n node):
Function: Defines crucial variables (url and zone) used downstream in the n8n workflow.
Key Configuration: URL is set to https://www.bbc.com/news/world; zone is set to webunlocker1.
Perform Bright Data Web Request (HTTP Request n8n node):
Function: Executes the web scraping task, sending parameters to the Bright Data API to fetch unlocked page content.
Key Configuration: Method POST, authentication via HTTP Header, requested dataformat is markdown.
Markdown to Textual Data Extractor (Chain LLM n8n node):
Function: Converts the scraped markdown structure into clean, readable text using an LLM. This is an essential processing step in this n8n workflow.
Key Configuration: Prompt instructs the LLM to output textual data only, removing links and scripts. Connected to the Google Gemini Chat Model for Data Extract n8n node.
Topic Extractor with the structured response (Information Extractor n8n node):
Function: Analyzes the raw scraped data and forces the AI to output results structured according to a strict JSON schema, detailing topic, score, and summary.
Key Configuration: Uses a custom JSON Schema for topic modeling array output. Connected to the Google Gemini Chat Model for Sentiment Analyzer n8n node.
Trends by location and category with the structured response (Information Extractor n8n node):
Function: Performs specialized trend analysis, clustering findings by location and category as dictated by its custom JSON schema.
Key Configuration: Uses a custom JSON Schema designed for geographical and categorical trend mapping. Connected to the dedicated Google Gemini Chat Model n8n node.
Create a binary file for topics / Create a binary data for tends (Function n8n node):
Function: Converts the structured JSON output generated by the LLM information extractor n8n nodes into a base64 encoded binary data item, preparing it for local file storage.
Write the topics file to disk / Write the trends file to disk (ReadWriteFile n8n node):
* Function: Saves the processed binary data (structured JSON) locally, completing the persistence phase of this n8n workflow.
Automate the extraction and analysis of high-profile social media posts using this powerful n8n workflow. Get instant Slack alerts on potential stock market impact using Airtop integration.

Use this powerful n8n workflow to automate LinkedIn profile data mining. Scrape profiles using Decodo, analyze expertise using GPT-4o-mini, and output structured recruitment insights to Google Sheets.

Automate Zillow property data scraping using this powerful n8n workflow. Extract prices, addresses, and Zestimate values directly into Google Sheets using the Scrape.do API.

Automate extracting and cleaning YouTube video transcripts using this powerful n8n workflow. Integrates RapidAPI for reliable data extraction and custom n8n code.


I'm a workflow automation expert with 15+ years in IT industry. I build smart, scalable n8n workflows for AI automation, marketing, CRM, and SaaS integrations. My focus is on simplifying business processes with tools like OpenAI, WhatsApp, Gmail, and Airtable. I help teams and solopreneurs automate smarter, reduce manual tasks, and grow faster—one workflow at a time.







































