{
  "name": "Detect multi-source transaction fraud and reconcile finances with OpenAI, Nvidia NIM, Gmail, Slack and Google Sheets",
  "nodes": [
    {
      "id": "86013ec1-435b-4a3b-ae22-d6f7ff799931",
      "name": "Schedule Trigger - Periodic Ingestion",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -720,
        32
      ]
    },
    {
      "id": "43130480-eaa0-40f1-85b1-b1df2da1ac72",
      "name": "Webhook - Real-time Transaction Events",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -272,
        320
      ]
    },
    {
      "id": "a490db62-8348-4505-9476-45e26cacdaf3",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -496,
        32
      ]
    },
    {
      "id": "0b3a802b-f083-46d4-aaff-b17e08d94a19",
      "name": "Fetch Bank API Transactions",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -272,
        -64
      ]
    },
    {
      "id": "f6d336a7-54e4-4008-b9cb-484a4597a6d8",
      "name": "Fetch Payment Gateway Transactions",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -272,
        128
      ]
    },
    {
      "id": "8793a5ae-9110-49bd-bb09-f2169f6601e1",
      "name": "Merge All Transaction Sources",
      "type": "n8n-nodes-base.merge",
      "position": [
        -48,
        112
      ]
    },
    {
      "id": "0fb2ee62-1588-4d6e-a4f6-bccd8f92b970",
      "name": "Normalize Transaction Data",
      "type": "n8n-nodes-base.set",
      "position": [
        176,
        128
      ]
    },
    {
      "id": "43c761f7-d94e-4731-99cf-97250a95b6c0",
      "name": "Filter Valid Transactions",
      "type": "n8n-nodes-base.filter",
      "position": [
        400,
        128
      ]
    },
    {
      "id": "e32e4d7b-c2d7-4794-8d99-394f32d74187",
      "name": "Check Idempotency",
      "type": "n8n-nodes-base.code",
      "position": [
        624,
        128
      ]
    },
    {
      "id": "6b4d739e-b1b1-43f1-973d-c2ac15cdadd2",
      "name": "AI Agent - Fraud Detection",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        848,
        128
      ]
    },
    {
      "id": "580513bf-e6cd-41f2-961b-6738fda59365",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        856,
        352
      ]
    },
    {
      "id": "f0672e64-a327-45c1-87f1-4056104944f9",
      "name": "Structured Output Parser - Fraud Analysis",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1040,
        352
      ]
    },
    {
      "id": "151d9747-29c1-4c2f-b95a-8a07bea5f125",
      "name": "Route by Risk Level",
      "type": "n8n-nodes-base.switch",
      "position": [
        1200,
        96
      ]
    },
    {
      "id": "e8402459-bc09-4f20-93ed-6533bd9ae7eb",
      "name": "Flag for Manual Review",
      "type": "n8n-nodes-base.set",
      "position": [
        1456,
        224
      ]
    },
    {
      "id": "fa4b2595-5473-4f95-b9b9-14292beff37d",
      "name": "Reconcile with ERP System",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1472,
        -64
      ]
    },
    {
      "id": "63195367-d756-4567-bdb9-1dfbaa823b38",
      "name": "Store Transaction Record",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1648,
        -64
      ]
    },
    {
      "id": "88fc3ef6-2f52-40e1-a853-05504661da74",
      "name": "Store Audit Trail",
      "type": "n8n-nodes-base.postgres",
      "position": [
        1872,
        -64
      ]
    },
    {
      "id": "f4e58560-de61-4116-bf63-ffde4502341a",
      "name": "Notify Finance Team - High Risk",
      "type": "n8n-nodes-base.slack",
      "position": [
        1648,
        128
      ]
    },
    {
      "id": "89336bb0-c2fb-4089-9b04-d6a9d69ee928",
      "name": "Send Customer Alert Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1648,
        320
      ]
    },
    {
      "id": "e68b4b12-601e-4ad7-a3c7-a46067f70134",
      "name": "Aggregate for Financial Report",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2096,
        -64
      ]
    },
    {
      "id": "bfa1aac3-efbe-40c3-9514-3a66fdcf2100",
      "name": "Generate Financial Report",
      "type": "n8n-nodes-base.code",
      "position": [
        2320,
        -64
      ]
    },
    {
      "id": "d916d324-cef3-4139-9f56-2ab813df646c",
      "name": "Send Financial Report to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        2544,
        -64
      ]
    },
    {
      "id": "29a508e7-b62a-4b86-9e79-80472fad071b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -752,
        -528
      ],
      "parameters": {
        "width": 816,
        "height": 272,
        "content": "## How It Works\nThis workflow automates financial transaction surveillance by monitoring multiple payment systems, analyzing transaction patterns with AI, and triggering instant fraud alerts. Designed"
      }
    },
    {
      "id": "ddb8f405-f989-4192-a0ab-dc7ff21b2dd8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        -608
      ],
      "parameters": {
        "width": 416,
        "height": 352,
        "content": "## Setup Steps\n1. Configure banking API credentials for transaction access\n2. Set up webhook endpoints for real-time transaction notifications\n3. Add OpenAI API key for fraud pattern analysis and risk"
      }
    },
    {
      "id": "2ffe548b-8984-40c1-81e8-3ce8010ac52e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -656
      ],
      "parameters": {
        "width": 400,
        "height": 384,
        "content": "## Prerequisites\nActive accounts for payment processors (Stripe, PayPal) or banking APIs (Plaid)\n## Use Cases\nReal-time credit card transaction monitoring with instant fraud blocks\n## Customization\nAd"
      }
    },
    {
      "id": "1cb5cb06-1cc4-4b15-b363-87e88a662750",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        -176
      ],
      "parameters": {
        "width": 1344,
        "height": 736,
        "content": "## Alert Routing \nSends high-risk transaction alerts to finance teams via Gmail and Slack with detailed context.\n**Why** - Enables immediate human review and action on potential fraud before financial"
      }
    },
    {
      "id": "f2da0fea-a75f-4c98-9881-609db6b2d9ae",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        -160
      ],
      "parameters": {
        "width": 608,
        "height": 720,
        "content": "## AI Risk Scoring\nRoutes transaction metadata to AI models that calculate fraud probability based on behavioral patterns.\n**Why** - Identifies suspicious activities that rule-based systems miss, adap"
      }
    },
    {
      "id": "4ba18a57-0e4b-43bf-bcb7-219f8b1bcd33",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        -160
      ],
      "parameters": {
        "width": 608,
        "height": 736,
        "content": "## Validation & Normalization\nStandardizes transaction formats, validates required fields, and filters invalid entries.\n**Why** - Ensures data quality and prevents downstream processing errors from ma"
      }
    },
    {
      "id": "f2512335-59ac-4f71-aa5c-7b11d70e922e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        -160
      ],
      "parameters": {
        "width": 912,
        "height": 736,
        "content": "## Transaction Ingestion \nFetches real-time payment data from banking APIs, Stripe, PayPal using webhooks and scheduled polling.\n**Why** - Captures transactions immediately upon processing, enabling r"
      }
    }
  ],
  "connections": {
    "Check Idempotency": {
      "main": [
        [
          {
            "node": "AI Agent - Fraud Detection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent - Fraud Detection",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Store Audit Trail": {
      "main": [
        [
          {
            "node": "Aggregate for Financial Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Risk Level": {
      "main": [
        [
          {
            "node": "Flag for Manual Review",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reconcile with ERP System",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reconcile with ERP System",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Flag for Manual Review": {
      "main": [
        [
          {
            "node": "Notify Finance Team - High Risk",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Customer Alert Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Fetch Bank API Transactions",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Payment Gateway Transactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Transaction Record": {
      "main": [
        [
          {
            "node": "Store Audit Trail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Valid Transactions": {
      "main": [
        [
          {
            "node": "Check Idempotency",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Financial Report": {
      "main": [
        [
          {
            "node": "Send Financial Report to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reconcile with ERP System": {
      "main": [
        [
          {
            "node": "Store Transaction Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent - Fraud Detection": {
      "main": [
        [
          {
            "node": "Route by Risk Level",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Transaction Data": {
      "main": [
        [
          {
            "node": "Filter Valid Transactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Bank API Transactions": {
      "main": [
        [
          {
            "node": "Merge All Transaction Sources",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge All Transaction Sources": {
      "main": [
        [
          {
            "node": "Normalize Transaction Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate for Financial Report": {
      "main": [
        [
          {
            "node": "Generate Financial Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Payment Gateway Transactions": {
      "main": [
        [
          {
            "node": "Merge All Transaction Sources",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Schedule Trigger - Periodic Ingestion": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - Real-time Transaction Events": {
      "main": [
        [
          {
            "node": "Merge All Transaction Sources",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser - Fraud Analysis": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent - Fraud Detection",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}