A comprehensive n8n workflow for web crawling, data extraction using GPT-5 nano, and AI-powered Q&A. Store SEO data in Google Sheets and use an n8n agent to instantly query indexed content.
Download this n8n workflow template and start using it instantly.
This powerful n8n workflow provides a dual-mode solution for interacting with website content. When a new URL is provided, the workflow enters Crawl Mode. It automatically finds the sitemap, fetches every page, uses AI (GPT-5 nano) to extract structured data like language, H1 hierarchy, internal links, external links, and a summary, storing everything neatly in a Google Sheet. Once the initial indexing is complete, the workflow switches permanently to Agent Mode.
In Agent Mode, the system acts as a conversational AI that responds to user queries 'as if it were the website itself.' It uses the Google Sheet database as its primary knowledge base, allowing it to answer complex questions instantly without recrawling. This entire process is orchestrated via n8n node connectivity, offering a robust and scalable solution for creating a private knowledge base from external web data. This unique n8n trigger setup ensures a seamless transition between crawling and Q&A phases.
The entire process is initiated by a user message through the dedicated n8n trigger (Chat web).
Get data schema n8n node to see if the target website has already been indexed (i.e., if the 'Data schema' flag is set to true).AI Agent (powered by GPT-5 nano). This n8n Agent uses two tools: Get row(s) in sheet in Google Sheets to query the indexed data and HTTP Request2 for live lookups if necessary. The Agent's output is delivered back to the user via Respond to Chat1.AI Agent1 and an OpenAI Chat Model1. If the URL is valid, the n8n workflow continues.robots.txt file, extracts the sitemap URL, and downloads the sitemap index.Message a model n8n node (using GPT-4o) analyzes the sitemap index and user-defined options to pinpoint the specific sitemap (e.g., pages) for crawling.Split URLs n8n node creates a separate item for every page URL. The Loop Over Items node then processes each URL.HTTP Request n8n node fetches the content, which is converted to Markdown. A specialized AI extractor (Message a model1, using GPT-5 nano) is instructed to pull out key SEO elements (Summary, H1, links, language).Append row in sheet in Google Sheets tool to save the structured data. Simultaneously, a separate branch ensures the 'Data schema' flag is set to true via the Complete n8n node, completing the initial cycle so that subsequent inquiries activate Agent Mode.To deploy this expert n8n workflow, follow these steps:
Chat web n8n trigger to secure the public webhook access.Chat web n8n trigger will provide a public webhook URL for interaction. Chat web (n8n trigger): The starting point for the n8n workflow. It is a LangChain Chat Trigger with Basic Auth enabled, designed to capture user text input (chatInput) for processing.
Get data schema (Google Sheets n8n node): Checks the target Google Sheet for a row where 'Data schema' is true. This determines whether the workflow is in Agent Mode (data exists) or Crawl Mode (data needed).
AI Agent (LangChain n8n node): The core of the Agent Mode. It is configured to act 'as a website' and is linked to the OpenAI Chat Model (gpt-5-nano) and Simple Memory for context continuity. It uses Google Sheets as a knowledge tool.
AI Agent1 (LangChain n8n node): Used in Crawl Mode for input validation. This agent strictly enforces a JSON output using the Structured Output Parser to confirm if the user input is a valid URL (URL_bool).
UA Rotativo1 (Code n8n node): Executes custom JavaScript to select a random User-Agent string (desktop/mobile variants) for HTTP Request nodes, helping to mitigate scraping detection.
Req robots / Maping Sitemap (HTTP Request n8n node): These nodes handle the low-level web extraction necessary to discover and download the site's robots.txt and subsequent sitemap index file, using custom headers provided by the n8n node.
XML / XML1 (XML n8n node): Converts the downloaded sitemap XML content into usable JSON format for further processing by the AI.
Message a model (OpenAI n8n node, GPT-4o): Used strategically after sitemap parsing. This powerful n8n node is tasked with analyzing the sitemap index structure and selecting the specific sitemap URL (e.g., pages sitemap) based on internal flags.
Loop Over Items (SplitInBatches n8n node): Manages the iteration over the list of individual page URLs derived from the sitemap.
Message a model1 (OpenAI n8n node, GPT-5 nano): The page content extractor. It is configured with a system prompt to perform structured analysis on the HTML (converted to Markdown) and uses the Append row in sheet in Google Sheets node as a tool to save the extracted details directly into the database.
Use this robust n8n workflow to automatically crawl any website's blog content, filter relevant URLs using a custom n8n node, and store the scraped data efficiently in Google Sheets using Dumpling AI.

Deploy this powerful n8n workflow to automatically analyze user survey submissions stored in n8n Data Tables and leverage OpenAI to deliver personalized course recommendations instantly.

Learn how to accurately count the total number of items returned by a previous n8n node using array expressions. This fundamental n8n workflow is essential for data auditing.

Deploy a powerful AI customer support assistant using this n8n workflow. It crawls your website in real-time using GPT-4o-mini and responds instantly via WhatsApp. Ideal n8n template for B2C.

Automate POV video creation using AI (OpenAI/ElevenLabs), Creatomate, and a Gmail approval gate. This n8n workflow handles content generation, asset creation, and multi-posting to TikTok, YouTube, and Instagram.


Completion of a higher degree on the way to university (computer engineering)







































