{
  "name": "Automated proof-of-delivery with GPT-4 Vision & ERP/Invoice integration",
  "nodes": [
    {
      "id": "5997a7ad-e534-4c00-9678-44eac343faae",
      "name": "Webhook - POD Submission1",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -3408,
        2320
      ]
    },
    {
      "id": "1da6b444-4040-47a0-a1b6-0adfa87b5298",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3456,
        2064
      ],
      "parameters": {
        "width": 310,
        "height": 416,
        "content": "## 📦 POD Workflow Entry\nCapture Delivery Proof Instantly\n\n• What: Webhook grabs driver-submitted data (photos, signatures, GPS coords).\n• Why: No manual uploads—ensures 100% capture for audit-proof re"
      }
    },
    {
      "id": "7ee1f974-2743-4767-8849-1a739d8fd140",
      "name": "Validate Input Data1",
      "type": "n8n-nodes-base.if",
      "position": [
        -2976,
        2320
      ]
    },
    {
      "id": "a7aacd2e-416b-489f-86a6-232040a3fd8e",
      "name": "Return Error1",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -2720,
        2608
      ]
    },
    {
      "id": "26655e92-8458-4fe3-b875-02def9409ea7",
      "name": "AI Photo Verification1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2624,
        1792
      ]
    },
    {
      "id": "e25cf0a8-298a-4f73-9290-fb49cf1a029a",
      "name": "AI Signature Verification1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2608,
        2320
      ]
    },
    {
      "id": "6f10644e-315f-47b5-aecb-cbb5e778e5a8",
      "name": "Merge Analysis Results1",
      "type": "n8n-nodes-base.code",
      "position": [
        -2384,
        2224
      ]
    },
    {
      "id": "75ca1a66-3826-44c1-9430-74fa19ea35fe",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2112,
        1920
      ],
      "parameters": {
        "width": 176,
        "height": 460,
        "content": "✅ Verdict Gatekeeper\n\n• What: If score >80%, route to success; else, flag for dispute.\n• Why: Single decision point—avoids over-processing bad data, streamlining flow.\n• Branches to: ERP update (green"
      }
    },
    {
      "id": "7d659c6e-73ce-4dc8-b2fe-7029b21d2c04",
      "name": "Check Verification Status1",
      "type": "n8n-nodes-base.if",
      "position": [
        -2048,
        2224
      ]
    },
    {
      "id": "2f96245b-7c51-426b-930d-8677f2e36b5e",
      "name": "Update Delivery Status1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1840,
        2016
      ]
    },
    {
      "id": "388cb0af-8b05-4b56-9aee-2410474b3b1d",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        1648
      ],
      "parameters": {
        "width": 300,
        "height": 540,
        "content": "🔄 ERP Sync: Status Update\n\n• What: Pushes \"Delivered\" to ERP (e.g., SAP/NetSuite) with POD refs.\n• Why: Real-time inventory accuracy—triggers warehouse restock, cuts stockouts.\n• Flows from: Verified "
      }
    },
    {
      "id": "24d13fb3-87ad-47d5-b58a-f7387376ccd5",
      "name": "Trigger Invoice Generation1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1456,
        2016
      ]
    },
    {
      "id": "15454b74-f2cb-43d1-8866-6d495df7c11a",
      "name": "Create Dispute Ticket1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1824,
        2464
      ]
    },
    {
      "id": "210d794d-48a7-4aec-830b-a0eeedc9431c",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1888,
        2240
      ],
      "parameters": {
        "width": 272,
        "height": 384,
        "content": "⚠️ Dispute Launcher\n\n• What: If verification fails, creates support ticket with issue details (e.g., damage photo).\n• Why: Proactive escalation—resolves mismatches in <24h vs. manual weeks.\n• Flows to"
      }
    },
    {
      "id": "6d686a2e-57cb-494b-9401-c1c421bf4fca",
      "name": "Notify Dispute Team1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1424,
        2464
      ]
    },
    {
      "id": "f0cc7963-5833-49d3-a4cf-295a478981ed",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1504,
        2224
      ],
      "parameters": {
        "width": 220,
        "height": 412,
        "content": "🔔 Team Alert\n\n• What: Sends Slack/email with ticket link, priority flag, and evidence summary.\n• Why: Loops in support fast—high-priority routing ensures quick driver follow-up.\n• Flows from: Ticket c"
      }
    },
    {
      "id": "aae5eb3f-ad51-4ca9-8eda-0ba930fe4c7e",
      "name": "Success Response1",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -1184,
        2144
      ]
    },
    {
      "id": "165d79a1-17d5-4e44-8be0-a3115109373b",
      "name": "Dispute Response1",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -1168,
        2320
      ]
    },
    {
      "id": "c26c79ab-cef0-47bd-96e1-fb3069933094",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1248,
        1872
      ],
      "parameters": {
        "width": 220,
        "height": 652,
        "content": "📤 Echo Back Success\n\n• What: Returns JSON to caller (e.g., driver app) with status, ref ID, next steps.\n• Why: Closes the loop for users—confirms submission, reduces \"where's my POD?\" queries.\n• Inclu"
      }
    },
    {
      "id": "e646dfa2-f915-45a4-89e2-fada3cf651e2",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3504,
        1360
      ],
      "parameters": {
        "width": 672,
        "height": 624,
        "content": "## 🚀 Workflow Overview\n\nProof-of-Delivery Automation: End-to-End Logistics Magic\n\n• What: Ingests POD data (signatures, photos, GPS) → Verifies with AI → Updates ERP/invoices → Handles disputes.\n• Why"
      }
    },
    {
      "id": "007edb56-e515-45cd-a0c8-276a08637676",
      "name": "Sticky Note20",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        2064
      ],
      "parameters": {
        "width": 464,
        "height": 416,
        "content": "## ✅ Completion & Outputs\n\nSummary\n\nAfter execution, the workflow updates the ERP and billing systems, sends the response to the original webhook, and alerts the relevant team if disputes arise.\n\nResu"
      }
    },
    {
      "id": "79a29a0c-1579-46ca-b3f6-733e4f76f16f",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2688,
        2048
      ],
      "parameters": {
        "width": 220,
        "height": 380,
        "content": "✍️ Signature Auth Check\n\n• What: Analyzes handwriting for completeness and forgery patterns (e.g., via ML model).\n• Why: Ensures genuine customer sign-off—cuts dispute escalations by validating 95% au"
      }
    },
    {
      "id": "ff98e134-c444-4d99-bcd9-907db40404ff",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2688,
        1504
      ],
      "parameters": {
        "width": 208,
        "height": 412,
        "content": "👁️ AI Package Inspector\n\n• What: Runs computer vision on photos to detect damage, tampering, or label mismatches.\n• Why: Automates visual audits (humans miss 20%)—scales to 1000s of deliveries/day.\n• "
      }
    },
    {
      "id": "5c36ec9f-c0dd-4963-a7fe-b883f5d28855",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3088,
        2064
      ],
      "parameters": {
        "width": 310,
        "height": 416,
        "content": "⚙️ Basic Data Scrub\n\n• What: Checks for required fields (e.g., photo URL, GPS validity, signature blob).\n• Why: Blocks junk data early—prevents crashes downstream, saving 30% debug time.\n• Flows to: G"
      }
    },
    {
      "id": "ae4617b0-a828-4783-943a-895a9144a59f",
      "name": "Sticky Note21",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2400,
        1920
      ],
      "parameters": {
        "width": 176,
        "height": 460,
        "content": "🔗 Combine Insights\n\n• What: Fuses AI vision + sig scores into single verification verdict (pass/fail).\n• Why: Holistic view prevents siloed errors—one truth for routing decisions.\n• Flows to: Status c"
      }
    },
    {
      "id": "ab67c262-716f-4b50-86d0-f7ea21370806",
      "name": "Sticky Note22",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1568,
        1648
      ],
      "parameters": {
        "width": 300,
        "height": 540,
        "content": "💰 Invoice Kickoff\n\n• What: Generates customer invoice PDF from verified POD data.\n• Why: Auto-bills on proof—speeds cash flow, reduces DSO from weeks to days.\n• Flows to: Mark as billable; attaches ph"
      }
    }
  ],
  "connections": {
    "Notify Dispute Team1": {
      "main": [
        [
          {
            "node": "Dispute Response1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Input Data1": {
      "main": [
        [
          {
            "node": "AI Photo Verification1",
            "type": "main",
            "index": 0
          },
          {
            "node": "AI Signature Verification1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Return Error1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Photo Verification1": {
      "main": [
        [
          {
            "node": "Merge Analysis Results1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Dispute Ticket1": {
      "main": [
        [
          {
            "node": "Notify Dispute Team1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Analysis Results1": {
      "main": [
        [
          {
            "node": "Check Verification Status1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Delivery Status1": {
      "main": [
        [
          {
            "node": "Trigger Invoice Generation1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - POD Submission1": {
      "main": [
        [
          {
            "node": "Validate Input Data1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Signature Verification1": {
      "main": [
        [
          {
            "node": "Merge Analysis Results1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Verification Status1": {
      "main": [
        [
          {
            "node": "Update Delivery Status1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Dispute Ticket1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger Invoice Generation1": {
      "main": [
        [
          {
            "node": "Success Response1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}