Skip to main content

Scrape multi-page websites recursively with Google Sheets storage

Workflow preview

Workflow preview
100%
Scrape multi-page websites recursively with Google Sheets storage preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Configurable Multi Page Web Scraper Introduction This n8n workflow provides a robust and highly reusable solution for scraping data from paginated websites. Instead of building a complex series of ...

Best for

  • Document Extraction automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.set, n8n-nodes-base.httprequest, n8n-nodes-base.splitout, n8n-nodes-base.merge, n8n-nodes-base.html, n8n-nodes-base.if, n8n-nodes-base.aggregate

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Viktor Klepikovskyi.

Original n8n.io source

1.1 Workflow description

Title
Scrape multi-page websites recursively with Google Sheets storage
Workflow name
Scrape multi-page websites recursively with Google Sheets storage

Configurable Multi-Page Web Scraper

Introduction

This n8n workflow provides a robust and highly reusable solution for scraping data from paginated websites. Instead of building a complex series of nodes for every new site, you only need to update a simple JSON configuration in the initial Input Node, making your scraping tasks faster and more standardized.

Purpose

The core purpose of this template is to automate the extraction of structured data (e.g., product details, quotes, articles) from websites with multiple pages. It is designed to be fully recursive: it follows the "next page" link until no link is found, aggregates the results from all pages, and cleanly structures the final output into a single list of items.

Setup and Configuration

  1. Locate the Input Node: The entire configuration for the scraper is held within the first node of the workflow.
  2. Update the JSON: Replace the existing JSON content with your target website's details:
    • startUrl: The URL of the first page to begin scraping.
    • nextPageSelector: The CSS selector for the "Next" or "Continue" link element that leads to the next page. This is crucial for the pagination loop.
    • fields: An array of objects defining the data to extract on each page. For each field, specify the name (the output key), the selector (the CSS selector pointing to the data), and the value (the HTML attribute to pull, usually text or href).
  3. Run the Workflow: After updating the configuration, execute the workflow. It will automatically loop through all pages and deliver a final, structured list of the scraped data.

For a detailed breakdown of the internal logic, including how the loop is constructed using the Set, If, and HTTP Request nodes, please refer to the original blog post: Flexible Web Scraping with n8n: A Configurable, Multi-Page Template

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Start

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Input

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Get Start URL

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - Next Page Input

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - Split Out Fields

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 6 - Merge HTML and Fields

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 7 - Scrape Fields

Type / Role
n8n-nodes-base.html - html
Config choices
Version 1.2

Block 8 - Scrape Next Page Link

Type / Role
n8n-nodes-base.html - html
Config choices
Version 1.2

Block 9 - If Next Page Link

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 10 - Aggregate Fields

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 11 - Split Out Items

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 12 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Store Scraped Data

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

3. Summary Table

Workflow Scrape multi-page websites recursively with Google Sheets storage
Complexity advanced
Nodes 17
Categories Document Extraction
Author Viktor Klepikovskyi
Published 25 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10173/10173.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Scrape multi-page websites recursively with Google Sheets storage do?

Configurable Multi Page Web Scraper Introduction This n8n workflow provides a robust and highly reusable solution for scraping data from paginated websites. Instead of building a complex series of ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction use case.