ES | EN
Engineering

Scrape and store data from multiple website pages

Mongo DbUproc
Nodes 3
Complexity Intermediate
Category Engineering
n8n popularity 80,004 views in n8n library

This workflow allows extracting data from multiple pages website. The workflow: 1) Starts in a country list at https://www.theswiftcodes.com/browse-by-country/. 2) Loads every country page (https://www.theswiftcodes.com/albania/) 3) Paginates every page in the country page. 4) Extracts data from the country page. 5) Saves data to MongoDB. 6) Paginates through all pages in all countries. It uses getWorkflowStaticData('global') method to recover the next page (saved from the previous page), and it goes ahead with all the pages. There is a first section where the countries list is recovered and extracted. Later, I try to read if a local cache page is available and I recover the cached page from the disk. Finally, I save data to MongoDB, and we paginate all the pages in the country and for all the countries. I have applied a cache system to save a visited page to n8n local disk. If I relaunch workflow, we check if a cache file exists to discard non-required requests to the webpage.

Apps and nodes included

Step-by-Step Implementation Guide

Extracción de Datos de Sitios Web y Almacenamiento

Este flujo automatiza la extracción de datos de múltiples páginas web, como listas de países y datos asociados, y los guarda en una base de datos MongoDB. Es ideal para el scraping y almacenamiento eficiente de información web.

Nodos Utilizados

  • HTTP Request: Realiza peticiones HTTP para obtener el contenido de las páginas web.
  • MongoDB: Almacena los datos extraídos.
  • UPROC: Permite iterar por múltiples páginas web.

Pasos de Configuración

  • Paso 1: Configura el nodo HTTP Request con la URL de la página web a extraer.
  • Paso 2: Configura el nodo MongoDB con la información de tu base de datos y la estructura de datos a guardar.
  • Paso 3: Configura el nodo UPROC para la paginación y el manejo de múltiples páginas.
  • Paso 4: Ejecuta el flujo para extraer y guardar los datos.
⚡ Open and edit in Scriflow ← Browse all n8n templates

Scriflow builds and adapts n8n workflows with AI. Open this template in the editor to get the import-ready JSON.