Skip to content
NEWError doctor and Watchtower: failed n8n runs explained in plain words, and emailed to you. See what is new

Library / Code, Git & Developer Tools

Code, Git & Developer Tools

Map n8n Subworkflow Dependencies and Auto-Tag Workflows

Every Sunday or when activated, it reads all workflows through the n8n API, builds a subworkflow dependency graph with QuickChart and updates workflow tags.

What it does

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.

The steps

  1. Update workflow tags
  2. GET all workflows
  3. List callers of subworkflows
  4. Exclude uncalled workflows
  5. Exclude missing workflows
  6. And every Sunday
  7. When this workflow is activated
  8. GET workflow(s)
  9. Count callers and identify new callers
  10. Loop through workflows
  11. GET all tags
  12. Remove existing tags from new_callers list
  13. If any new callers
  14. Split out new callers as new tags

27 steps in total.

Similar automations