Scrape Any Website with n8n – Step by Step

Websites scrapen mit n8n – Schritt für Schritt

🇬🇧 English

n8n Basics: Scrape Any Website Data — Step by Step

Web scraping used to require Python scripts, proxies, and hours of debugging. Today, you can automate the entire process visually — and n8n makes it surprisingly straightforward. In this guide, you will learn how to scrape any website, extract the data you need, and store or process it automatically — all without writing a single line of code.

What Is Web Scraping and Why Automate It?

Web scraping is the process of automatically extracting information from websites. Common use cases include:

  • Monitoring competitor prices
  • Collecting job listings or news headlines
  • Tracking product availability
  • Aggregating data for research or reporting

Doing this manually is time-consuming and error-prone. By automating it with n8n, you can schedule scraping runs, handle pagination, and send results directly to Google Sheets, Airtable, Slack, or any other tool in your stack.

What You Need Before You Start

To follow this tutorial, you will need:

  • A running instance of n8n (self-hosted or cloud)
  • The URL of the website you want to scrape
  • Basic familiarity with the n8n canvas (nodes and connections)

No coding experience is required. n8n handles the heavy lifting through its built-in nodes.

Step 1: Create a New Workflow in n8n

Open your n8n dashboard and click New Workflow. Give it a descriptive name like Website Scraper – Product Prices. This keeps your workspace organized, especially as you build more automations.

Step 2: Add a Trigger Node

Every n8n workflow needs a trigger. For scheduled scraping, use the Schedule Trigger node. You can set it to run every hour, daily, or at any custom interval. If you want to run the scraper manually for testing, use the Manual Trigger node instead — you can always swap it out later.

Step 3: Fetch the Web Page with the HTTP Request Node

Add an HTTP Request node and connect it to your trigger. Configure it as follows:

  • Method: GET
  • URL: Paste the target website URL
  • Response Format: Text (to receive raw HTML)

When you execute this node, n8n fetches the full HTML of the page. You can inspect the output in the node's result panel to confirm everything arrived correctly.

Step 4: Extract Data with the HTML Extract Node

This is where the magic happens. Add the HTML Extract node and connect it to the HTTP Request node. Inside this node, you define CSS selectors that point to the elements you want to extract.

For example, to extract product names and prices from an e-commerce page, you might configure:

  • Key: productName — CSS Selector: .product-titleValue: Text
  • Key: price — CSS Selector: .product-priceValue: Text

Not sure which selector to use? Right-click any element in your browser, choose Inspect, and look at the class or ID attributes. Copy them directly into the n8n HTML Extract node.

Step 5: Transform and Clean the Data

Raw scraped data often needs cleanup — removing currency symbols, trimming whitespace, or reformatting dates. Use the Set node or the Code node in n8n to apply simple transformations. For example, you can strip the dollar sign from a price string and convert it to a number for calculations.

Example Transformation (Code Node)

In the Code node, a quick JavaScript snippet can handle most cleanup tasks:

  • Remove extra spaces: item.price.trim()
  • Parse a number: parseFloat(item.price.replace('$', ''))
  • Format a date: new Date(item.date).toISOString()

Step 6: Send Data to Your Destination

Once your data is clean, connect it to any output node. Popular choices within n8n include:

  • Google Sheets — append rows automatically
  • Airtable — create or update records
  • Slack or Email — send instant alerts when data changes
  • Webhook — push data to any external system

With n8n, you simply add the relevant node, authenticate your account, and map the fields from your scraper to the destination columns. No custom API integration needed.

Step 7: Test, Debug, and Activate

Before activating your workflow, run it manually and check each node's output. n8n shows the data flowing through every step, making it easy to spot issues. Once everything looks correct, toggle the workflow to Active — and it will run automatically on your chosen schedule.

Pro Tips for Better Scraping Results

  • Handle pagination: Use a loop (the Loop Over Items node) combined with incrementing page numbers in the URL to scrape multiple pages.
  • Respect robots.txt: Always check a website's scraping policy before automating requests.
  • Add error handling: Use the Error Trigger node in n8n to get notified if something breaks.
  • Throttle requests: Add a Wait node between iterations to avoid overloading servers.

