← All N8N workflows
Automation & utilitiesAggregateCodeFilterHTTP RequestIf

n8n Subworkflow Dependency Graph & Auto-Tagging

Configured with Aggregate, Filter, HTTP Request, N8N, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
Web / APIUpdate workflow tagsHTTP RequestIntegrationGET all workflowsN8NCodeList callers ofsubworkflowsCodeRoutingExclude uncalledworkflowsFilterRoutingExclude missingworkflowsFilterTriggerAnd every SundaySchedule TriggerTriggerWhen this workflow isactivatedN8N TriggerIntegrationGET workflow(s)N8NTransformCount callers andidentify new callersEdit FieldsRoutingLoop through workflowsLoop Over ItemsWeb / APIGET all tagsHTTP RequestTransformRemove existing tagsfrom new_callers listEdit FieldsRoutingIf any new callersIfTransformSplit out new callersas new tagsSplit OutWeb / APICreate new tagsHTTP RequestCodeReturn original passthrough valuesCodeTransformMergeMergeWeb / APIGET all tags againHTTP RequestTransformCreate tag id:namedictionaryEdit FieldsTransformRetrieve tag ids andnames from dictionaryEdit FieldsTransformReturn dependency graphdataEdit FieldsTransformCombine dependencygraph values into…AggregateIntegrationVisualize subworkflowdependency graphQuick ChartTransformSET instance_urlEdit FieldsTriggerWhen viewed in abrowserWebhookCodeFormat workflowrelationship data for…CodeWeb / APIVisualize dependencygraph with MermaidJSRespond To Webhook

Node categories in this workflow

  • Web / API
  • Integration
  • Code
  • Routing
  • Trigger
  • Transform

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Update workflow tagsWeb / APIHTTP RequestPUT
GET all workflowsIntegrationN8NSee node parameters
List callers of subworkflowsCodeCodeSee node parameters
Exclude uncalled workflowsRoutingFilterSee node parameters
Exclude missing workflowsRoutingFilterSee node parameters
And every SundayTriggerSchedule TriggerSee node parameters
When this workflow is activatedTriggerN8N TriggerSee node parameters
GET workflow(s)IntegrationN8Nget
Count callers and identify new callersTransformEdit FieldsSee node parameters
Loop through workflowsRoutingLoop Over ItemsSee node parameters
GET all tagsWeb / APIHTTP RequestSee node parameters
Remove existing tags from new_callers listTransformEdit FieldsSee node parameters
If any new callersRoutingIfSee node parameters
Split out new callers as new tagsTransformSplit OutSee node parameters
Create new tagsWeb / APIHTTP RequestPOST
Return original pass through valuesCodeCodeSee node parameters
MergeTransformMergeSee node parameters
GET all tags againWeb / APIHTTP RequestSee node parameters
Create tag id:name dictionaryTransformEdit FieldsSee node parameters
Retrieve tag ids and names from dictionaryTransformEdit FieldsSee node parameters
Return dependency graph dataTransformEdit FieldsSee node parameters
Combine dependency graph values into labelsTransformAggregateSee node parameters
Visualize subworkflow dependency graphIntegrationQuick ChartSee node parameters
SET instance_urlTransformEdit FieldsSee node parameters
When viewed in a browserTriggerWebhookSee node parameters
Format workflow relationship data for renderingCodeCodeSee node parameters
Visualize dependency graph with MermaidJSWeb / APIRespond To WebhookSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • n8nApi

Workflow notes

Sticky Note1

The script builds a dependency graph of workflows by identifying which workflows call others (via execution nodes) while preserving workflow names, caller relationships, and tags.

Sticky Note2

Here we filter out any workflows that are not sub-workflows (i.e. executed by other workflows).

Sticky Note3

We verify that the sub-workflows we intend to tag exist in our instance (not old workflow ids left over after importing a workflow from another instance)

Sticky Note4

If a tag is freshly created during an earlier iteration through the list of workflows, then it is removed from the list of new callers (i.e. new tags to create).

Pie Chart

Pie Chart

Basic visualization of which sub-workflows are called most often by other workflows

Setup instructions:

Setup instructions:

  1. Set n8n API credentials
  2. Replace instance_url in workflow (highlighted in red)

Frequently used terms

  1. Callers: Workflows that execute or trigger another workflow (a subworkflow) within n8n. They often use the Execute Workflow node to pass data and control execution flow.
  2. Sub-workflow: A sub-workflow is any workflow that is executed by another workflow. These are often used for reusable automation logic, breaking down complex workflows into modular components.
  3. Dependency Graph: A dependency graph visually represents the relationships between workflows in an n8n instance. It maps out which workflows call others, helping users understand execution dependencies, optimize workflow organization, and prevent unintended changes that may break subworkflows.
Dependency Graph

Dependency Graph

A visual representation of the relationships between the workflows in your n8n instance

About this workflow

About this workflow

This workflow analyzes an n8n instance to detect dependencies between workflows. It identifies which workflows call others (sub-workflows), builds a dependency graph, and automatically tags subworkflows with their calling workflows. This makes it easier to track dependencies, optimize workflow structures, and maintain documentation in complex n8n environments.

About the maker
n8n Subworkflow Dependency Graph & Auto-Tagging

n8n Subworkflow Dependency Graph & Auto-Tagging

Purpose and structure

This folder contains the n8n Subworkflow Dependency Graph & Auto-Tagging workflow. Its executable nodes use aggregate, code, filter, httpRequest, if, merge, n8n, n8nTrigger, quickChart, respondToWebhook, scheduleTrigger, set, splitInBatches, splitOut, webhook. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

And every Sunday, When this workflow is activated, When viewed in a browser

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Splitout/1591_Splitout_Code_Automate_Webhook.json MIT; preserve source notices.

Canvas section labels

These name areas of the original canvas; they do not include explanatory instructions.

  • n8n Subworkflow Dependency Graph & Auto-Tagging
  • Change instance URL
  • Generate chart
  • Generate dependency graph

More in Automation & utilities