One minute
n8n Workflow Spring Clean
I spend a lot of time each week making workflows for my own needs and those of the community, Often what happens is I create a new workflow build out what is being asked for or paste in the workflow that has an issue and press save. This means I end up with a lot of workflows with names like My Workflow 123
, I was at over 300 workflows and I decided it was time for a bit of a spring clean.
Luckily rather than manually going through these one by one we can use the API or the n8n node to get a list of all of the workflows and we can come up with some rules to define what we want to delete, In this example I am using the Node Count, Workflow Name and if the workflow is active.
To use the workflow below update the Set node labelled as Config
and set your minimum amount of nodes, Workflow title and if active workflows should be ignored. I would recommend running this with the Delete Workflows
node disabled first just so you can see what it would delete, If you are happy enable the node then update the schedule and activate it.