AI Agent for Community Leaderboard Analytics - n8n Workflow

Analyze n8n community contributor statistics using an advanced n8n workflow and an AI agent. This powerful n8n template fetches leaderboard data from GitHub, filters it by username, and generates a comprehensive Markdown report detailing popular n8n templates and creator impact.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • n8n Community Managers seeking to analyze contributor impact.

  • Workflow Creators who want detailed statistics on their published n8n workflow templates.

  • Technical Content Writers needing structured data on popular n8n templates and adoption rates.

  • Users looking to implement advanced AI Agents within their n8n environment.

Overview

Understanding the impact of community contributions can be challenging when dealing with raw data. This robust n8n workflow solves this by acting as an intelligent AI agent, automating the complex process of data retrieval, processing, and analysis. It targets public GitHub repositories containing aggregated statistics about n8n creators and their workflows. By using a self-referencing n8n node as a tool, the agent can dynamically fetch and process relevant data based on a user-provided username. The final output is not just data, but a structured, comprehensive Markdown report detailing key metrics like weekly visitors and monthly inserters for specific n8n workflow items, providing immediate, actionable insights.

How it Works

This n8n workflow operates using two primary paths: the AI Agent initiation path (via chat) and the data processing path (via sub-workflow execution).


  1. Trigger and Initialization: The workflow is typically initiated either by a When chat message received n8n trigger (if used in a chat interface) or by the When Executed by Another Workflow n8n trigger (if called by an AI Agent).

  2. Global Variable Setup: The initial step sets global variables, including the GitHub repository path and the target username for analysis.

  3. Data Retrieval (Sub-workflow): Two parallel HTTP Request n8n node steps retrieve aggregated statistics: one for all creators (statsaggregatecreators) and one for all workflows (statsaggregateworkflows) from the specified GitHub JSON endpoints.

  4. Processing and Sorting: The retrieved JSON arrays are parsed, split, and sorted. Creator data is sorted by top weekly inserters and limited to the top 25; workflow data is sorted and limited to the top 300. The workflow uses Sort and Limit n8n node settings to prioritize the most relevant data.

  5. Data Merging: The sorted creator and workflow datasets are combined using a Merge n8n node, matching records based on the username.

  6. Filtering: The combined dataset is filtered by the original username parameter provided to the initial n8n trigger, isolating all statistics belonging to the target n8n creator.

  7. AI Agent Analysis: The core logic resides in the AI Agent flow. The n8n Creator Stats Agent node receives the initial chat query, utilizes the Window Buffer Memory for context, and accesses the Workflow Tool (which calls the data processing path described above).

  8. Report Generation: The AI agent (using the gpt-4o-mini LLM) executes an extensive system prompt, instructing it to transform the processed statistical data into a detailed, structured Markdown report, complete with analysis of popularity and contribution significance.

  9. Output: The final Markdown report is converted to a binary file and saved locally with a timestamped filename, completing the n8n automation cycle.

Installation Guide

To install and use this powerful n8n workflow template, follow these steps:


  1. Import the JSON: Copy the provided n8n workflow JSON and import it directly into your n8n instance.

  2. OpenAI Credentials: Ensure your OpenAI API key is configured and selected in the gpt-4o-mini n8n node.

  3. Agent Configuration: Verify that the Workflow Tool n8n node is correctly configured. It must reference the ID of the current n8n workflow itself, allowing the agent to self-call the data retrieval logic. The description and JSON schema must match the expected input (username).

  4. Global Variables: Check the Global Variables n8n node. The path variable should point to the correct GitHub repository containing the leaderboard JSON files.

  5. Local Saving (Optional): If you are running n8n locally and wish to save the final Markdown report, ensure the file path in the Save creator-summary.md n8n node (C:\Users\joe\Downloads\...) is accessible to your n8n host environment.

  6. Activate: Activate the n8n workflow. You can test it by manually executing the When Executed by Another Workflow n8n trigger with a test username, or by using the Langchain Chat interface with a query like show me stats for username [desired_username].

Node Details

The logic of this specialized n8n workflow relies on several advanced nodes:

When Executed by Another Workflow (n8n Trigger): This n8n trigger node facilitates the internal tool call by the AI agent, accepting the necessary username input parameter.
n8n Creator Stats Agent (Langchain Agent n8n node): The orchestrator. It determines whether to use the defined tools to answer a user's question, driven by a highly detailed system message prompt to generate a specific Markdown report structure.
gpt-4o-mini (Langchain LLM n8n node): The large language model used by the Agent. It processes the raw data returned by the tool and generates the final, formatted analysis of the n8n creator's impact.
Workflow Tool (Langchain Tool n8n node): Crucial for the self-referencing tool capability. It registers the data processing section of this n8n workflow as a callable function (n8ncreatorstats) for the AI Agent.
HTTP Request (n8n node): Used twice (statsaggregatecreators and statsaggregateworkflows) to fetch the necessary leaderboard data from external GitHub JSON sources, forming the foundation of the n8n workflow's analysis.
Sort & Limit (n8n node): Nodes like Sort By Top Weekly Creator Inserts and Take Top 25 Creators streamline data volume, ensuring the AI agent analyzes only the most popular and relevant n8n templates and contributors.
Merge Creators & Workflows (n8n node): Combines the disparate creator and workflow data streams into a single comprehensive dataset, matching based on the username field.
Filter By Creator Username (n8n node): Focuses the large aggregated dataset down to a single creator, using the input variable set by the initial n8n trigger.


  • Save creator-summary.md (n8n node): Handles the final output, saving the AI-generated Markdown report locally for long-term storage or review.

Related n8n Workflows

Free

Nodes: 18 Nodes
Updated: December 26 2025
View all
Created by
Joseph LePage
Joseph LePage

As an AI Automation consultant based in Canada, I partner with forward-thinking organizations to implement AI solutions that streamline operations and drive growth.

Featured*