Workflow stats

This workflow automatically collects and summarizes detailed statistical data from all workflows, generating a structured JSON format, which is then rendered into an interactive HTML dashboard using an XML template. Users can intuitively view the total number of workflows, their activation status, trigger counts, and the usage of various nodes, tags, and Webhooks, thereby enhancing management efficiency and avoiding resource waste. It also supports custom data presentation in BI tools, facilitating team collaboration and optimizing the design of automated processes.

Workflow Diagram
Workflow stats Workflow diagram

Workflow Name

Workflow stats

Key Features and Highlights

This workflow is designed to automatically collect and aggregate detailed statistics of all workflows within an n8n instance, generating structured JSON data that is rendered into an interactive HTML dashboard via an XML template. It not only displays the total number of workflows, their activation status, and trigger counts, but also provides granular statistics on individual nodes, tags, and webhook endpoints, along with their associated workflow lists. The workflow incorporates advanced JavaScript techniques (such as JMESPath queries, array deduplication, and date format conversion) and XSLT templating, enabling customizable data presentation within BI tools.

Core Problems Addressed

n8n users often manage a large number of workflows and find it challenging to quickly identify which workflows are active, the usage frequency of various nodes, the distribution of tags, and the mapping of webhook endpoints. This workflow centralizes data collection and intelligently organizes the information, helping users gain comprehensive insight into the overall operational status and resource allocation of their n8n instance. This improves management efficiency and prevents redundant development and resource waste.

Use Cases

  • Monitoring and managing a large volume of workflows by n8n administrators or developers
  • Generating workflow documentation and usage analysis reports
  • Sharing workflow structures and activity information within teams
  • Visualizing workflow data through BI tools or web dashboards
  • Optimizing and adjusting automation process designs to enhance the value of automation assets

Main Process Steps

  1. Data collection is initiated via a trigger node (manual trigger or webhook trigger).
  2. The n8n API is called to retrieve detailed information on all workflows in the current instance.
  3. JMESPath queries and JavaScript code nodes extract and process data such as node types, tags, and webhook paths for each workflow.
  4. Statistics, sorting, and aggregation are performed separately on workflows, nodes, tags, and webhook information.
  5. All summarized data is consolidated into a unified JSON format statistical report.
  6. The JSON data is converted into XML format and combined with an XSLT template to render a visually appealing HTML dashboard page.
  7. The generated dashboard page is returned to the requester via webhook response, enabling online viewing.

Involved Systems or Services

  • n8n native API (for retrieving workflow data)
  • n8n node library (Manual Trigger, HTTP Webhook, Code, Set, Sort, Aggregate, XML Transformation, HTML Rendering, Respond to Webhook, etc.)
  • JavaScript (including JMESPath querying and Luxon date handling library)
  • XSLT templates (for HTML dashboard generation)
  • Bootstrap 5.3 (front-end styling framework, loaded via CDN)

Target Users and Value

  • n8n platform administrators and automation engineers: Quickly grasp and manage the full scope of workflows to improve operational efficiency.
  • DevOps teams: Monitor automation process usage to support decision-making and optimization.
  • Technical documentation authors: Use the automatically generated dashboard to assist in creating workflow documentation.
  • Enterprise digital transformation teams: Gain comprehensive understanding of automation asset distribution to facilitate process improvement and resource integration.
  • n8n community users: Learn advanced n8n techniques and template development to enhance automation design capabilities.