n8n Subworkflow Dependency Graph & Auto-Tagging

Nodes

3b9f1b78-6b80-4575-aa6c-966987000389e6ae7503-2949-4cf6-8d11-9f146c34f7232e3e39e3-0e17-4fae-9ac5-9ee31f9711ed9b004a6c-ab49-4f1b-9b5a-f2c75e089d4d+8

Created by

LuLudwig

Last edited 39 days ago

How it Works

As n8n instances scale, teams often lose track of sub-workflows—who uses them, where they are referenced, and whether they can be safely updated. This leads to inefficiencies like unnecessary copies of workflows or reluctance to modify existing ones. This workflow solves that problem by:

  1. Fetching all workflows and identifying which ones execute others.
  2. Verifying that referenced subworkflows exist.
  3. Building a caller-subworkflow dependency graph for visibility.
  4. Automatically tagging sub-workflows based on their parent workflows.
  5. Providing a chart visualization to highlight the most-used sub-workflows.

Set Up Steps

Estimated time: ~10–15 minutes

  1. Set up n8n API credentials to allow access to workflows and tags.
  2. Replace instance_url with your n8n instance URL.
  3. Run the workflow to analyze dependencies and generate the graph.
  4. Review and validate assigned tags for sub-workflows.
  5. (Optional) Enable pie chart visualization to see the most-used sub-workflows.

This workflow is essential for enterprise teams managing large n8n instances, preventing workflow duplication, reducing uncertainty around dependencies, and allowing safe, informed updates to sub-workflows.

New to n8n?

Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!