n8n

How to Automate n8n Error Recovery?

Keep your n8n jobs running without babysitting. The flow watches for failed runs on a schedule and retries them for you. It suits teams that manage many automations and want fast recovery when something breaks.

Every hour the Schedule Trigger starts the run. A Set node stores your n8n login and base URL. The HTTP Request signs in and captures a session cookie. The n8n node lists all executions with status set to error. A condition checks for runs already linked to a successful retry and skips those. Split in Batches handles items five at a time, and another HTTP Request calls the retry endpoint with loadWorkflow set to true. The loop continues until all items are processed. A Manual Trigger lets you test any time.

You need access to your n8n instance and a user that can view and retry executions. Add your username, password, and base URL, and create an n8n API credential for the executions list. Expect fewer alerts and faster cleanup, since failed jobs are retried within the hour. This helps with nightly data loads, webhook spikes, and queues that see brief errors. Turn it on after testing and watch the queue clear itself.

What are the key features?

  • Hourly schedule starts the health check and retry cycle
  • Manual trigger lets you test the flow on demand
  • Login to your n8n instance via API and store a session cookie
  • List all error executions using the n8n node with a status filter
  • Conditional step skips items that already have a successful retry
  • Batch control retries five executions at a time
  • Retry endpoint call rebuilds and reruns the failed execution
  • Loop continues until there are no more items to process
  • No operation node provides a clean path when nothing needs action

What are the benefits?

  • Reduce manual checks from 30 minutes a day to a few minutes
  • Cut recovery time for failed jobs by up to 80 percent
  • Handle five retries at a time without overloading your server
  • Skip runs already fixed to avoid duplicate work
  • Keep automations stable overnight with hourly checks

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. Confirm you have an n8n account with rights to view and retry executions. Make sure you can access the instance URL from where this workflow runs.
  3. Open the Set node named login_details and enter your username, password, and the base URL of your n8n instance. Include http or https. The expression will add the correct path for login.
  4. Open the HTTP Request node named Log into n8n and keep the response option set to full response so the session cookie is captured.
  5. In the n8n credentials manager, create a new n8n API credential. If you are unsure, double click the n8n node, then on the Credential to connect with dropdown click Create new credential and follow the on screen instructions to integrate that service.
  6. Open the n8n node and select your new credential. Make sure Resource is Execution, Return All is enabled, and the status filter is set to error.
  7. Check the If node and keep the condition that skips runs already linked to a successful retry. This prevents duplicate retries.
  8. Open Split in Batches and set the batch size. The template uses 5. Adjust this based on your server capacity.
  9. Open the HTTP Request node named retry workflow automatically and confirm the URL and Cookie header use the expressions from the login and set nodes. Keep loadWorkflow set to true.
  10. Open the Schedule Trigger and set it to run every hour. Save the workflow.
  11. Click Test workflow to run it manually. In the Execution log, verify the n8n node returns error executions and the retry calls succeed.
  12. If you see 401 or 403 errors, recheck your username and password, instance URL, and user permissions. If the URL is wrong, fix it in the Set node and test again.
  13. Activate the workflow so the schedule runs. Monitor the next few cycles to confirm failed runs are cleared within the hour.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.