Node Removal Impact Simulator for Reference Tables
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.Run the workflow manually; Manual Trigger emits an empty item.
- 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.The engine builds forward/reverse indexes from copies and records pre-existing dangling refs, invalid rows and unknown ids.
- 4.It collects references broken by the removal with path nodes[id].refs.
- 5.Reverse BFS from removed nodes (excluding them from expansion) separates direct from indirect dependents.
- 6.Root reachability before vs after yields newly unreachable and protected-lost nodes.
- 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
- Import the JSON and run Execute Workflow; expect verdict=breaking via Breaking Change Path.
- Verify broken_references lists A→B and C→B with paths nodes[A].refs and nodes[C].refs.
- Change removeIds to ['E'] and expect verdict=safe via Safe Change Path.
- Set removeIds=['Z'] and confirm it appears in unknown_remove_ids without failure.
- Add a row without id or a duplicate id and confirm it appears in invalid_rows.
- Extend the cycles and confirm execution still terminates.
Service Value
Ready-made workflow template for automation delivery and service execution.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (7)
Manual Trigger
Manual Trigger
Load Fictional Graph Sample
Code
Simulate Removal Impact
Code
Assemble Impact Report
Set
Route By Verdict
If
Breaking Change Path
No Op
Safe Change Path
No Op
Stage 1 Notes
Sticky Note
Stage 2 Notes
Sticky Note
Stage 3 Notes
Sticky Note
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