Back to Catalog

Build a multi-site content aggregator with Google Sheets & custom extraction logic

Omer FayyazOmer Fayyaz
69 views
2/3/2026
Official Page

An intelligent web scraping workflow that automatically routes URLs to site-specific extraction logic, normalizes data across multiple sources, and filters content by freshness to build a unified article feed.

What Makes This Different:

  • Intelligent Source Routing - Uses a Switch node to route URLs to specialized extractors based on source identifier, enabling custom CSS selectors per publisher for maximum accuracy
  • Universal Fallback Parser - Advanced regex-based extractor handles unknown sources automatically, extracting title, description, author, date, and images from meta tags and HTML patterns
  • Freshness Filtering - Built-in 45-day freshness threshold filters outdated content before saving, with configurable date validation logic
  • Tier-Based Classification - Automatically categorizes articles into Tier 1 (0-7 days), Tier 2 (8-14 days), Tier 3 (15-30 days), or Archive based on publication date
  • Rate Limiting & Error Handling - Built-in 3-second delays between requests prevents server overload, with comprehensive error handling that continues processing even if individual URLs fail
  • Status Tracking - Updates source spreadsheet with processing status, enabling easy monitoring and retry logic for failed extractions

Key Benefits of Multi-Source Content Aggregation:

  • Scalable Architecture - Easily add new sources by adding a Switch rule and extraction node, no code changes needed for most sites
  • Data Normalization - Standardizes extracted data across all sources into a consistent format (title, description, author, date, image, canonical URL)
  • Automated Processing - Schedule-based execution (every 4 hours) or manual triggers keep your feed updated without manual intervention
  • Quality Control - Freshness filtering ensures only recent, relevant content enters your feed, reducing noise from outdated articles
  • Flexible Input - Reads from Google Sheets, making it easy to add URLs in bulk or integrate with other systems
  • Comprehensive Metadata - Captures full article metadata including canonical URLs, publication dates, author information, and featured images

Who's it for

This template is designed for content aggregators, news monitoring services, content marketers, SEO professionals, researchers, and anyone who needs to collect and normalize articles from multiple websites. It's perfect for organizations that need to monitor competitor content, aggregate industry news, build content databases, track publication trends, or create unified article feeds without manually scraping each site or writing custom scrapers for every source.

How it works / What it does

This workflow creates a unified article aggregation system that reads URLs from Google Sheets, routes them to site-specific extractors, normalizes the data, filters by freshness, and saves results to a feed. The system:

  1. Reads Pending URLs - Fetches URLs with source identifiers from Google Sheets, filtering for entries with "Pending" status
  2. Processes with Rate Limiting - Loops through URLs one at a time with a 3-second delay between requests to respect server resources
  3. Fetches HTML Content - Downloads page HTML with proper browser headers (User-Agent, Accept, Accept-Language) to avoid blocking
  4. Routes by Source - Switch node directs URLs to specialized extractors (Site A, B, C, D) or universal fallback parser based on Source field
  5. Extracts Article Data - Site-specific HTML nodes use custom CSS selectors, while fallback uses regex patterns to extract title, description, author, date, image, and canonical URL
  6. Normalizes Data - Standardizes all extracted fields into consistent format, handling missing values and trimming whitespace
  7. Filters by Freshness - Validates publication dates and filters out articles older than 45 days (configurable threshold)
  8. Calculates Tier & Status - Assigns tier classification and freshness status based on article age
  9. Saves to Feed - Appends normalized articles to Article Feed sheet with all metadata
  10. Updates Status - Marks processed URLs as complete in source sheet for tracking

Key Innovation: Source-Based Routing - Unlike generic scrapers that use one-size-fits-all extraction, this workflow uses intelligent routing to apply site-specific CSS selectors. This dramatically improves extraction accuracy while maintaining a universal fallback for unknown sources, making it both precise and extensible.

How to set up

1. Prepare Google Sheets

  • Create a Google Sheet with two tabs: "URLs to Process" and "Article Feed"
  • In "URLs to Process" sheet, create columns: URL, Source, Status
  • Add sample data: URLs in URL column, source identifiers (e.g., "Site A", "Site B") in Source column, and "Pending" in Status column
  • In "Article Feed" sheet, the workflow will automatically create columns: Title, Description, Author, datePublished, imageUrl, canonicalUrl, source, sourceUrl, tier, freshnessStatus, extractedAt
  • Verify your Google Sheets credentials are set up in n8n (OAuth2 recommended)

