Blog

Lead Routing Stops in n8n: Audit and Secure Your Workflows in 5 Steps (Checklist + Template)

By ·30 Nov 2026 ·6 min ·Theme: No-code
Contents
    Lead Routing Stops in n8n: Audit and Secure Your Workflows in 5 Steps (Checklist + Template)

    Your lead routing workflow stopped without warning, and leads are piling up in the queue. Here’s how to audit concurrency, errors, monitoring, and security in 5 steps, with a checklist and an n8n template to track your critical workflows in real time.

    1. Check Concurrency Limits and Their Impact on Executions

    n8n limits the number of concurrent executions based on your plan (Cloud) or configuration (self-hosted). When this limit is reached, new executions are queued (FIFO) and only resume once capacity is freed (F1). Problem: Queued executions cannot be manually retried, and canceling them removes them permanently (F3).

    Diagram illustrating the execution management flow in n8n, including concurrency limits and the queue.
    Execution management flow in n8n: concurrency and queue.

    Key Checks

    • Verify your concurrency limit: In n8n Cloud, check the Executions tab of your project to see the number of active executions and your plan’s limit. In self-hosted mode, this limit is set via the N8N_CONCURRENCY_PRODUCTION_LIMIT environment variable (F5).
    • Identify queued executions: Blocked executions appear with the status Queued in the Executions tab. Note that this queue is only visible for production executions (triggered by webhook or trigger node), not manual executions or sub-workflows (F2).
    • Monitor logs: n8n logs indicate when an execution is added to or removed from the queue. In self-hosted mode, enable logs to track these events (F6).

    Real-World Example

    During a migration project, we observed an Airtable synchronization workflow stuck after a massive import: the lastRun was never saved due to 429 errors (Airtable rate limits), re-reading up to 20,000 products per minute. Three other workflows using LAST_MODIFIED_TIME() globally saturated Airtable in cascade. The fix involved:

    • Limiting the lookback to 5 minutes.
    • Saving the lastRun at the start of execution.
    • Configuring a retry for 429 errors.
    • Restricting formulas to relevant fields.

    Result: Zero n8n errors since, with stability verified for over 15 hours (E1).

    2. Configure Concurrency Limits to Avoid Blockages

    If you’re using n8n in self-hosted mode, concurrency is not limited by default, which can degrade performance (F5). Here’s how to configure and monitor these limits.

    Configuration Steps

    1. Set a concurrency limit: Add the N8N_CONCURRENCY_PRODUCTION_LIMIT environment variable to your configuration. Example:
      export N8N_CONCURRENCY_PRODUCTION_LIMIT=20
    2. Restart your instance: Queued executions resume up to the concurrency limit, while others remain queued (F4).
    3. Monitor logs: Ensure executions are correctly added to and removed from the queue.

    Best Practices

    • Choose a limit suited to your infrastructure: Too high a value can overload your instance, while too low a value can block workflows.
    • Test the configuration in a staging environment before deploying to production.
    • Document the chosen limit and the reasoning behind it for future audits.

    3. Set Up Error Workflows

    An error workflow captures execution failures and sends alerts (email, Slack) before issues become critical (F7). Here’s how to configure it.

    Diagram illustrating the steps to configure an error workflow in n8n.
    Configuring an error workflow in n8n: key steps.

    Configuration Steps

    1. Create an error workflow:
      • Add an Error Trigger node as the first node in the workflow.
      • Configure actions to trigger on error (e.g., send an email or Slack message).
      • Name the workflow clearly (e.g., Error Handler - Lead Routing).
    2. Link the error workflow to your main workflow:
      • In the main workflow, go to Options > Settings.
      • Select the error workflow in the Error workflow field.
      • Save the changes.
    3. Test the error workflow: Use the Stop And Error node to force a failure and verify the error workflow triggers correctly (F9).

    Data Sent to the Error Workflow

    The error workflow receives information about the failed execution, including:

    • execution.id: Execution ID (if saved in the database).
    • execution.url: Execution URL (if saved in the database).
    • lastNodeExecuted: Last node executed before failure.
    • errorMessage: Error message.

    Note: If the error originates from the trigger node of the main workflow, some data (like execution.id) may be missing (F8).

    4. Monitor Your Instance with Health Endpoints

    n8n provides three endpoints to monitor your instance’s status:

    • /healthz: Checks instance availability (returns HTTP 200 if reachable) (F10).
    • /healthz/readiness: Checks database connection and migrations (returns 200 if the instance is ready to receive traffic).
    • /metrics: Provides detailed metrics about the instance’s status (disabled by default, must be enabled via configuration) (F10).

    How to Use These Endpoints

    1. Enable the endpoints: For /metrics, configure your instance with the appropriate environment variables. For instances in queue mode, also enable /healthz on workers.
    2. Integrate them into your monitoring tool: Use tools like Prometheus, Grafana, or Datadog to monitor these endpoints and trigger alerts if issues arise.
    3. Configure alerts: For example, send an alert if /healthz/readiness returns a non-200 status for more than 5 minutes.

    Real-World Example

    A development n8n environment returned 503 errors after 14 days of inactivity: the host had automatically paused it. Internal crons didn’t count as activity, and Airtable polling stopped working, even after a manual restart. The solution involved setting up an external health check to keep the instance active (E3).

    5. Run a Security Audit to Identify Risks

    A security audit helps identify risks in your workflows, such as unused credentials, risky nodes, or unprotected webhooks (F11). Here’s how to run it and interpret the results.

    Diagram illustrating the sections of a security audit report in n8n and corrective actions.
    Security audit report in n8n: sections and corrective actions.

    How to Run an Audit

    1. Via CLI: Run the command n8n audit.
    2. Via API: Make a POST request to the /audit endpoint (authentication required as instance owner).
    3. Via an n8n node: Add an n8n node to your workflow, select Resource > Audit and Operation > Generate.

    Interpreting the Audit Report

    The audit report includes five sections:

    • Credentials: Identifies unused or obsolete credentials.
    • Database: Flags risky SQL queries (e.g., expressions in Execute Query fields).
    • File system: Lists nodes interacting with the file system.
    • Nodes: Identifies official or community nodes considered risky (e.g., nodes allowing arbitrary code execution).
    • Instance: Flags unprotected webhooks, missing security settings, or an outdated n8n version (F12).

    Corrective Actions

    • Remove unused or obsolete credentials.
    • Review and secure risky SQL queries.
    • Limit the use of nodes interacting with the file system.
    • Protect exposed webhooks and update n8n if necessary.

    n8n Template to Monitor Critical Workflows

    Here’s an n8n template to monitor the status of your workflows and queue size in real time. This workflow:

    • Checks the status of critical workflows (e.g., lead routing) via the n8n API.
    • Monitors queue size and sends an alert if a threshold is exceeded.
    • Sends notifications (email/Slack) if issues arise.

    Template Steps

    1. Fetch active executions: Use the HTTP Request node to call the n8n API and retrieve current executions.
    2. Filter queued executions: Use an IF node to identify executions with the status Queued.
    3. Send an alert: If the number of queued executions exceeds a threshold (e.g., 10), send an alert via email or Slack.
    4. Schedule execution: Configure a Schedule Trigger node to run this workflow every 5 minutes.

    How to Import the Template

    1. Download the template from our dedicated article.
    2. Import it into n8n via Import from File.
    3. Adjust thresholds and alert channels to fit your environment.

    Recap Checklist

    Use this checklist to audit and secure your n8n workflows:

    Step Action Verification
    1. Concurrency Check your plan’s or configuration’s concurrency limit. Limit suited to your infrastructure and documented.
    Identify queued executions. No execution blocked for more than 10 minutes.
    2. Error Handling Configure an error workflow for critical workflows. Error workflow tested and functional.
    Test the error workflow with a forced failure. Alert received (email/Slack) within 2 minutes.
    3. Monitoring Enable and monitor the /healthz and /metrics endpoints. Alerts configured for non-200 HTTP status codes.
    Integrate these endpoints into your monitoring tool. Monitoring tool operational and tested.
    4. Security Audit Run a security audit via CLI, API, or n8n node. Audit report generated and analyzed.
    Fix identified risks (credentials, SQL queries, webhooks). No unresolved critical risks.
    5. Monitoring Template Import and configure the provided n8n template. Template tested and functional, thresholds adjusted.

    Article prepared with AI assistance and checked against the sources consulted.

    n8n lead routing automation workflow concurrency error handling monitoring security audit
    Read next
    A similar project to scope? Let's talk. Get in touch with Keerok →
    © 2026 Keerok · All rights reserved Cran · Keerok's media