AutomationFlowsMarketing & Ads › V1.1 Lead Intake - Error Handler

V1.1 Lead Intake - Error Handler

V1.1 Lead Intake - Error Handler. Uses errorTrigger, postgres. Event-driven trigger; 3 nodes.

Event trigger★★★★☆ complexity3 nodesError TriggerPostgres
Marketing & Ads Trigger: Event Nodes: 3 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": "V1.1 Lead Intake - Error Handler",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.errorTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "b6e2bf1a-9bb7-4e0a-b9cb-8ed5a3c2d7b1",
      "name": "V1.1 Error Trigger"
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const input = $json ?? {};\nconst workflow = input.workflow ?? {};\nconst execution = input.execution ?? {};\nconst error = input.error ?? {};\n\nreturn {\n  json: {\n    workflow_name: workflow.name ?? $workflow.name ?? null,\n    workflow_id: workflow.id ?? $workflow.id ?? null,\n    execution_id: execution.id ?? $execution.id ?? null,\n    node_name: error.node?.name ?? error.nodeName ?? null,\n    error_message: error.message ?? 'Unknown workflow error',\n    error_stack: error.stack ?? null,\n    payload: input\n  }\n};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        240,
        0
      ],
      "id": "7a36f27e-13a7-4f05-a0a2-b72dc4c2e9d4",
      "name": "Normalize Error"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "INSERT INTO workflow_error_logs (\n    workflow_name,\n    workflow_id,\n    execution_id,\n    node_name,\n    error_message,\n    error_stack,\n    payload\n)\nVALUES ($1, $2, $3, $4, $5, $6, $7::jsonb)\nRETURNING id, created_at;",
        "options": {
          "queryReplacement": "={{ [\n  $('Normalize Error').item.json.workflow_name,\n  $('Normalize Error').item.json.workflow_id,\n  $('Normalize Error').item.json.execution_id,\n  $('Normalize Error').item.json.node_name,\n  $('Normalize Error').item.json.error_message,\n  $('Normalize Error').item.json.error_stack,\n  JSON.stringify($('Normalize Error').item.json.payload ?? {})\n] }}"
        }
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        512,
        0
      ],
      "id": "d1f65e52-0ad7-4b55-8b0a-5d04f44c93e6",
      "name": "Log Workflow Error"
    }
  ],
  "connections": {
    "V1.1 Error Trigger": {
      "main": [
        [
          {
            "node": "Normalize Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Error": {
      "main": [
        [
          {
            "node": "Log Workflow Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": []
}
Pro

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

About this workflow

V1.1 Lead Intake - Error Handler. Uses errorTrigger, postgres. Event-driven trigger; 3 nodes.

Source: https://github.com/waliidtlm/real-estate-lead-intake-system/blob/main/workflows/v1.1/real-estate-lead-intake-v1.1-error-handler.json — original creator credit. Request a take-down →

More Marketing & Ads workflows → · Browse all categories →

Related workflows

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

Marketing & Ads

Workflow A — WhatsApp Lead Intake & Qualification. Uses postgres, httpRequest, errorTrigger. Scheduled trigger; 67 nodes.

Postgres, HTTP Request, Error Trigger
Marketing & Ads

Run professional email campaigns with A/B testing, Google Sheets tracking, and Slack analytics. FEATURES:

Google Sheets, Slack, Gmail +1
Marketing & Ads

AI LeadOps Error Handler. Uses errorTrigger, googleSheets, slack. Event-driven trigger; 4 nodes.

Error Trigger, Google Sheets, Slack
Marketing & Ads

LeadFlow AI — 05 Global Error Handler. Uses errorTrigger, httpRequest. Event-driven trigger; 3 nodes.

Error Trigger, HTTP Request
Marketing & Ads

Telegram Lead Intake — Error Monitor. Uses errorTrigger, googleSheets, telegram. Event-driven trigger; 4 nodes.

Error Trigger, Google Sheets, Telegram