2. Configure Google Sheets Nodes

  • Open the "Read Pending URLs" node and select your spreadsheet from the document dropdown
  • Set sheet name to "URLs to Process"
  • Configure the "Save to Article Feed" node: select same spreadsheet, set sheet name to "Article Feed", operation should be "Append or Update"
  • Configure the "Update URL Status" node: same spreadsheet, "URLs to Process" sheet, operation "Update"
  • Test connection by running the "Read Pending URLs" node manually to verify it can access your sheet

3. Customize Source Routing

  • Open the "Source Router" (Switch node) to see current routing rules for Site A, B, C, D, and fallback
  • To add a new source: Click "Add Rule", set condition: {{ $('Loop Over URLs').item.json.Source }} equals your source name
  • Create a new HTML extraction node for your source with appropriate CSS selectors
  • Connect the new extractor to the "Normalize Extracted Data" node
  • Update the Switch node to route to your new extractor
  • Example CSS selectors for common sites:
    // WordPress sites
    title: "h1.entry-title, .post-title"
    author: ".author-name, .byline a"
    date: "time.entry-date, time[datetime]"
    
    // Modern CMS
    title: "h1.article__title, article h1"
    author: ".article__byline a, a[rel='author']"
    date: "time[datetime], meta[property='article:published_time']"
    

4. Configure Freshness Threshold

  • Open the "Freshness Filter (45 days)" IF node
  • The current threshold is 45 days (configurable in the condition expression)
  • To change threshold: Modify the expression cutoffDate.setDate(cutoffDate.getDate() - 45) to your desired number of days
  • The filter marks articles as "Fresh" (within threshold) or routes to "Outdated" handler
  • Test with sample URLs to verify date parsing works correctly for your sources

5. Set Up Scheduling & Test

  • The workflow includes both Manual Trigger (for testing) and Schedule Trigger (runs every 4 hours)
  • To customize schedule: Open "Schedule (Every 4 Hours)" node and adjust interval
  • For initial testing: Use Manual Trigger, add 2-3 test URLs to your sheet with Status="Pending"
  • Verify execution: Check that URLs are fetched, routed correctly, extracted, and saved to Article Feed
  • Monitor the "Completion Summary" node output to see processing statistics
  • Check execution logs for any errors in HTML extraction or date parsing
  • Common issues: Missing CSS selectors (update extractor), date format mismatches (adjust date parsing), or rate limiting (increase wait time if needed)

Requirements

  • Google Sheets Account - Active Google account with OAuth2 credentials configured in n8n for reading and writing spreadsheet data
  • Source Spreadsheet - Google Sheet with "URLs to Process" and "Article Feed" tabs, properly formatted with required columns
  • n8n Instance - Self-hosted or cloud n8n instance with access to external websites (HTTP Request node needs internet connectivity)
  • Source Knowledge - Understanding of target website HTML structure to configure CSS selectors for site-specific extractors (or use fallback parser for unknown sources)

Multi-Site Content Aggregator with Google Sheets & Custom Extraction

This n8n workflow automates the process of aggregating content from multiple websites, extracting specific data using custom logic, and storing it in a Google Sheet. It's designed for users who need to monitor and collect structured information from various web sources regularly.

What it does

This workflow performs the following key steps:

  1. Manual or Scheduled Trigger: The workflow can be initiated manually or set to run on a predefined schedule (e.g., daily, hourly).
  2. Google Sheets Input: It reads a list of URLs from a specified Google Sheet. Each row in the sheet is expected to contain a URL to a website for content extraction.
  3. Loop Over URLs: For each URL retrieved from Google Sheets, the workflow processes it individually.
  4. HTTP Request: It makes an HTTP GET request to fetch the content of each URL.
  5. HTML Extraction: The HTML content of the webpage is then passed to an HTML node, which is configured to extract specific data elements from the page. This likely involves using CSS selectors or XPath expressions to pinpoint the desired information (e.g., titles, descriptions, images, specific text blocks).
  6. Conditional Logic (If): After extraction, an "If" node evaluates a condition. This condition determines if the extracted data meets certain criteria.
  7. Custom Data Transformation (Code): If the condition in the "If" node is met (the "True" branch), a "Code" node executes custom JavaScript logic. This node is crucial for advanced data manipulation, cleaning, or reformatting the extracted content before it's stored.
  8. Edit Fields (Set): Following the custom code, an "Edit Fields (Set)" node is used to rename, add, or remove fields from the item, ensuring the data is in the correct structure for Google Sheets.
  9. Conditional Logic (Switch): Another conditional node, "Switch," further routes the data based on specific values or conditions within the extracted content. This allows for different processing paths depending on the content type or source.
  10. Wait: A "Wait" node introduces a delay in the workflow, potentially to avoid rate limits when making multiple HTTP requests or to space out processing.
  11. Google Sheets Output: Finally, the processed and transformed data is appended as new rows to a designated Google Sheet.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance (cloud or self-hosted).
  • Google Account: A Google account with access to Google Sheets.
  • Google Sheets Credential: An n8n credential configured for Google Sheets to allow the workflow to read from and write to your spreadsheets.
  • Target Websites: A list of websites from which you intend to extract content.
  • Understanding of HTML/CSS Selectors (for customization): To effectively configure the HTML and Code nodes for custom extraction, familiarity with HTML structure and CSS selectors will be beneficial.

