{
  "name": "Low Risk Transaction Workflow",
  "nodes": [
    {
      "parameters": {
        "path": "low-risk-action",
        "responseMode": "responseNode",
        "options": {}
      },
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "// Extract transaction data\nconst transaction = items[0].json;\n\n// Log the transaction\nconsole.log('Processing LOW risk transaction:', transaction.transactionId);\n\n// Prepare approval response\nreturn [\n  {\n    json: {\n      transactionId: transaction.transactionId,\n      riskLevel: 'LOW',\n      actionTaken: 'ALLOW',\n      success: true,\n      message: 'Transaction approved automatically',\n      executedBy: 'n8n-low-risk-workflow',\n      timestamp: new Date().toISOString(),\n      approvalReason: 'Transaction meets all security criteria'\n    }\n  }\n];"
      },
      "name": "Process Low Risk",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        470,
        300
      ]
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [],
          "number": [
            {
              "value1": "={{$json[\"amount\"]}}",
              "operation": "smaller",
              "value2": 10000
            }
          ]
        }
      },
      "name": "Check Amount",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        690,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "// Auto-approve transaction\nconst data = items[0].json;\n\nreturn [\n  {\n    json: {\n      ...data,\n      autoApproved: true,\n      approvalTime: new Date().toISOString()\n    }\n  }\n];"
      },
      "name": "Auto Approve",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        910,
        200
      ]
    },
    {
      "parameters": {
        "functionCode": "// Send for manual review (amounts >= 10000)\nconst data = items[0].json;\n\nreturn [\n  {\n    json: {\n      ...data,\n      actionTaken: 'REVIEW',\n      message: 'Low risk but high amount - manual review required'\n    }\n  }\n];"
      },
      "name": "Manual Review",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        910,
        400
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{$json}}",
        "options": {}
      },
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [
        1130,
        300
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Process Low Risk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Low Risk": {
      "main": [
        [
          {
            "node": "Check Amount",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Amount": {
      "main": [
        [
          {
            "node": "Auto Approve",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Manual Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Auto Approve": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Review": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {},
  "id": "low-risk-workflow-001"
}