Extract Web Data and Store in MongoDB
Workflow Description
Automation that retrieves HTML content from web pages, processes it in batches, and stores the extracted data in MongoDB. Includes binary file handling, conditional logic, and system command execution for flexible data pipeline workflows.
How it works
- 1.Trigger manually or via HTTP request with target URL and processing parameters
- 2.Fetch and parse HTML content from the specified web page
- 3.Split data into batches for efficient concurrent processing
- 4.Apply conditional logic and custom transformations to each batch
- 5.Write validated records directly to MongoDB collections
- 6.Handle binary files and execute system commands as pipeline requires
Use cases
- Scrape product catalogs and prices from e-commerce sites into MongoDB for analytics
- Monitor website changes and automatically extract updated information in bulk
- Build data pipelines that combine web scraping with custom processing rules
Requirements
- Active MongoDB account with connection credentials and proper database access
- Valid URLs for web pages containing data to extract
- System permissions for binary file operations and command execution if required
Service Value
Ready-made workflow template for automation delivery and service execution.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (23)
On clicking 'execute'
Manual Trigger
HTTP Request
HTTP Request
HTML Extract
HTML Page
SplitInBatches
Split In Batches
HTTP Request1
HTTP Request
HTML Extract1
HTML Page
MongoDB1
Mongo Db
uProc
Uproc
Prepare Documents
Function
More Countries
If
Set Page to Scrape
Function Item
More Pages
If
Set More Pages
Function
Set
Set
Generate filename
Function Item
Read Binary File
Read Binary File
File exists?
If
Write Binary File
Write Binary File
Read Binary File1
Read Binary File
Wait
Function
Prepare countries
Function
Create Directory
Execute Command
MongoDB
Mongo Db