Setup/Usage

  1. Import the Workflow: Download the provided JSON and import it into your n8n instance.
  2. Configure Google Sheets Credentials:
    • Locate the "Google Sheets" nodes.
    • Click on the credential field and select an existing Google Sheets OAuth2 credential, or create a new one. Ensure it has access to the Google Sheet you intend to use.
  3. Prepare Your Google Sheet:
    • Create a new Google Sheet (or use an existing one).
    • In the first Google Sheets node, specify the "Spreadsheet ID" and "Sheet Name" where your source URLs are listed. Ensure the column containing URLs is correctly referenced in the node's configuration.
    • In the second Google Sheets node, specify the "Spreadsheet ID" and "Sheet Name" where the aggregated content should be written.
  4. Customize HTML Extraction:
    • Open the "HTML" node.
    • Adjust the "CSS Selector" or "XPath" properties to target the specific content you wish to extract from the web pages. You may need to inspect the HTML of your target websites to find the correct selectors.
  5. Customize Conditional Logic:
    • Review the "If" and "Switch" nodes.
    • Modify the conditions to match your specific filtering and routing requirements for the extracted data.
  6. Customize Code Logic:
    • Open the "Code" node.
    • Implement your custom JavaScript logic to transform, clean, or enrich the extracted data as needed.
  7. Configure Schedule (Optional):
    • If you want the workflow to run automatically, configure the "Schedule Trigger" node with your desired interval (e.g., every day at a specific time).
  8. Activate the Workflow: Once configured, activate the workflow to enable it to run.
  9. Test: Run the workflow manually first to ensure all steps are working as expected and data is being extracted and stored correctly.

Related Templates

Track competitor SEO keywords with Decodo + GPT-4.1-mini + Google Sheets

This workflow automates competitor keyword research using OpenAI LLM and Decodo for intelligent web scraping. Who this is for SEO specialists, content strategists, and growth marketers who want to automate keyword research and competitive intelligence. Marketing analysts managing multiple clients or websites who need consistent SEO tracking without manual data pulls. Agencies or automation engineers using Google Sheets as an SEO data dashboard for keyword monitoring and reporting. What problem this workflow solves Tracking competitor keywords manually is slow and inconsistent. Most SEO tools provide limited API access or lack contextual keyword analysis. This workflow solves that by: Automatically scraping any competitor’s webpage with Decodo. Using OpenAI GPT-4.1-mini to interpret keyword intent, density, and semantic focus. Storing structured keyword insights directly in Google Sheets for ongoing tracking and trend analysis. What this workflow does Trigger — Manually start the workflow or schedule it to run periodically. Input Setup — Define the website URL and target country (e.g., https://dev.to, france). Data Scraping (Decodo) — Fetch competitor web content and metadata. Keyword Analysis (OpenAI GPT-4.1-mini) Extract primary and secondary keywords. Identify focus topics and semantic entities. Generate a keyword density summary and SEO strength score. Recommend optimization and internal linking opportunities. Data Structuring — Clean and convert GPT output into JSON format. Data Storage (Google Sheets) — Append structured keyword data to a Google Sheet for long-term tracking. Setup Prerequisites If you are new to Decode, please signup on this link visit.decodo.com n8n account with workflow editor access Decodo API credentials OpenAI API key Google Sheets account connected via OAuth2 Make sure to install the Decodo Community node. Create a Google Sheet Add columns for: primarykeywords, seostrengthscore, keyworddensity_summary, etc. Share with your n8n Google account. Connect Credentials Add credentials for: Decodo API credentials - You need to register, login and obtain the Basic Authentication Token via Decodo Dashboard OpenAI API (for GPT-4o-mini) Google Sheets OAuth2 Configure Input Fields Edit the “Set Input Fields” node to set your target site and region. Run the Workflow Click Execute Workflow in n8n. View structured results in your connected Google Sheet. How to customize this workflow Track Multiple Competitors → Use a Google Sheet or CSV list of URLs; loop through them using the Split In Batches node. Add Language Detection → Add a Gemini or GPT node before keyword analysis to detect content language and adjust prompts. Enhance the SEO Report → Expand the GPT prompt to include backlink insights, metadata optimization, or readability checks. Integrate Visualization → Connect your Google Sheet to Looker Studio for SEO performance dashboards. Schedule Auto-Runs → Use the Cron Node to run weekly or monthly for competitor keyword refreshes. Summary This workflow automates competitor keyword research using: Decodo for intelligent web scraping OpenAI GPT-4.1-mini for keyword and SEO analysis Google Sheets for live tracking and reporting It’s a complete AI-powered SEO intelligence pipeline ideal for teams that want actionable insights on keyword gaps, optimization opportunities, and content focus trends, without relying on expensive SEO SaaS tools.

Ranjan DailataBy Ranjan Dailata
161

Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax

Spark your creativity instantly in any chat—turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. 📋 What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing 🔧 Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation 🔑 Required Credentials OpenAI API Setup Go to platform.openai.com → API keys (sidebar) Click "Create new secret key" → Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai → Dashboard → API Keys Generate a new API key → Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) ⚙️ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflow—chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions

