Scrape websites and run advanced custom analysis prompts using this powerful n8n workflow. Integrate Apify scraping data with Gemini via OpenRouter to get structured results.
Download this n8n workflow template and start using it instantly.
Automation developers looking for advanced n8n templates for web data processing.
Researchers needing to execute complex queries across large website archives.
Marketing and sales teams requiring structured data (like contact info or product lists) extracted via AI.
Users who need a dynamic n8n trigger for reusable web scraping automation.
The challenge of web data extraction often lies not just in scraping the content, but interpreting it to answer specific, nuanced questions. This powerful n8n workflow solves this by tightly integrating web scraping with large language model (LLM) analysis. Utilizing an Apify scraper accessed via an HTTP Request n8n node, the automation efficiently gathers structured content and Markdown from target websites. The unique value is found in the subsequent AI Agent steps: the workflow dynamically applies a user-defined prompt to every scraped page. This enables tasks far beyond standard scraping, such as extracting specific competitive intelligence, summarizing vast sections of a site, or creating structured output for further analysis. This robust n8n workflow provides a scalable, repeatable solution.
This reusable n8n workflow begins with the When Executed by Another Workflow n8n trigger, which accepts input parameters defining the target URL, maximum pages to scrape, and the crucial custom AI prompt.
To deploy this n8n template, follow these steps:
yourapifyapi_token in the URL parameter with your actual Apify API key. This is essential for the Apify scraper to run. When Executed by Another Workflow (n8n trigger): This node acts as the entry point, defining the structure of the input required to run the n8n workflow, including url, maxPages, and the AI prompt.
HTTP Request (n8n node): Executes the third-party Apify Web Scraper. It dynamically constructs the request body using data passed from the n8n trigger, specifically targeting a markdown content scraper actor.
Loop Over Items (n8n node): Essential for iteration. It splits the array of scraped results (one item per page) into single batches, allowing the downstream AI Agent to analyze page-by-page.
AI Agent (LangChain n8n node): This is the core logic n8n node for per-page analysis. It combines the original user prompt with the current page's markdown content, using LLM capabilities to fulfill the instruction.
OpenRouter Chat Model / OpenRouter Chat Model1 (n8n node): These nodes provide the language model backend (Gemini 2.5 Flash and Pro, respectively) used by the AI Agents. The selection of a more powerful model for the final synthesis (AI Agent1) ensures high-quality, structured output for the final n8n workflow result.
Aggregate (n8n node): Gathers the output field from every item processed by the looping AI Agent step, preparing the collection of partial answers for the final synthesis n8n node.
Use this powerful n8n workflow to scrape Amazon product details via Decodo, leverage OpenAI for competitive analysis and structured insights, and automatically log the findings to Google Sheets.

Use this n8n workflow to scrape Yelp business data automatically via a web form using the Scrape.do API, parse the resulting HTML, and save all structured data directly to a Google Sheet.

Use this powerful n8n workflow to automate intelligent web scraping using Google Gemini, Bright Data's Managed Container Platform (MCP), and LangChain Agents. Perfect for data extraction.

Use this powerful n8n workflow to scrape complex web pages, clean HTML, and use Google Gemini to generate custom Cheerio.js extraction code for structured JSON output. Deploy this advanced n8n automation today.

Use this powerful n8n workflow template to automatically scrape business emails from Google Maps search results based on custom queries and save them directly to Google Sheets.


Hi! I’m Mohamed El Hadi, a passionate developer and automation expert from Algeria. I specialize in building smart, scalable workflows using n8n to streamline business operations, save time, and drive innovation. 🌍 Open to collaborations | 🤖 Automation lover | 💼 Founder of EcoPetDZ & AADL Auto Reload