Hourly Error Execution Recovery Engine - n8n Workflow

Automate stability with this essential n8n workflow. It runs hourly using the n8n trigger to find failed executions, handles internal API login, and automatically retries the runs, boosting reliability.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • n8n instance administrators or DevSecOps teams responsible for platform stability.

  • Users running mission-critical n8n templates where execution failure is unacceptable.

  • Developers seeking robust error handling solutions beyond simple retry mechanisms.

  • Anyone who needs a self-healing n8n workflow environment.

Overview

Maintaining high reliability in complex automation environments is challenging. When an n8n workflow fails due to a temporary external API outage, network glitch, or intermittent server load, manually finding and retrying hundreds of executions can be tedious and slow. This robust n8n workflow solves this critical problem by creating an automated, hourly error recovery engine.

This is one of the most practical n8n templates available, designed to monitor your entire n8n instance. It utilizes an n8n trigger (schedule) to wake up hourly, securely logs into the n8n platform via API to fetch all failed executions, filters out those already successfully recovered, and automatically triggers a retry action for the remaining ones. This significantly reduces downtime and manual intervention, ensuring your core business processes powered by n8n remain operational.

How it Works

This powerful n8n workflow executes through the following steps:


  1. Scheduled Activation: The workflow begins with a Schedule Trigger, acting as the primary n8n trigger, configured to run every hour.

  2. Credential Setup: A Set n8n node is used to centralize critical login parameters: the n8n instance URL, username, and password.

  3. API Login: An HTTP Request n8n node performs a POST request to the instance's login endpoint, authenticating the user. Crucially, it captures the session cookie necessary for future API calls.

  4. Querying Failed Executions: The specialized n8n node is utilized to query the execution resource. It applies a specific filter to retrieve only those executions where the status is 'error'.

  5. Error Filtering: An If n8n node checks each failed execution. If the execution item contains a retrySuccessId (meaning it was previously retried successfully), it is routed to the 'false' branch and ignored via a 'No Operation, do nothing' n8n node. Only truly failed, un-retried executions proceed.

  6. Batch Processing: A Split In Batches n8n node converts the list of qualifying failed items into manageable batches (default size 5), improving resource efficiency.

  7. Execution Retry: Finally, a second HTTP Request n8n node uses the session cookie obtained in Step 3 to send a POST request to the execution retry endpoint (/rest/executions/[ID]/retry). This action automatically restarts the failed n8n workflow, completing the recovery process.

Installation Guide

To deploy this essential recovery engine n8n workflow, follow these steps:


  1. Import the JSON: Copy the provided JSON code and import it directly into your n8n instance as a new workflow.

  2. Configure Credentials (Set Node): Locate the logindetails Set n8n node (ID: 5b8bf8c1-f505-42da-936d-637394e71b34). You must replace the placeholder values for username, password, and n8ninstance with your administrator credentials and your instance URL. This is critical for the Log into n8n node to function.

  3. Configure API Credentials (n8n Node): The dedicated n8n node (ID: 7867cbd1-bf14-488d-9bbf-11d4478f93f2) requires an n8n API credential. Ensure you set up an appropriate API key credential associated with an account that has permission to view and retry executions.

  4. Activation: Once configurations are complete, activate the n8n workflow. The Schedule Trigger will handle the automated hourly checks. Use the When clicking ‘Test workflow’ n8n trigger for immediate testing.

Node Details


  • Schedule Trigger: The primary n8n trigger. Configured to run every hour, initiating the automated check for failed executions.

  • Set (login_details): A fundamental n8n node used to securely hold and pass the instance URL, username, and password required for the subsequent HTTP API login. This simplifies credential management within the n8n workflow.

  • HTTP Request (Log into n8n): Executes the API login. Key configuration involves capturing the set-cookie header from the full response, which is crucial for authenticating the subsequent retry API call.

  • n8n Node (Query Executions): This specific n8n node is configured to retrieve 'execution' data. It uses the filter status: error and returnAll: true to fetch a comprehensive list of all failed executions waiting for recovery.

  • If: A core flow control n8n node. It checks if $json.retrySuccessId is present. If true (the execution was already retried), the process stops; otherwise, the execution proceeds to the retry steps.

  • Split In Batches (Loop Over Items): This efficiency-focused n8n node processes the failed executions in batches of 5, preventing overwhelming the API with too many concurrent retry requests.

  • HTTP Request (retry workflow automatically): The final action n8n node. It performs a POST request to the n8n retry API endpoint, leveraging the stored cookie for authentication. This node is configured to continueRegularOutput on error, ensuring the entire n8n workflow continues even if one specific retry attempt fails.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by

Automation consultant with expertise in streamlining diverse business processes using tools like n8n, Frappe, and Airtable. Passionate about creating efficient workflows and integrating advanced solutions for various industries, from lead generation and payment automation to customer support and beyond. Let’s connect to discuss how I can help optimize your systems. https://n8n.partnerlinks.io/kz2lkr3qyr0t E | [email protected]

Featured*