Daniel NkenchoBy Daniel Nkencho
601

Automate Dutch Public Procurement Data Collection with TenderNed

TenderNed Public Procurement What This Workflow Does This workflow automates the collection of public procurement data from TenderNed (the official Dutch tender platform). It: Fetches the latest tender publications from the TenderNed API Retrieves detailed information in both XML and JSON formats for each tender Parses and extracts key information like organization names, titles, descriptions, and reference numbers Filters results based on your custom criteria Stores the data in a database for easy querying and analysis Setup Instructions This template comes with sticky notes providing step-by-step instructions in Dutch and various query options you can customize. Prerequisites TenderNed API Access - Register at TenderNed for API credentials Configuration Steps Set up TenderNed credentials: Add HTTP Basic Auth credentials with your TenderNed API username and password Apply these credentials to the three HTTP Request nodes: "Tenderned Publicaties" "Haal XML Details" "Haal JSON Details" Customize filters: Modify the "Filter op ..." node to match your specific requirements Examples: specific organizations, contract values, regions, etc. How It Works Step 1: Trigger The workflow can be triggered either manually for testing or automatically on a daily schedule. Step 2: Fetch Publications Makes an API call to TenderNed to retrieve a list of recent publications (up to 100 per request). Step 3: Process & Split Extracts the tender array from the response and splits it into individual items for processing. Step 4: Fetch Details For each tender, the workflow makes two parallel API calls: XML endpoint - Retrieves the complete tender documentation in XML format JSON endpoint - Fetches metadata including reference numbers and keywords Step 5: Parse & Merge Parses the XML data and merges it with the JSON metadata and batch information into a single data structure. Step 6: Extract Fields Maps the raw API data to clean, structured fields including: Publication ID and date Organization name Tender title and description Reference numbers (kenmerk, TED number) Step 7: Filter Applies your custom filter criteria to focus on relevant tenders only. Step 8: Store Inserts the processed data into your database for storage and future analysis. Customization Tips Modify API Parameters In the "Tenderned Publicaties" node, you can adjust: offset: Starting position for pagination size: Number of results per request (max 100) Add query parameters for date ranges, status filters, etc. Add More Fields Extend the "Splits Alle Velden" node to extract additional fields from the XML/JSON data, such as: Contract value estimates Deadline dates CPV codes (procurement classification) Contact information Integrate Notifications Add a Slack, Email, or Discord node after the filter to get notified about new matching tenders. Incremental Updates Modify the workflow to only fetch new tenders by: Storing the last execution timestamp Adding date filters to the API query Only processing publications newer than the last run Troubleshooting No data returned? Verify your TenderNed API credentials are correct Check that you have setup youre filter proper Need help setting this up or interested in a complete tender analysis solution? Get in touch 🔗 LinkedIn – Wessel Bulte

Wessel BulteBy Wessel Bulte
247