When to Use an External Scraping API

Some websites use JavaScript rendering (React, Vue, etc.) that the HTTP Request node cannot handle, since it only fetches static HTML. In those cases, consider integrating a service like Browserless, ScrapingBee, or Apify via their API — and control the entire flow from within n8n using HTTP Request nodes pointed at the service endpoint.

Final Thoughts

Web scraping no longer requires a developer. With n8n, you can build a fully automated data collection pipeline in under 30 minutes. Whether you are monitoring prices, tracking news, or feeding data into your AI workflows, the combination of the HTTP Request and HTML Extract nodes gives you a powerful, flexible scraping engine.

Start small — pick one website, one data point — and expand your workflow from there. The n8n canvas grows with your needs, and every automation you build compounds your productivity over time.

This post was created with tools we use and recommend: n8n for workflow automation, Turbotic as an AI-native automation alternative, ElevenLabs for AI voiceover, Placid for visual content creation, and Hostinger for reliable VPS hosting. Some links are affiliate links.

🇩🇪 Deutsch

n8n Grundlagen: Website-Daten scrapen — Schritt für Schritt

Web Scraping war früher Python-Skripten, Proxys und stundenlangem Debugging vorbehalten. Heute lässt sich der gesamte Prozess visuell automatisieren — und n8n macht es überraschend einfach. In dieser Anleitung lernst du, wie du beliebige Websites scrapst, die gewünschten Daten extrahierst und sie automatisch speicherst oder weiterverarbeitest — ganz ohne eine einzige Zeile Code.

Was ist Web Scraping und warum automatisieren?

Web Scraping bezeichnet das automatische Extrahieren von Informationen aus Websites. Typische Anwendungsfälle sind:

  • Überwachung von Konkurrenzpreisen
  • Sammeln von Stellenanzeigen oder Nachrichtenüberschriften
  • Verfügbarkeit von Produkten verfolgen
  • Daten für Recherche oder Reporting aggregieren

Das manuell zu erledigen ist zeitaufwändig und fehleranfällig. Durch die Automatisierung mit n8n kannst du Scraping-Läufe planen, Paginierung handhaben und Ergebnisse direkt an Google Sheets, Airtable, Slack oder andere Tools senden.

Was du vorher brauchst

Um diesem Tutorial zu folgen, benötigst du:

  • Eine laufende n8n-Instanz (selbst gehostet oder Cloud)
  • Die URL der Website, die du scrapen möchtest
  • Grundkenntnisse des n8n-Canvas (Nodes und Verbindungen)

Programmierkenntnisse sind nicht erforderlich. n8n übernimmt die schwere Arbeit durch seine integrierten Nodes.

Schritt 1: Einen neuen Workflow in n8n anlegen

Öffne dein n8n-Dashboard und klicke auf Neuer Workflow. Gib ihm einen aussagekräftigen Namen wie Website Scraper – Produktpreise. Das hält deinen Arbeitsbereich übersichtlich, besonders wenn du mehr Automationen baust.

Schritt 2: Einen Trigger-Node hinzufügen

Jeder n8n-Workflow benötigt einen Trigger. Für geplantes Scraping verwende den Schedule Trigger-Node. Du kannst ihn auf stündlich, täglich oder ein beliebiges benutzerdefiniertes Intervall einstellen. Wenn du den Scraper zum Testen manuell starten möchtest, verwende stattdessen den Manual Trigger-Node — du kannst ihn später jederzeit austauschen.

Schritt 3: Die Webseite mit dem HTTP-Request-Node abrufen

Füge einen HTTP Request-Node hinzu und verbinde ihn mit deinem Trigger. Konfiguriere ihn wie folgt:

  • Methode: GET
  • URL: Ziel-URL der Website einfügen
  • Antwortformat: Text (um rohes HTML zu erhalten)

