{
  "id": "XHDFLUyFqPo2rrCq",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Real-Time Bank Transaction Monitor & Alert System for Accounting Teams  description",
  "tags": [],
  "nodes": [
    {
      "id": "cdb237d3-b6ba-4439-a78b-78dcccec0bba",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1136,
        32
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d317e4f8-9f04-4343-bace-0e17bed6b809",
      "name": "Fetch Transactions",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueErrorOutput",
      "position": [
        -912,
        32
      ],
      "parameters": {
        "url": "https://api.bank.com/transactions",
        "options": {
          "timeout": 30000
        },
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "from_date",
              "value": "={{ $now.minus({ minutes: 5 }).toISO() }}"
            },
            {
              "name": "account_id",
              "value": "ACC-891234"
            },
            {
              "name": "limit",
              "value": "100"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "c9c6ff79-a4e0-4fe3-b8c0-c5507f197c0f",
      "name": "API Error?",
      "type": "n8n-nodes-base.if",
      "position": [
        -688,
        32
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "error_check",
              "operator": {
                "type": "string",
                "operation": "exists"
              },
              "leftValue": "={{ $json.error }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "de24ec12-693a-4310-ba16-b309bd3572d7",
      "name": "Handle API Error",
      "type": "n8n-nodes-base.code",
      "position": [
        -464,
        -160
      ],
      "parameters": {
        "jsCode": "const error = $input.first().json.error || 'Unknown API Error';\nconst timestamp = new Date().toISOString();\n\nreturn [{\n  json: {\n    error_type: 'API_FAILURE',\n    error_message: error,\n    timestamp: timestamp,\n    workflow_name: 'Financial Transaction Monitor',\n    severity: 'HIGH'\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "fc65dd5e-5c57-42e1-9756-31d488ddec25",
      "name": "Send Error Alert",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -240,
        -432
      ],
      "parameters": {
        "options": {
          "ccEmail": "user@example.com"
        },
        "subject": "\ud83d\udea8 Workflow Error - API Failure",
        "toEmail": "user@example.com",
        "fromEmail": "user@example.com"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "d5c3d5ba-aa9b-4827-bd3e-22f5e1f88fc4",
      "name": "Enrich & Transform Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -464,
        224
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst enrichedTransactions = [];\n\nfor (const item of items) {\n  const txn = item.json;\n  \n  const isWeekend = new Date(txn.timestamp).getDay() % 6 === 0;\n  const isNightTime = new Date(txn.timestamp).getHours() < 6 || new Date(txn.timestamp).getHours() > 22;\n  const isInternational = txn.country && txn.country !== 'US';\n  \n  let adjustedRiskScore = parseFloat(txn.risk_score || 0);\n  \n  if (isWeekend) adjustedRiskScore += 0.5;\n  if (isNightTime) adjustedRiskScore += 0.8;\n  if (isInternational) adjustedRiskScore += 1.2;\n  if (txn.payment_method === 'wire_transfer') adjustedRiskScore += 1.0;\n  \n  let category = 'NORMAL';\n  const amount = parseFloat(txn.amount);\n  \n  if (amount >= 50000 || adjustedRiskScore >= 9) {\n    category = 'CRITICAL';\n  } else if (amount >= 25000 || adjustedRiskScore >= 8) {\n    category = 'HIGH';\n  } else if (amount >= 10000 || adjustedRiskScore >= 7) {\n    category = 'MEDIUM';\n  } else if (adjustedRiskScore >= 5) {\n    category = 'LOW_RISK';\n  }\n  \n  const recentSimilarCount = txn.vendor_transaction_count_24h || 0;\n  const isVelocityAnomaly = recentSimilarCount > 5;\n  \n  enrichedTransactions.push({\n    json: {\n      ...txn,\n      original_risk_score: txn.risk_score,\n      adjusted_risk_score: adjustedRiskScore.toFixed(2),\n      risk_category: category,\n      is_weekend: isWeekend,\n      is_night_time: isNightTime,\n      is_international: isInternational,\n      velocity_anomaly: isVelocityAnomaly,\n      processed_at: new Date().toISOString(),\n      alert_priority: category === 'CRITICAL' ? 1 : category === 'HIGH' ? 2 : 3\n    }\n  });\n}\n\nreturn enrichedTransactions;"
      },
      "typeVersion": 2
    },
    {
      "id": "be8ce253-f2a1-4c88-bb43-63e2bff6d874",
      "name": "Critical Alert?",
      "type": "n8n-nodes-base.if",
      "position": [
        -240,
        32
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "critical_check",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.risk_category }}",
              "rightValue": "CRITICAL"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "0f830274-e3da-418b-9a1b-84cf9d4439f7",
      "name": "High Priority?",
      "type": "n8n-nodes-base.if",
      "position": [
        -240,
        224
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "high_check",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.risk_category }}",
              "rightValue": "HIGH"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c168aef5-4c30-4b0f-89c5-b442b8b00a46",
      "name": "Medium Priority?",
      "type": "n8n-nodes-base.if",
      "position": [
        -240,
        416
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "medium_check",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.risk_category }}",
              "rightValue": "MEDIUM"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "629b2dc4-8b5c-420b-b62d-d0c1653900a2",
      "name": "Log Critical to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -16,
        32
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappings": [
            {
              "value": "={{ $json.timestamp }}",
              "column": "Timestamp"
            },
            {
              "value": "={{ $json.id }}",
              "column": "Transaction_ID"
            },
            {
              "value": "={{ $json.amount }}",
              "column": "Amount"
            },
            {
              "value": "={{ $json.vendor }}",
              "column": "Vendor"
            },
            {
              "value": "={{ $json.adjusted_risk_score }}",
              "column": "Adjusted_Risk_Score"
            },
            {
              "value": "={{ $json.risk_category }}",
              "column": "Risk_Category"
            },
            {
              "value": "={{ $json.country }}",
              "column": "Country"
            },
            {
              "value": "={{ $json.velocity_anomaly }}",
              "column": "Velocity_Anomaly"
            },
            {
              "value": "PENDING_REVIEW",
              "column": "Status"
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Critical_Alerts"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "1a2b3c4d5e6f7g8h"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "60e0ded9-8df3-4db0-a8a8-272100b3867d",
      "name": "Log High Priority to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -16,
        224
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappings": [
            {
              "value": "={{ $json.timestamp }}",
              "column": "Timestamp"
            },
            {
              "value": "={{ $json.id }}",
              "column": "Transaction_ID"
            },
            {
              "value": "={{ $json.amount }}",
              "column": "Amount"
            },
            {
              "value": "={{ $json.vendor }}",
              "column": "Vendor"
            },
            {
              "value": "={{ $json.adjusted_risk_score }}",
              "column": "Adjusted_Risk_Score"
            },
            {
              "value": "={{ $json.risk_category }}",
              "column": "Risk_Category"
            },
            {
              "value": "NEEDS_REVIEW",
              "column": "Status"
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "High_Priority_Alerts"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "1a2b3c4d5e6f7g8h"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "6fad427f-102f-4bbe-9c3e-9b6553e0c595",
      "name": "Log Medium Priority to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -16,
        416
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappings": [
            {
              "value": "={{ $json.timestamp }}",
              "column": "Timestamp"
            },
            {
              "value": "={{ $json.id }}",
              "column": "Transaction_ID"
            },
            {
              "value": "={{ $json.amount }}",
              "column": "Amount"
            },
            {
              "value": "={{ $json.vendor }}",
              "column": "Vendor"
            },
            {
              "value": "={{ $json.adjusted_risk_score }}",
              "column": "Adjusted_Risk_Score"
            },
            {
              "value": "LOGGED",
              "column": "Status"
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Medium_Alerts"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "1a2b3c4d5e6f7g8h"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "ce4daee5-785b-46e3-ac36-236fd37acd35",
      "name": "Send Critical Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        208,
        32
      ],
      "parameters": {
        "options": {
          "ccEmail": "user@example.com"
        },
        "subject": "\ud83d\udea8 CRITICAL: Transaction Alert - ${{ $json.amount }}",
        "toEmail": "user@example.com,user@example.com",
        "fromEmail": "user@example.com"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "fdc75222-26ea-4963-85e3-c3ebf49e290b",
      "name": "Send High Priority Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        208,
        224
      ],
      "parameters": {
        "options": {
          "ccEmail": "user@example.com"
        },
        "subject": "\u26a0\ufe0f High Priority Transaction Alert - ${{ $json.amount }}",
        "toEmail": "user@example.com",
        "fromEmail": "user@example.com"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "5519d3bd-91b2-4973-b67a-3473a40f81c9",
      "name": "Send Critical Slack Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        432,
        32
      ],
      "parameters": {
        "text": "=\ud83d\udea8 *CRITICAL TRANSACTION ALERT* \ud83d\udea8\n\n*Amount:* ${{ $json.amount }}\n*Vendor:* {{ $json.vendor }}\n*Risk Score:* {{ $json.adjusted_risk_score }}/10\n*Transaction ID:* {{ $json.id }}\n*Country:* {{ $json.country || 'Domestic' }}\n\n<!channel> *IMMEDIATE REVIEW REQUIRED*",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "C01234ABCDE"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "89b36305-1002-4eec-8875-b505fcf680a7",
      "name": "Send High Priority Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        432,
        224
      ],
      "parameters": {
        "text": "=\u26a0\ufe0f *High Priority Transaction*\n\n*Amount:* ${{ $json.amount }}\n*Vendor:* {{ $json.vendor }}\n*Risk Score:* {{ $json.adjusted_risk_score }}/10\n*ID:* {{ $json.id }}\n\nReview within 2 hours.",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "C01234ABCDE"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "8e423bbe-a36f-4047-b60d-30c4df6f35ae",
      "name": "Merge All Alerts",
      "type": "n8n-nodes-base.merge",
      "position": [
        656,
        128
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "mergeByFields": {
          "values": [
            {}
          ]
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "cb1e5447-6c01-4b12-8cbd-223a1359ec48",
      "name": "Generate Summary Stats",
      "type": "n8n-nodes-base.code",
      "position": [
        880,
        128
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\nconst criticalCount = items.filter(i => i.json.risk_category === 'CRITICAL').length;\nconst highCount = items.filter(i => i.json.risk_category === 'HIGH').length;\nconst mediumCount = items.filter(i => i.json.risk_category === 'MEDIUM').length;\n\nconst totalAmount = items.reduce((sum, i) => sum + parseFloat(i.json.amount || 0), 0);\nconst avgRiskScore = items.reduce((sum, i) => sum + parseFloat(i.json.adjusted_risk_score || 0), 0) / items.length;\n\nconst internationalCount = items.filter(i => i.json.is_international).length;\nconst velocityAnomalies = items.filter(i => i.json.velocity_anomaly).length;\n\nreturn [{\n  json: {\n    summary_timestamp: new Date().toISOString(),\n    total_transactions: items.length,\n    critical_alerts: criticalCount,\n    high_priority_alerts: highCount,\n    medium_priority_alerts: mediumCount,\n    total_amount: totalAmount.toFixed(2),\n    average_risk_score: avgRiskScore.toFixed(2),\n    international_transactions: internationalCount,\n    velocity_anomalies: velocityAnomalies,\n    requires_immediate_action: criticalCount > 0 || highCount > 2\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "ae35c4f8-6ef1-49e4-ba55-8f2b4b0e246b",
      "name": "Log Summary to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1104,
        128
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [],
          "mappings": [
            {
              "value": "={{ $json.summary_timestamp }}",
              "column": "Timestamp"
            },
            {
              "value": "={{ $json.total_transactions }}",
              "column": "Total_Transactions"
            },
            {
              "value": "={{ $json.critical_alerts }}",
              "column": "Critical_Count"
            },
            {
              "value": "={{ $json.high_priority_alerts }}",
              "column": "High_Count"
            },
            {
              "value": "={{ $json.medium_priority_alerts }}",
              "column": "Medium_Count"
            },
            {
              "value": "={{ $json.total_amount }}",
              "column": "Total_Amount"
            },
            {
              "value": "={{ $json.average_risk_score }}",
              "column": "Avg_Risk_Score"
            },
            {
              "value": "={{ $json.international_transactions }}",
              "column": "International_Count"
            },
            {
              "value": "={{ $json.velocity_anomalies }}",
              "column": "Velocity_Anomalies"
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Daily_Summary"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "1a2b3c4d5e6f7g8h"
        },
        "authentication": "serviceAccount"
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "4fdbf3d4-a589-46f8-9ca0-cc11f8f51a35",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        -80
      ],
      "parameters": {
        "width": 150,
        "height": 288,
        "content": "**Schedule Trigger** - Runs every 5 minutes\n"
      },
      "typeVersion": 1
    },
    {
      "id": "fbff6ab9-e53a-4bf6-9562-38d803f8fa6c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -944,
        -80
      ],
      "parameters": {
        "width": 150,
        "height": 288,
        "content": "**Fetch Transactions** - HTTP Request with retry logic\n"
      },
      "typeVersion": 1
    },
    {
      "id": "6b87748d-7c6b-43c2-b4d5-e050eac16322",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -80
      ],
      "parameters": {
        "width": 150,
        "height": 288,
        "content": "**API Error?** - IF condition for error detection\n"
      },
      "typeVersion": 1
    },
    {
      "id": "728f3911-852b-4d26-b6ad-f9c28150b307",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -272
      ],
      "parameters": {
        "width": 150,
        "height": 256,
        "content": "**Handle API Error** - Code node for error processing\n"
      },
      "typeVersion": 1
    },
    {
      "id": "06c6702b-154b-4c6b-acc5-6f64b352db31",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        96
      ],
      "parameters": {
        "width": 150,
        "height": 256,
        "content": "**Enrich & Transform Data** - Advanced risk calculation\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5e7d9812-5cf1-40a1-b506-67246a92017e",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        -560
      ],
      "parameters": {
        "width": 150,
        "height": 256,
        "content": "**Send Error Alert** - Email to DevOps team\n"
      },
      "typeVersion": 1
    },
    {
      "id": "35e45712-e9de-4101-a2c9-f4f3c93070d9",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        -224
      ],
      "parameters": {
        "width": 150,
        "height": 800,
        "content": "**Critical Alert?** - IF condition (\u2265$50k or risk 9+)\n\n**High Priority?** - IF condition (\u2265$25k or risk 8+)\n\n**Medium Priority?** - IF condition (\u2265$10k or risk 7+)"
      },
      "typeVersion": 1
    },
    {
      "id": "2907c572-1c5b-4ad6-9a89-f3bf76084ad8",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -224
      ],
      "parameters": {
        "width": 150,
        "height": 800,
        "content": "**Log Critical to Sheet** - Google Sheets append\n\n**Log High Priority to Sheet** - Google Sheets append\n\n**Log Medium Priority to Sheet** - Google Sheets append"
      },
      "typeVersion": 1
    },
    {
      "id": "06038ce8-34ea-440f-91ee-2e9bddd03963",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -160
      ],
      "parameters": {
        "width": 150,
        "height": 544,
        "content": "**Send Critical Email** - HTML email to executives\n\n**Send High Priority Email** - Email to finance team"
      },
      "typeVersion": 1
    },
    {
      "id": "06361334-3670-483a-898e-111c7010e0f9",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -160
      ],
      "parameters": {
        "width": 150,
        "height": 544,
        "content": "**Send Critical Slack Alert** - Slack @channel mention\n\n**Send High Priority Slack** - Slack notification"
      },
      "typeVersion": 1
    },
    {
      "id": "e4b796c1-9a8b-498c-80df-32851b8aa0c6",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        16
      ],
      "parameters": {
        "width": 150,
        "height": 256,
        "content": "**Merge All Alerts** - Combines all branches"
      },
      "typeVersion": 1
    },
    {
      "id": "084295fd-a9c0-47ab-b2b7-0d115df2f6c2",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        16
      ],
      "parameters": {
        "width": 150,
        "height": 256,
        "content": "**Generate Summary Stats** - Code node for analytics"
      },
      "typeVersion": 1
    },
    {
      "id": "4d17630e-fbda-42a8-b48f-c0100a09aa99",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        16
      ],
      "parameters": {
        "width": 150,
        "height": 256,
        "content": "**Log Summary to Sheet** - Summary statistics storage"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "28b12b91-0821-4aa5-82fc-ff2c652cec3f",
  "connections": {
    "API Error?": {
      "main": [
        [
          {
            "node": "Handle API Error",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Enrich & Transform Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "High Priority?": {
      "main": [
        [
          {
            "node": "Log High Priority to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Critical Alert?": {
      "main": [
        [
          {
            "node": "Log Critical to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Handle API Error": {
      "main": [
        [
          {
            "node": "Send Error Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Medium Priority?": {
      "main": [
        [
          {
            "node": "Log Medium Priority to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge All Alerts": {
      "main": [
        [
          {
            "node": "Generate Summary Stats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Fetch Transactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Transactions": {
      "main": [
        [
          {
            "node": "API Error?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Critical Email": {
      "main": [
        [
          {
            "node": "Send Critical Slack Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Critical to Sheet": {
      "main": [
        [
          {
            "node": "Send Critical Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Summary Stats": {
      "main": [
        [
          {
            "node": "Log Summary to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich & Transform Data": {
      "main": [
        [
          {
            "node": "Critical Alert?",
            "type": "main",
            "index": 0
          },
          {
            "node": "High Priority?",
            "type": "main",
            "index": 0
          },
          {
            "node": "Medium Priority?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send High Priority Email": {
      "main": [
        [
          {
            "node": "Send High Priority Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send High Priority Slack": {
      "main": [
        [
          {
            "node": "Merge All Alerts",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Send Critical Slack Alert": {
      "main": [
        [
          {
            "node": "Merge All Alerts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log High Priority to Sheet": {
      "main": [
        [
          {
            "node": "Send High Priority Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}