AutomationFlowsGeneral › Bulletproof DLQ Routing for Webhooks

Bulletproof DLQ Routing for Webhooks

Original n8n title: Dlq Routing Workflow (plan B - Bulletproof)

DLQ Routing Workflow (Plan B - Bulletproof). Webhook trigger; 5 nodes.

Webhook trigger★★★★☆ complexity5 nodes
General Trigger: Webhook Nodes: 5 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "DLQ Routing Workflow (Plan B - Bulletproof)",
  "nodes": [
    {
      "parameters": {
        "path": "dlq-webhook",
        "httpMethod": "POST",
        "responseMode": "lastNode"
      },
      "id": "webhook-node",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        100,
        300
      ]
    },
    {
      "parameters": {
        "jsCode": "for (const item of $input.all()) {\n  const data = item.json;\n\n  // 1. Tag the items as 'true' or 'false'\n  if (data.user_id && data.error_flag !== true) {\n    item.json.is_valid = true;\n  } else {\n    item.json.is_valid = false;\n    \n    // 2. Add DLQ metadata\n    item.json._dlq_reason = 'Invalid Data Entry: Missing ID or error flagged';\n    item.json._quarantined_at = new Date().toISOString();\n  }\n}\n\n// 3. Return everything through ONE branch\nreturn $input.all();"
      },
      "id": "code-node",
      "name": "Processor Code",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        300,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{ $json.is_valid }}",
              "value2": true
            }
          ]
        }
      },
      "id": "if-node",
      "name": "Verify Logic",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        500,
        300
      ]
    },
    {
      "parameters": {},
      "id": "success-node",
      "name": "Success Database",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        750,
        200
      ]
    },
    {
      "parameters": {},
      "id": "quarantine-node",
      "name": "Quarantine Database",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        750,
        400
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Processor Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Processor Code": {
      "main": [
        [
          {
            "node": "Verify Logic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verify Logic": {
      "main": [
        [
          {
            "node": "Success Database",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Quarantine Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

DLQ Routing Workflow (Plan B - Bulletproof). Webhook trigger; 5 nodes.

Source: https://github.com/Dev-Anandhan/CRM-TOOL/blob/5925373cd9c2754413af18440267f8392c5a4209/n8n/dlq-workflow.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

A production-ready authentication workflow implementing secure user registration, login, token verification, and refresh token mechanisms. Perfect for adding authentication to any application without

Crypto, Data Table, Execute Workflow Trigger
General

Portfolio Orchestrator. Uses httpRequest. Webhook trigger; 59 nodes.

HTTP Request
General

This n8n template demonstrates how a simple Multi-Layer Perceptron (MLP) neural network can predict housing prices. The prediction is based on four key features, processed through a three-layer model.

General

github code Try yourself

Google Calendar
General

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

N8N Nodes 1Shot