Hey, I’m using self-service n8n. Primarily I use n8n yo handle and process various workflows. My server went down, and it took me some time to add additional RAM, but some workflows got stuck. Currently, I have 4000 workflows that need to be re-executed. Is there a way to rerun them in bulk via UI or cli?
Hey @kidrulit,
It doesn’t look like the API or CLI has an option to rerun an execution that failed but you can use the CLI to run a workflow if you know the ID.
I am not sure if anyone else has any tricks for this one, @pemontto normally has some tricks up his sleeves.
You can try query the DB for the list of execution IDs, then hit the /rest/executions/<execution id>/retry
endpoint. I’d probably do that with an HTTP node with Batch Size
and Batch Interval
set to something reasonable based on the avg execution time of the workflow.
So the undocumented API the n8n interface uses requires your normal n8n auth and a JWT token (at least it did). So we first need to make a request to get that token. We then use that in our Retry node.
But I should clarify this is using internal APIs that have no guarantees or remaining stable, or even the same.
This was so helpful, Thank you. In my case, the authentication is not basic, just a regular POST with {“email”:“XXXX”, “password”:“XXXXXXX”}