Wenn du diesen Node ausführst, ruft n8n das vollständige HTML der Seite ab. Du kannst die Ausgabe im Ergebnisbereich des Nodes prüfen, um sicherzustellen, dass alles korrekt angekommen ist.

Schritt 4: Daten mit dem HTML-Extract-Node extrahieren

Hier passiert die eigentliche Magie. Füge den HTML Extract-Node hinzu und verbinde ihn mit dem HTTP-Request-Node. In diesem Node definierst du CSS-Selektoren, die auf die Elemente zeigen, die du extrahieren möchtest.

Um beispielsweise Produktnamen und Preise von einer E-Commerce-Seite zu extrahieren, kannst du Folgendes konfigurieren:

  • Key: produktName — CSS-Selektor: .product-titleWert: Text
  • Key: preis — CSS-Selektor: .product-priceWert: Text

Nicht sicher, welchen Selektor du verwenden sollst? Klicke im Browser mit der rechten Maustaste auf ein Element, wähle Untersuchen und schaue dir die Klassen- oder ID-Attribute an. Kopiere sie direkt in den n8n HTML-Extract-Node.

Schritt 5: Daten transformieren und bereinigen

Rohe Scraped-Daten müssen oft bereinigt werden — Währungssymbole entfernen, Leerzeichen kürzen oder Datumsformate anpassen. Verwende den Set-Node oder den Code-Node in n8n, um einfache Transformationen durchzuführen. Du kannst zum Beispiel das Dollarzeichen aus einem Preisstring entfernen und ihn für Berechnungen in eine Zahl umwandeln.

Beispiel-Transformation (Code-Node)

Im Code-Node erledigt ein kurzes JavaScript-Snippet die meisten Bereinigungsaufgaben:

  • Leerzeichen entfernen: item.price.trim()
  • Zahl parsen: parseFloat(item.price.replace('$', ''))
  • Datum formatieren: new Date(item.date).toISOString()

Schritt 6: Daten an das Ziel senden

Sobald deine Daten bereinigt sind, verbinde sie mit einem Ausgabe-Node. Beliebte Optionen in n8n sind:

  • Google Sheets — Zeilen automatisch anhängen
  • Airtable — Datensätze erstellen oder aktualisieren
  • Slack oder E-Mail — sofortige Benachrichtigungen bei Datenänderungen
  • Webhook — Daten an beliebige externe Systeme pushen

Mit n8n fügst du einfach den entsprechenden Node hinzu, authentifizierst dein Konto und ordnest die Felder aus deinem Scraper den Zielspalten zu. Keine benutzerdefinierte API-Integration erforderlich.

Schritt 7: Testen, Debuggen und Aktivieren

Bevor du deinen Workflow aktivierst, führe ihn manuell aus und überprüfe die Ausgabe jedes Nodes. n8n zeigt die durch jeden Schritt fließenden Daten an, sodass Probleme leicht zu erkennen sind. Sobald alles korrekt aussieht, schalte den Workflow auf Aktiv — und er läuft automatisch nach deinem Zeitplan.

Profi-Tipps für bessere Scraping-Ergebnisse

  • Paginierung handhaben: Verwende eine Schleife (den Loop Over Items-Node) kombiniert mit inkrementierenden Seitenzahlen in der URL, um mehrere Seiten zu scrapen.
  • robots.txt beachten: Prüfe immer die Scraping-Richtlinien einer Website, bevor du Anfragen automatisierst.
  • Fehlerbehandlung hinzufügen: Verwende den Error Trigger-Node in n8n, um benachrichtigt zu werden, wenn etwas schief läuft.
  • Anfragen drosseln: Füge einen Wait-Node zwischen Iterationen ein, um Server nicht zu überlasten.

Wann du eine externe Scraping-API

Dieser Beitrag wurde mit Tools erstellt, die wir selbst nutzen und empfehlen: n8n für Workflow-Automatisierung, Turbotic als KI-native Automatisierungsalternative, ElevenLabs für KI-Voiceover, Placid für visuelle Content-Erstellung und netcup für zuverlässiges VPS-Hosting in Deutschland. Einige Links sind Affiliate-Links.