{
  "openruna_format": "flow-graph-v1",
  "title": "n8n Subworkflow Dependency Graph & Auto-Tagging",
  "slug": "n8n-subworkflow-dependency-graph-auto-tagging",
  "source_filename": "1591_Splitout_Code_Automate_Webhook.json",
  "nodes": [
    {
      "id": "Update workflow tags",
      "name": "Update workflow tags",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "GET all workflows",
      "name": "GET all workflows",
      "integration": "n8n",
      "kind": "action"
    },
    {
      "id": "List callers of subworkflows",
      "name": "List callers of subworkflows",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Exclude uncalled workflows",
      "name": "Exclude uncalled workflows",
      "integration": "filter",
      "kind": "logic"
    },
    {
      "id": "Exclude missing workflows",
      "name": "Exclude missing workflows",
      "integration": "filter",
      "kind": "logic"
    },
    {
      "id": "And every Sunday",
      "name": "And every Sunday",
      "integration": "schedule",
      "kind": "trigger"
    },
    {
      "id": "When this workflow is activated",
      "name": "When this workflow is activated",
      "integration": "n8n",
      "kind": "trigger"
    },
    {
      "id": "GET workflow(s)",
      "name": "GET workflow(s)",
      "integration": "n8n",
      "kind": "action"
    },
    {
      "id": "Count callers and identify new callers",
      "name": "Count callers and identify new callers",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Loop through workflows",
      "name": "Loop through workflows",
      "integration": "splitInBatches",
      "kind": "logic"
    },
    {
      "id": "GET all tags",
      "name": "GET all tags",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "Remove existing tags from new_callers list",
      "name": "Remove existing tags from new_callers list",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "If any new callers",
      "name": "If any new callers",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "Split out new callers as new tags",
      "name": "Split out new callers as new tags",
      "integration": "splitOut",
      "kind": "logic"
    },
    {
      "id": "Create new tags",
      "name": "Create new tags",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "Return original pass through values",
      "name": "Return original pass through values",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Merge",
      "name": "Merge",
      "integration": "merge",
      "kind": "logic"
    },
    {
      "id": "GET all tags again",
      "name": "GET all tags again",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "Create tag id:name dictionary",
      "name": "Create tag id:name dictionary",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Retrieve tag ids and names from dictionary",
      "name": "Retrieve tag ids and names from dictionary",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Return dependency graph data",
      "name": "Return dependency graph data",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Combine dependency graph values into labels",
      "name": "Combine dependency graph values into labels",
      "integration": "aggregate",
      "kind": "logic"
    },
    {
      "id": "Visualize subworkflow dependency graph",
      "name": "Visualize subworkflow dependency graph",
      "integration": "quickChart",
      "kind": "action"
    },
    {
      "id": "SET instance_url",
      "name": "SET instance_url",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "When viewed in a browser",
      "name": "When viewed in a browser",
      "integration": "webhook",
      "kind": "trigger"
    },
    {
      "id": "Format workflow relationship data for rendering",
      "name": "Format workflow relationship data for rendering",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Visualize dependency graph with MermaidJS",
      "name": "Visualize dependency graph with MermaidJS",
      "integration": "respondToWebhook",
      "kind": "action"
    }
  ],
  "edges": [
    {
      "from": "Merge",
      "to": "GET all tags again"
    },
    {
      "from": "GET all tags",
      "to": "Remove existing tags from new_callers list"
    },
    {
      "from": "Create new tags",
      "to": "Return original pass through values"
    },
    {
      "from": "GET workflow(s)",
      "to": "Exclude missing workflows"
    },
    {
      "from": "And every Sunday",
      "to": "GET all workflows"
    },
    {
      "from": "SET instance_url",
      "to": "GET all tags"
    },
    {
      "from": "GET all workflows",
      "to": "List callers of subworkflows"
    },
    {
      "from": "GET all tags again",
      "to": "Create tag id:name dictionary"
    },
    {
      "from": "If any new callers",
      "to": "Split out new callers as new tags"
    },
    {
      "from": "If any new callers",
      "to": "Merge"
    },
    {
      "from": "Update workflow tags",
      "to": "Return dependency graph data"
    },
    {
      "from": "Loop through workflows",
      "to": "Combine dependency graph values into labels"
    },
    {
      "from": "Loop through workflows",
      "to": "Format workflow relationship data for rendering"
    },
    {
      "from": "Loop through workflows",
      "to": "SET instance_url"
    },
    {
      "from": "When viewed in a browser",
      "to": "GET all workflows"
    },
    {
      "from": "Exclude missing workflows",
      "to": "Count callers and identify new callers"
    },
    {
      "from": "Exclude uncalled workflows",
      "to": "GET workflow(s)"
    },
    {
      "from": "List callers of subworkflows",
      "to": "Exclude uncalled workflows"
    },
    {
      "from": "Return dependency graph data",
      "to": "Loop through workflows"
    },
    {
      "from": "Create tag id:name dictionary",
      "to": "Retrieve tag ids and names from dictionary"
    },
    {
      "from": "When this workflow is activated",
      "to": "GET all workflows"
    },
    {
      "from": "Split out new callers as new tags",
      "to": "Create new tags"
    },
    {
      "from": "Return original pass through values",
      "to": "Merge"
    },
    {
      "from": "Count callers and identify new callers",
      "to": "Loop through workflows"
    },
    {
      "from": "Remove existing tags from new_callers list",
      "to": "If any new callers"
    },
    {
      "from": "Retrieve tag ids and names from dictionary",
      "to": "Update workflow tags"
    },
    {
      "from": "Combine dependency graph values into labels",
      "to": "Visualize subworkflow dependency graph"
    },
    {
      "from": "Format workflow relationship data for rendering",
      "to": "Visualize dependency graph with MermaidJS"
    }
  ]
}