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.
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.
| Node | Category | Type | Operation |
|---|---|---|---|
| Update workflow tags | Web / API | HTTP Request | PUT |
| GET all workflows | Integration | N8N | See node parameters |
| List callers of subworkflows | Code | Code | See node parameters |
| Exclude uncalled workflows | Routing | Filter | See node parameters |
| Exclude missing workflows | Routing | Filter | See node parameters |
| And every Sunday | Trigger | Schedule Trigger | See node parameters |
| When this workflow is activated | Trigger | N8N Trigger | See node parameters |
| GET workflow(s) | Integration | N8N | get |
| Count callers and identify new callers | Transform | Edit Fields | See node parameters |
| Loop through workflows | Routing | Loop Over Items | See node parameters |
| GET all tags | Web / API | HTTP Request | See node parameters |
| Remove existing tags from new_callers list | Transform | Edit Fields | See node parameters |
| If any new callers | Routing | If | See node parameters |
| Split out new callers as new tags | Transform | Split Out | See node parameters |
| Create new tags | Web / API | HTTP Request | POST |
| Return original pass through values | Code | Code | See node parameters |
| Merge | Transform | Merge | See node parameters |
| GET all tags again | Web / API | HTTP Request | See node parameters |
| Create tag id:name dictionary | Transform | Edit Fields | See node parameters |
| Retrieve tag ids and names from dictionary | Transform | Edit Fields | See node parameters |
| Return dependency graph data | Transform | Edit Fields | See node parameters |
| Combine dependency graph values into labels | Transform | Aggregate | See node parameters |
| Visualize subworkflow dependency graph | Integration | Quick Chart | See node parameters |
| SET instance_url | Transform | Edit Fields | See node parameters |
| When viewed in a browser | Trigger | Webhook | See node parameters |
| Format workflow relationship data for rendering | Code | Code | See node parameters |
| Visualize dependency graph with MermaidJS | Web / API | Respond To Webhook | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- 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:
- Set n8n API credentials
- Replace instance_url in workflow (highlighted in red)
Frequently used terms
- 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.
- 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.
- 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
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