Skip to content
Data & Databases

Node Removal Impact Simulator for Reference Tables

7 nodes 3 0 Manual trigger
Download

Loading workflow…

Workflow Description

A fully local manually triggered flow: a Code node emits a fictional node/reference table with a proposed removal list, then an engine Code node simulates the deletion in memory only, never mutating the source. It lists references that would dangle with their path, separates direct dependents (reverse depth 1) from indirect ones (deeper), compares root reachability before and after, and uses visited sets so cycles terminate. Set adds counters and If routes to a breaking or safe path.

How it works

  1. 1.Run the workflow manually; Manual Trigger emits an empty item.
  2. 2.A Code node emits the fictional table: nodes A–H with cycles, roots [A,D,E], protected [C], removeIds=[B], policy.unreachableIsError=true.
  3. 3.The engine builds forward/reverse indexes from copies and records pre-existing dangling refs, invalid rows and unknown ids.
  4. 4.It collects references broken by the removal with path nodes[id].refs.
  5. 5.Reverse BFS from removed nodes (excluding them from expansion) separates direct from indirect dependents.
  6. 6.Root reachability before vs after yields newly unreachable and protected-lost nodes.
  7. 7.Set adds counters with includeOtherFields; If routes to Breaking or Safe.

Use cases

  • Assessing removal of a module from a dependency graph before executing it
  • Reviewing a proposed id cleanup in an interlinked reference table
  • Approving or rejecting a change without touching the production table

Requirements

  • No credentials: the flow is fully local and makes no external calls
  • Replace the sample item in the first Code node with your table: graph.nodes[].id and refs, graph.roots, graph.protected, removeIds, policy.unreachableIsError

Setup and testing in n8n

  1. Import the JSON and run Execute Workflow; expect verdict=breaking via Breaking Change Path.
  2. Verify broken_references lists A→B and C→B with paths nodes[A].refs and nodes[C].refs.
  3. Change removeIds to ['E'] and expect verdict=safe via Safe Change Path.
  4. Set removeIds=['Z'] and confirm it appears in unknown_remove_ids without failure.
  5. Add a row without id or a duplicate id and confirm it appears in invalid_rows.
  6. Extend the cycles and confirm execution still terminates.

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

Manual Trigger Code Set If No Op

Details

Trigger Manual trigger
Nodes 7
Apps 5
Views 3
Downloads 0

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (7)

Manual Trigger

Manual Trigger

#1

Load Fictional Graph Sample

Code

#2

Simulate Removal Impact

Code

#3

Assemble Impact Report

Set

#4

Route By Verdict

If

#5

Breaking Change Path

No Op

#6

Safe Change Path

No Op

#7

Stage 1 Notes

Sticky Note

#8

Stage 2 Notes

Sticky Note

#9

Stage 3 Notes

Sticky Note

#10
Stay in the loop

Fresh workflows, straight to your inbox

Get newly published DROPIDEA workflows, a clear overview of what they do, and a link to explore them.

  • New workflows
  • Clear overviews
  • Setup guides

Be first to discover what is new

Your name, your email, and one confirmation.

Email confirmation · Unsubscribe anytime