Scraping GitHub Trending Repositories Data - n8n Workflow

Use this powerful n8n workflow to automatically scrape and structure the latest GitHub trending repositories daily. This efficient n8n template handles complex HTML extraction.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Developers who need real-time data on emerging open-source projects.
Data analysts requiring structured lists of trending repositories for research.
Users looking for a complex web scraping n8n template to learn HTML parsing techniques.
Automation specialists seeking reusable n8n workflow components for data transformation.

Overview

Keeping up with the fastest-growing projects on GitHub can be time-consuming. This comprehensive n8n workflow solves that problem by automatically hitting the GitHub trending page, parsing the HTML, and extracting structured data for every top repository listed. This n8n workflow demonstrates advanced web scraping capabilities using multiple HTML n8n node operations, ensuring you receive clean fields like author, repository title, description, and direct URL.

By leveraging this n8n template, you eliminate the need for manual copy-pasting or maintaining custom scripts. It provides a robust, low-code solution for turning unstructured web content into usable business intelligence.

How it Works

The process begins with the Manual n8n trigger, allowing you to execute the automation instantly.


  1. Request Data: The workflow initiates an HTTP Request to the official GitHub trending page (/trending).

  2. Isolate Content Block: An HTML n8n node extracts the main div.Box content block, focusing the subsequent parsing steps only on the relevant list section.

  3. Extract List Items: A second HTML n8n node identifies all individual repository rows (article.Box-row) and collects them into an array named repositories.

  4. Iterate: The Split Out n8n node transforms the array into individual items, ensuring that each repository is processed sequentially.

  5. Extract Details: A third HTML n8n node focuses on the individual repository's HTML snippet, extracting the raw link text (repository), language, and description.

  6. Structure Data: The final Set n8n node transforms the raw data. It cleanly separates the raw link (e.g., author / repository-name) into distinct author and title fields using JavaScript expressions and constructs the complete, clean repository url. This ensures the output from the n8n workflow is perfectly structured for database insertion or reporting.

Installation Guide

To deploy this n8n workflow, follow these steps:


  1. Copy the entire n8n workflow JSON provided.

  2. In your n8n instance, click 'New' > 'Import from JSON'. Paste the code.

  3. No external credentials are required as this n8n template only performs an unauthenticated HTTP request to a publicly accessible GitHub page.

  4. Locate the first n8n node, 'When clicking ‘Test workflow’' (a Manual Trigger), and click 'Test workflow' to see the scraped data output immediately.

Node Details

When clicking ‘Test workflow’ (Manual Trigger): Serves as the starting point, acting as the primary n8n trigger to manually execute this data extraction n8n workflow.
Request to Github Trend (HTTP Request): Fetches the raw HTML content from https://github.com/trending.
Extract Box (HTML): Uses CSS selector div.Box to isolate the primary container holding the trending repository list.
Extract all repositories (HTML): Configured to search within the box data property for all instances of article.Box-row, returning an array named repositories—one item for each trending repo.
Turn to a list (Split Out): Crucial flow control n8n node that splits the repositories array, allowing subsequent nodes to process each item individually.
Extract repository data (HTML): Extracts specific fields from the individual repository HTML block. Key configurations include selectors for a.Link (for the repository path) and p (for the description).


  • Set Result Variables (Set): A data manipulation n8n node that uses advanced expressions ({{ $json.repository.split('/')[0].trim() }}) to parse the raw combined repository string into separate author and title variables, standardize the output, and construct the final clean url.

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by

12 years in development, South Korea, Seoul

Featured*