{
  "name": "Auto-extract & approve invoices with OpenAI, Jotform - fraud detection",
  "nodes": [
    {
      "id": "2855123e-800d-426d-9adc-35b4fcbbbd65",
      "name": "Has Invoice Attachment?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1264,
        256
      ]
    },
    {
      "id": "6177f958-e010-426b-8d7a-1d9f2966eaed",
      "name": "Extract Invoice Attachments",
      "type": "n8n-nodes-base.code",
      "position": [
        -736,
        192
      ]
    },
    {
      "id": "49036c5c-fdc0-47d0-8885-63dcd931f2e2",
      "name": "AI Invoice OCR & Extraction",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -576,
        192
      ]
    },
    {
      "id": "e82f7d85-e1d2-408b-a3ce-b5e12993763d",
      "name": "Parse Invoice Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -288,
        192
      ]
    },
    {
      "id": "2aedc6f8-75f4-4ae3-a562-39f270728a28",
      "name": "AI Fraud Detection Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        16,
        144
      ]
    },
    {
      "id": "d79e193d-8f8e-4f63-bc5d-87af7ebd3e42",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -16,
        416
      ]
    },
    {
      "id": "b07f6e14-d650-4da4-845f-191d76249aa6",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        176,
        416
      ]
    },
    {
      "id": "5f940f8a-f146-4438-b87d-e85b294095bb",
      "name": "Critical Fraud Risk?",
      "type": "n8n-nodes-base.if",
      "position": [
        400,
        96
      ]
    },
    {
      "id": "7ca0fa2f-183d-41fb-b654-bd39481ffc99",
      "name": "Auto-Approve Eligible?",
      "type": "n8n-nodes-base.if",
      "position": [
        416,
        352
      ]
    },
    {
      "id": "7f4ffb88-3c0a-4ee2-90bf-f6139eeb62e2",
      "name": "Request Fraud Investigation",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1296,
        -16
      ]
    },
    {
      "id": "4de0ce06-d062-4c0d-a006-3dda68257db0",
      "name": "Amount > $5000?",
      "type": "n8n-nodes-base.if",
      "position": [
        880,
        192
      ]
    },
    {
      "id": "8b3d632f-fb06-4f4c-bbe7-00012fe7581e",
      "name": "Request Manager Approval",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1312,
        176
      ]
    },
    {
      "id": "e7d4d4b9-f1a7-49c2-acb2-bf66d102fe29",
      "name": "Notify Vendor - Approved",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1328,
        368
      ]
    },
    {
      "id": "33787ce5-b0ef-46f2-9687-6d88d4effb55",
      "name": "Log to Invoice Database",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1840,
        272
      ]
    },
    {
      "id": "e510ac2c-183f-4f6b-bea0-1573cb6af792",
      "name": "Sticky Note - Intake",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1568,
        64
      ],
      "parameters": {
        "width": 674,
        "height": 388,
        "content": "## 📧 Smart Invoice Intake\n\nMonitors new invoice submitted via a **Jotform**\n\nCreate your form for free on [Jotform using this link](https://www.jotform.com/?partner=mediajade)\n\n**Output:** Invoice att"
      }
    },
    {
      "id": "e03f3fdf-80c2-4c87-9e05-58f499853191",
      "name": "Sticky Note - OCR",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        0
      ],
      "parameters": {
        "width": 674,
        "height": 444,
        "content": "## 🤖 AI-Powered OCR & Data Extraction\n\nUses GPT-4o-mini with vision to read invoices and extract ALL structured data with high accuracy.\n\n**Result:** 95%+ accuracy on invoice data extraction"
      }
    },
    {
      "id": "69a627b2-fc15-440b-9668-f7cead11c022",
      "name": "Sticky Note - Fraud",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -48
      ],
      "parameters": {
        "width": 756,
        "height": 692,
        "content": "## 🚨 AI Fraud Detection & Risk Analysis\n\nAdvanced fraud detection AI analyzes every invoice for anomalies, duplicates, and suspicious patterns.\n\n**Result:** Catch fraud before payment, protect company"
      }
    },
    {
      "id": "8a173f21-6a0a-4428-916e-801b83eb1dda",
      "name": "Sticky Note - Routing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -176
      ],
      "parameters": {
        "width": 720,
        "height": 772,
        "content": "## 🚦 Intelligent Routing & Approval Workflows\n\nAutomatically routes invoices based on risk level, amount, and fraud analysis.\n\n**Result:** Fast processing for legitimate invoices, rigorous checks for "
      }
    },
    {
      "id": "30f7ee03-153b-4ab6-86ce-f01e014e42d1",
      "name": "Sticky Note - Analytics",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1632,
        96
      ],
      "parameters": {
        "width": 480,
        "height": 364,
        "content": "## 📊 Financial Analytics & Audit Trail\n\nComprehensive logging of all invoices for analytics, compliance, and audit purposes.\n\n**Result:** Data-driven financial operations with full transparency"
      }
    },
    {
      "id": "399c8b7f-a346-4cab-a49f-337b8b1605f4",
      "name": "Send a message",
      "type": "n8n-nodes-base.slack",
      "position": [
        992,
        0
      ]
    },
    {
      "id": "87e7a15b-abbc-4fbc-b1ba-fe987c2740c8",
      "name": "Update an invoice",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        1104,
        368
      ]
    },
    {
      "id": "8faf07af-b384-43d9-910e-ad4991bddd87",
      "name": "Jotform Trigger",
      "type": "n8n-nodes-base.jotFormTrigger",
      "position": [
        -1488,
        256
      ]
    }
  ],
  "connections": {
    "Send a message": {
      "main": [
        [
          {
            "node": "Request Fraud Investigation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Amount > $5000?": {
      "main": [
        [
          {
            "node": "Request Manager Approval",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update an invoice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Jotform Trigger": {
      "main": [
        [
          {
            "node": "Has Invoice Attachment?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Fraud Detection Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Update an invoice": {
      "main": [
        [
          {
            "node": "Notify Vendor - Approved",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Invoice Data": {
      "main": [
        [
          {
            "node": "AI Fraud Detection Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Critical Fraud Risk?": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Amount > $5000?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Auto-Approve Eligible?": {
      "main": [
        [
          {
            "node": "Update an invoice",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Amount > $5000?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Invoice Attachment?": {
      "main": [
        [
          {
            "node": "Extract Invoice Attachments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Fraud Detection Agent": {
      "main": [
        [
          {
            "node": "Critical Fraud Risk?",
            "type": "main",
            "index": 0
          },
          {
            "node": "Auto-Approve Eligible?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Vendor - Approved": {
      "main": [
        [
          {
            "node": "Log to Invoice Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request Manager Approval": {
      "main": [
        [
          {
            "node": "Log to Invoice Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Fraud Detection Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "AI Invoice OCR & Extraction": {
      "main": [
        [
          {
            "node": "Parse Invoice Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Invoice Attachments": {
      "main": [
        [
          {
            "node": "AI Invoice OCR & Extraction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request Fraud Investigation": {
      "main": [
        [
          {
            "node": "Log to Invoice Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}