Overview

Manually extracting and archiving website content from sitemaps wastes time and invites errors. This workflow automates sitemap scraping, filters URLs by rules, crawls page content, and saves each page as a text file in Google Drive—streamlining backup, audit, and content retrieval.

The Impact

  • Slash manual scraping hours. Automate batch extraction and storage of filtered sitemap pages.
  • Ensure consistent backups. Archive relevant pages automatically for audit and offline access.
  • Track competitor content. Grab pages with "agent" or "tool" keywords for monitoring changes.
  • Build text corpora fast. Export large volumes of filtered page content for analysis or model training.

Who This Is For

  • Website Administrators needing periodic content backups and audits.
  • Product & Operations Staff monitoring competitor pages with specific keywords.
  • Data Engineers building text datasets from website content.
  • SEO Specialists extracting targeted URLs for analysis.

How It Works

1
  1. Fetch Sitemap XML
  2. Send an HTTP GET request to the configured sitemap URL to retrieve the raw XML content.
2
  1. Parse and Filter URLs
  2. Convert the XML to URL objects and apply filters to keep URLs from the root domain or containing "agent" or "tool".
3
  1. Loop Over Filtered URLs
  2. Iterate through each filtered URL to process individually.
4
  1. Crawl Web Page Content
  2. Extract the page's Title and Content using the crawl tool.
5
  1. Save Text to Google Drive
  2. Save the scraped content as a text file named by combining the URL and page title.

What You'll Need

Before using this template, make sure you have:

  • Google Drive credentials authorized for file creation (required for saving scraped content).
  • A valid sitemap XML URL pointing to the website's top-level sitemap or index sitemap if multiple levels exist.

How to Use

  1. Step 1. Configure Credentials
  2. Input your Google Drive credentials in the "Save Text To Google Drive" node to enable file saving.

  3. Step 2. Set Sitemap URL
  4. Enter the full sitemap XML URL in the "WebSiteMapURL" parameter, replacing the default if scraping a different site.

  5. Step 3. Run the Workflow
  6. Start the automation to fetch, filter, crawl, and save page contents in batch.

  7. Step 4. Monitor Progress
  8. Observe the loop processing each URL, crawling pages, and creating text files in Google Drive.

  9. Step 5. Verify Results
  10. Check your Google Drive for the newly created text files matching the filtered pages to confirm success.

FAQs

How does the workflow decide which URLs to scrape?
It parses the sitemap XML into URL objects, then filters URLs that either match the root domain or contain "agent" or "tool" keywords.
What happens if the sitemap has multiple levels?
You should provide the URL of the top-level index sitemap to the "WebSiteMapURL" parameter to capture all nested sitemaps.
Can I customize the filtering rules for URLs?
Currently, the filter keeps URLs from the root domain or those containing "agent" or "tool"; modifying the code node allows adjusting these rules.
How are the scraped pages saved in Google Drive?
Each page's content is saved as a text file named by combining its URL and page title, ensuring unique and traceable filenames.
Is this workflow suitable for building datasets for text analysis?
Yes, it can batch-export filtered page contents as text files, which can serve as raw corpora for analysis or training.
Was This Page Helpful?

More Workflows for Inspiration

🤖
Local LLM Batch Evaluator
Automate batch testing of local LLMs, capturing detailed metrics and saving results to Google Sheets.
Learn more >
📧
Intelligent Email Auto-reply
Automate Gmail replies with AI-based classification and calendar scheduling to save time.
Learn more >
📧
Smart Email Priority Manager
Automatically classify Gmail emails by urgency and importance to streamline inbox management.
Learn more >